Ospfv3Packet

Namespace: inet::ospfv3

class Ospfv3Packet

Common OSPFv3 packet header - this header is present in every OSPFv3 packet

Inheritance diagram

Extends

Name

Type

Description

OspfPacketBase

class

Represents an OSPF packet header

Known subclasses

Name

Type

Description

Ospfv3DatabaseDescriptionPacket

class

Database Description Packet

Ospfv3HelloPacket

class

OSPFv3 hello packet

Ospfv3LinkStateAcknowledgementPacket

class

Link State Acknowledgement packet

Ospfv3LinkStateRequestPacket

class

Link State Request packet

Ospfv3LinkStateUpdatePacket

class

Link State Update packet

Fields

Name

Type

Description

id

int

mutable

bool

complete

bool

correct

bool

properlyRepresented

bool

chunkLength

b

rawBin

string[]

rawHex

string[]

regionTags

SharingRegionTagSet::TagBaseRegionTag[]

chunkLength

version

short

1 byte

type

OspfPacketType

1 byte

packetLengthField

int

2 bytes

routerID

Ipv4Address

4 bytes

areaID

Ipv4Address

4 bytes

checksum

uint16_t

2 bytes

checksumMode

ChecksumMode

chunkLength

version

instanceID

int8_t

reserved

uint8_t

Properties

Name

Value

Description

beforeChange

handleChange()

descriptor

readonly

existingClass

packetData

Source code

//Common OSPFv3 packet header - this header is present in every OSPFv3 packet
class Ospfv3Packet extends ospf::OspfPacketBase
{
    chunkLength = B(16);
    version = 3;
    int8_t instanceID;
    uint8_t reserved = 0;

    // RFC 5340 A.3.1.  The OSPF Packet Header: Checksum:
    //   OSPF uses the standard checksum calculation for IPv6 applications:
    //   The 16-bit one's complement of the one's complement sum of the
    //   entire contents of the packet, starting with the OSPF packet
    //   header, and prepending a "pseudo-header" of IPv6 header fields, as
    //   specified in Section 8.1 of [IPV6].  The "Upper-Layer Packet
    //   Length" in the pseudo-header is set to the value of the OSPF
    //   packet header's length field.  The Next Header value used in the
    //   pseudo-header is 89.  If the packet's length is not an integral
    //   number of 16-bit words, the packet is padded with a byte of zero
    //   before checksumming.  Before computing the checksum, the checksum
    //   field in the OSPF packet header is set to 0.
}

File: src/inet/routing/ospfv3/Ospfv3Packet.msg