OspfPacketBase

Namespace: inet::ospf

class OspfPacketBase

Represents an OSPF packet header

Usage diagram

Inheritance diagram

Extends

Name

Type

Description

FieldsChunk

class

(no description)

Known subclasses

Name

Type

Description

Ospfv2Packet

class

Represents an OSPF packet header

Ospfv3Packet

class

Common OSPFv3 packet header - this header is present in every OSPFv3 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

Properties

Name

Value

Description

beforeChange

handleChange()

descriptor

readonly

existingClass

packetData

Source code

//
// Represents an OSPF packet header
//
class OspfPacketBase extends FieldsChunk
{
    chunkLength = B(14);
    short version = -1;     // 1 byte
    OspfPacketType type = static_cast<OspfPacketType>(-1);    // 1 byte
    int packetLengthField;  // 2 bytes

    Ipv4Address routerID;   // 4 bytes
    Ipv4Address areaID;     // 4 bytes

    uint16_t checksum = 0;       // 2 bytes
    ChecksumMode checksumMode = CHECKSUM_MODE_UNDEFINED;
}

File: src/inet/routing/ospf_common/OspfPacketBase.msg