Namespace inet
UdpHeader
classRepresents 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)
| action | module |
|---|---|
| insertAtFront | Dymo, Gpsr, Udp, UdpCrcInsertionHook |
| peekAtFront | Udp |
| peekDataAt | ExampleQosClassifier, QosClassifier, Mpls |
| popAtFront | MultiFieldClassifier, Dymo, Gpsr, Udp |
| removeAtFront | UdpCrcInsertionHook |
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