This class serves as the base class for all IP communication classes. More...
#include <ip.h>
Public Types | |
typedef ConexusPointer< IP > | pointer |
Class typedef to smart pointer. | |
Public Member Functions | |
virtual | ~IP () throw () |
virtual IPAddressInterface & | generic_local_address ()=0 |
virtual IPAddressInterface & | generic_remote_address ()=0 |
int | ttl () |
Get the Time-To-Live (TTL) field associated with this endpoint. | |
void | set_ttl (int t) |
Set the Time-To-Live (TTL) field associated with this endpoint. | |
TOS | tos () |
Get the Type-Of-Service (TOS) field associated with this endpoint. | |
void | set_tos (TOS t) |
Set the Type-Of-Service (TOS) field associated with this endpoint. | |
Protected Member Functions | |
IP (int domain=-1, int type=-1, int protocol=0) | |
Related Functions | |
(Note that these are not member functions.) | |
enum | TOS { TOS_LOWDELAY = IPTOS_LOWDELAY, TOS_THROUGHPUT = IPTOS_THROUGHPUT, TOS_RELIABILITY = IPTOS_RELIABILITY, TOS_LOWCOST = IPTOS_LOWCOST } |
This class serves as the base class for all IP communication classes.
typedef ConexusPointer<IP> Conexus::IP::pointer |
Class typedef to smart pointer.
Reimplemented from Conexus::Socket.
Reimplemented in Conexus::IPv4::IP, Conexus::IPv4::TCP, Conexus::IPv4::UDP, Conexus::IPv4::UDPPoset, Conexus::IPv6::IP, Conexus::IPv6::TCP, Conexus::IPv6::UDP, Conexus::IPv6::UDPPoset, Conexus::SSL::IPv4::TCP, Conexus::SSL::IPv4::UDP, and Conexus::SSL::IPv6::TCP.
Conexus::IP::IP | ( | int | domain = -1 , |
|
int | type = -1 , |
|||
int | protocol = 0 | |||
) | [protected] |
Conexus::IP::~IP | ( | ) | throw () [virtual] |
Reimplemented in Conexus::IPv4::IP, and Conexus::IPv6::IP.
virtual IPAddressInterface& Conexus::IP::generic_local_address | ( | ) | [pure virtual] |
Implemented in Conexus::IPv4::IP, and Conexus::IPv6::IP.
virtual IPAddressInterface& Conexus::IP::generic_remote_address | ( | ) | [pure virtual] |
Implemented in Conexus::IPv4::IP, and Conexus::IPv6::IP.
void Conexus::IP::set_tos | ( | TOS | t | ) |
Set the Type-Of-Service (TOS) field associated with this endpoint.
The TOS field is sent with every packet originating from this endpoint, and can be used to prioritize network traffic.
References Conexus::Socket::set_option().
void Conexus::IP::set_ttl | ( | int | t | ) |
Set the Time-To-Live (TTL) field associated with this endpoint.
The TTL field is sent with every packet originating from this endpoint.
The TTL field is set by the sender of the datagram, and reduced by every host on the route to its destination. If the TTL field reaches zero before the datagram arrives at its destination, then the datagram is discarded and an ICMP error datagram (11 - Time Exceeded) is sent back to the sender.
The purpose of the TTL field is to avoid a situation in which an undeliverable datagram keeps circulating on an internet system, and such a system eventually becoming swamped by such “immortal” datagrams.
In theory, time to live is measured in seconds, although every host that passes the datagram must reduce the TTL by at least one unit. In practice, the TTL field is reduced by one on every hop.
References Conexus::Socket::set_option().
TOS Conexus::IP::tos | ( | ) |
Get the Type-Of-Service (TOS) field associated with this endpoint.
The TOS field is sent with every packet originating from this endpoint, and can be used to prioritize network traffic.
References Conexus::Socket::option().
int Conexus::IP::ttl | ( | ) |
Get the Time-To-Live (TTL) field associated with this endpoint.
The TTL field is sent with every packet originating from this endpoint.
The TTL field is set by the sender of the datagram, and reduced by every host on the route to its destination. If the TTL field reaches zero before the datagram arrives at its destination, then the datagram is discarded and an ICMP error datagram (11 - Time Exceeded) is sent back to the sender.
The purpose of the TTL field is to avoid a situation in which an undeliverable datagram keeps circulating on an internet system, and such a system eventually becoming swamped by such “immortal” datagrams.
In theory, time to live is measured in seconds, although every host that passes the datagram must reduce the TTL by at least one unit. In practice, the TTL field is reduced by one on every hop.
References Conexus::Socket::option().
enum TOS [related] |