UdpHeader

UdpHeader

class

Represents an Udp header, to be used with the Udp module.

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
TransportHeaderBase class

This base class provides an abstraction for different transport layer packets.

Fields

Name Type Description
srcPort unsigned short
destPort unsigned short
chunkLength b
totalLengthField B

UDP header + payload in bytes

crc uint16_t
crcMode CrcMode
sourcePort unsigned int
destinationPort unsigned int
mutable bool
complete bool
correct bool
properlyRepresented bool
rawBin string[]
rawHex string[]
tags RegionTagSet::cObjectRegionTag[]

Source code

//
// Represents an Udp header, to be used with the ~Udp module.
//
class UdpHeader extends TransportHeaderBase
{
    unsigned short srcPort;
    unsigned short destPort;
    chunkLength = UDP_HEADER_LENGTH;
    B totalLengthField = B(-1);   // UDP header + payload in bytes
    uint16_t crc = 0;
    CrcMode crcMode = CRC_MODE_UNDEFINED;
}

File: src/inet/transportlayer/udp/UdpHeader.msg