PimPacket

Namespace inet

PimPacket

class

Header

Extends

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

Fields

Name Type Description
version short
type PimPacketType
reserved short

8 bits

crc uint16_t

The checksum is a standard IP checksum, i.e., the 16-bit one's complement of the one's complement sum of the entire PIM message, excluding the "Multicast data packet" section of the Register message. For computing the checksum, the checksum field is zeroed. If the packet's length is not an integral number of 16-bit words, the packet is padded with a trailing byte of zero before performing the checksum.

For IPv6, the checksum also includes the IPv6 "pseudo-header", as specified in RFC 2460, Section 8.1 [5]. This "pseudo-header" is prepended to the PIM header for the purposes of calculating the checksum. The "Upper-Layer Packet Length" in the pseudo- header is set to the length of the PIM message, except in Register messages where it is set to the length of the PIM register header (8). The Next Header value used in the pseudo- header is 103.

crcMode CrcMode

Packet operations (observed)

actionmodule
peekAtFrontPimSplitter, PimDm, PimSm

Source code

///////////////////////////////////////////////////////////////////////////////////////////////
// Header
class PimPacket extends FieldsChunk
{
    short version = 2;
    PimPacketType type;
    short reserved = 0;    // 8 bits
    uint16_t crc = 0;         // The checksum is a standard IP checksum, i.e., the 16-bit one's
                                    // complement of the one's complement sum of the entire PIM
                                    // message, excluding the "Multicast data packet" section of the
                                    // Register message.  For computing the checksum, the checksum
                                    // field is zeroed.  If the packet's length is not an integral
                                    // number of 16-bit words, the packet is padded with a trailing
                                    // byte of zero before performing the checksum.
                                    //
                                    // For IPv6, the checksum also includes the IPv6 "pseudo-header",
                                    // as specified in RFC 2460, Section 8.1 [5].  This "pseudo-header"
                                    // is prepended to the PIM header for the purposes of calculating
                                    // the checksum.  The "Upper-Layer Packet Length" in the pseudo-
                                    // header is set to the length of the PIM message, except in
                                    // Register messages where it is set to the length of the PIM
                                    // register header (8).  The Next Header value used in the pseudo-
                                    // header is 103.
    CrcMode crcMode = CRC_MODE_UNDEFINED;
}

File: src/inet/routing/pim/PimPacket.msg