Packet ICMPMessage

File: src/inet/networklayer/ipv4/ICMPMessage.msg

C++ definition

ICMP message class

Note: receiver MUST NOT decapsulate the datagram from ICMP error messages, because their contents is conceptually truncated. decapsulate() would result in a "length became negative" error; use getEncapsulatedMsg() instead.

TODO: add originator id and sequence number and create an ICMPControlInfo

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Fields:

Name Type Description
type int
code int

Source code:

//
// ICMP message class
//
// Note: receiver MUST NOT decapsulate the datagram from ICMP error messages,
// because their contents is conceptually truncated. decapsulate() would result
// in a "length became negative" error; use getEncapsulatedMsg() instead.
//
// TODO: add originator id and sequence number and create an ICMPControlInfo
packet ICMPMessage
{
    int type @enum(ICMPType);
    int code;
}