Icmpv6Header

Namespace inet

Icmpv6Header

class

Represents an ICMPv6 packet.

Notes: 1. number of octets excluding the error datagram that is usually appended in optInfo, i.e. the Type|CODE|CHECKSUM|UNUSED/POINTER/MTU/OTHER as defined in RFC2463 2. Any ICMP type with MSB set, i.e. >=128 is an Informational ICMP message

Extends

Name Type Description
FieldsChunk (unknown -- not in documented files)

Fields

Name Type Description
chunkLength
type Icmpv6Type

1 byte

chksum int

int code; // 1 byte //TODO this should be specific to different ICMP types.

crcMode CrcMode

4 bytes 'type' specific values

Packet operations (observed)

actionmodule
peekAtFrontIcmpv6, Ipv6NeighbourDiscovery, Ipv6, Udp
peekDataAtIcmpv6
popAtFrontPingApp, Udp
removeAtFrontIcmpv6

Source code

//
// Represents an ICMPv6 packet.
//
// Notes:
//    1. number of octets excluding the error datagram that is usually appended
//       in optInfo, i.e. the Type|CODE|CHECKSUM|UNUSED/POINTER/MTU/OTHER
//       as defined in RFC2463
//    2. Any ICMP type with MSB set, i.e. >=128 is an Informational ICMP message
//
class Icmpv6Header extends FieldsChunk
{
    chunkLength = ICMPv6_HEADER_BYTES;
    Icmpv6Type type;     // 1 byte
    //int code; // 1 byte //TODO this should be specific to different ICMP types.
    int chksum = 0;     // 2 bytes
    CrcMode crcMode = CRC_MODE_UNDEFINED;
    // 4 bytes 'type' specific values
}

File: src/inet/networklayer/icmpv6/Icmpv6Header.msg