Class IPControlInfo

File: src/networklayer/contract/IPControlInfo.msg

C++ definition: click here

Control information for sending/receiving packets over IP.

To send a packet over IP, fill in an IPControlInfo object, attach it to the packet with the C++ method setControlInfo(), the send it to the IP module.

When IP delivers packets to higher layers, it also attaches similar IPControlInfo objects to them.

When sending, the following fields are required:

Optional fields:

Not supported:

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Fields:

Name Type Description
protocol short

encapsulated protocol

dontFragment bool

"don't fragment" bit

interfaceId int

interface on which dgram was received/should be sent (see InterfaceTable)

destAddr IPAddress

destination IP address

srcAddr IPAddress

source IP address

diffServCodePoint unsigned char

for QoS

timeToLive short

maximum hop count

Source code:

//
// Control information for sending/receiving packets over \IP.
//
// To send a packet over \IP, fill in an IPControlInfo object,
// attach it to the packet with the C++ method setControlInfo(),
// the send it to the IP module.
//
// When IP delivers packets to higher layers, it also attaches
// similar IPControlInfo objects to them.
//
// When sending, the following fields are required:
// - protocol: a value from IPProtocolId
// - destAddr
//
// Optional fields:
// - srcAddr: it will be set to the address of the outgoing interface
// - diffServCodePoint: used in DS_Field (RFC 2474) instead of TOS (default: 0)
// - timeToLive: default defined as module parameter
// - dontFragment: default: false
//
// Not supported:
// - options: \IP Options currently not used
// - Identifier is currently always chosen by the \IP layer
//
class IPControlInfo
{
    @customize(true);
    IPAddress destAddr;   // destination IP address
    IPAddress srcAddr;    // source IP address
    int interfaceId = -1; // interface on which dgram was received/should
                              // be sent (see InterfaceTable)
    short protocol enum(IPProtocolId);  // encapsulated protocol
    unsigned char diffServCodePoint;  // for QoS
    short timeToLive;     // maximum hop count
    bool dontFragment;    // "don't fragment" bit
}