Icmpv6Header

Namespace: inet

class Icmpv6Header

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

Usage diagram

Inheritance diagram

Extends

Name

Type

Description

FieldsChunk

class

(no description)

Known subclasses

Name

Type

Description

Icmpv6DestUnreachableMsg

class

Notes: 1. As defined in RFC2463: Section 3

Icmpv6EchoReplyMsg

class

Icmpv6 Echo Reply packet. Data is attached through encapsulation (see Icmpv6.cc)

Icmpv6EchoRequestMsg

class

ICMPv6 Echo Request packet (RFC2463: Section 4). Data is attached through encapsulation (see Icmpv6.cc)

Icmpv6PacketTooBigMsg

class

(no description)

Icmpv6ParamProblemMsg

class

(no description)

Icmpv6TimeExceededMsg

class

(no description)

Ipv6NdMessage

class

Neighbour Discovery for Ipv6. RFC 2461

MldMessage

class

Base class for MLDv1 messages (RFC 2710). Carried as ICMPv6 type 130 (Query), 131 (Report), 132 (Done). Inherits type, chksum, and checksumMode from Icmpv6Header.

Mldv2Report

class

MLDv2 Multicast Listener Report (RFC 3810 §5.2, ICMPv6 type 143).

Fields

Name

Type

Description

id

int

mutable

bool

complete

bool

correct

bool

properlyRepresented

bool

chunkLength

b

rawBin

string[]

rawHex

string[]

regionTags

SharingRegionTagSet::TagBaseRegionTag[]

chunkLength

type

Icmpv6Type

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

chksum

int

2 bytes

checksumMode

ChecksumMode

4 bytes ‘type’ specific values

Properties

Name

Value

Description

beforeChange

handleChange()

descriptor

readonly

existingClass

packetData

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
    ChecksumMode checksumMode = CHECKSUM_MODE_UNDEFINED;
    // 4 bytes 'type' specific values
}

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