OspfPacketBase

Namespace inet::ospf

OspfPacketBase

class

Represents an OSPF packet header

Extends

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

Fields

Name Type Description
chunkLength
version short

1 byte

type OspfPacketType

1 byte

packetLengthField int

2 bytes

routerID Ipv4Address

4 bytes

areaID Ipv4Address

4 bytes

crc uint16_t

2 bytes

crcMode CrcMode

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 crc = 0;       // 2 bytes
    CrcMode crcMode = CRC_MODE_UNDEFINED;
}
File: src/inet/routing/ospf_common/OspfPacketBase.msg