Ospfv3HelloPacket

Ospfv3HelloPacket

class

OSPFv3 hello packet

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends

Name Type Description
Ospfv3Packet class

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

Fields

Name Type Description
type
interfaceID uint32_t

32 bits

routerPriority char

8 bits

options Ospfv3Options

24 bits

helloInterval uint16_t

[sec] 16 bits

deadInterval uint16_t

[sec] 16 bits //TODO rename to routerDeadInterval

designatedRouterID Ipv4Address

32 bits

backupDesignatedRouterID Ipv4Address

32 bits

neighborID Ipv4Address[]

N*32 bits

chunkLength
version
instanceID int8_t
reserved uint8_t

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.

Source code

//
//  OSPFv3 hello packet
//
class Ospfv3HelloPacket extends Ospfv3Packet
{
    type = ospf::HELLO_PACKET;
    uint32_t interfaceID;                   // 32 bits
    char routerPriority;                    //  8 bits
    Ospfv3Options options;                  // 24 bits
    uint16_t helloInterval;                 // [sec] 16 bits
    uint16_t deadInterval;                  // [sec] 16 bits //TODO rename to routerDeadInterval
    Ipv4Address designatedRouterID;         // 32 bits
    Ipv4Address backupDesignatedRouterID;   // 32 bits
    Ipv4Address neighborID[];               // N*32 bits
}

//
// LSAs
//
//struct OSPFv3LSAType
//{
//    bool uBit;    //controls action the router should take when it recieves unknown LSA Function Code
//    bool s1Bit;
//    bool s2Bit;
//    uint16_t lsaFunctionCode;
//}

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