UdpHeader

Namespace inet

UdpHeader

class

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

Extends

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

Fields

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

UDP header + payload in bytes

crc uint16_t
crcMode CrcMode

Packet operations (observed)

actionmodule
insertAtFrontDymo, Gpsr, Udp, UdpCrcInsertionHook
peekAtFrontUdp
peekDataAtExampleQosClassifier, QosClassifier, Mpls
popAtFrontMultiFieldClassifier, StreamIdentifier, Dymo, Gpsr, Udp
removeAtFrontUdpCrcInsertionHook

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 @toString(utils::hex($)) @fromString(utils::uhex($)) = 0;
    CrcMode crcMode = CRC_MODE_UNDEFINED;
}

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