conexus logo

Conexus::IP Class Reference
[Conexus I/O Endpoints]

This class serves as the base class for all IP communication classes. More...

#include <ip.h>

Inheritance diagram for Conexus::IP:
Inheritance graph
[legend]

List of all members.

Public Types

typedef ConexusPointer< IPpointer
 Class typedef to smart pointer.

Public Member Functions

virtual ~IP () throw ()
virtual IPAddressInterfacegeneric_local_address ()=0
virtual IPAddressInterfacegeneric_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 }

Detailed Description

This class serves as the base class for all IP communication classes.

Author:
Rick L Vinyard Jr <rvinyard@cs.nmsu.edu>

Member Typedef Documentation

typedef ConexusPointer<IP> Conexus::IP::pointer

Constructor & Destructor Documentation

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.


Member Function Documentation

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().


Friends And Related Function Documentation

enum TOS [related]
Enumerator:
TOS_LOWDELAY 

minimize delays for interactive traffic

TOS_THROUGHPUT 

optimize throughput

TOS_RELIABILITY 

optimize for reliability

TOS_LOWCOST 

for "filler data" where slow transmission doesn’t matter


The documentation for this class was generated from the following files:

Generated on Mon Mar 8 15:35:48 2010 for conexus by doxygen 1.6.1