UdpHeader¶
Namespace: inet
class UdpHeader
Represents an Udp header, to be used with the Udp module.
Usage diagram¶
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
class |
This base class provides an abstraction for different transport layer packets. |
Fields¶
Name |
Type |
Description |
|---|---|---|
id |
int |
|
mutable |
bool |
|
complete |
bool |
|
correct |
bool |
|
properlyRepresented |
bool |
|
chunkLength |
||
rawBin |
string[] |
|
rawHex |
string[] |
|
regionTags |
||
sourcePort |
unsigned int |
|
destinationPort |
unsigned int |
|
srcPort |
unsigned short |
|
destPort |
unsigned short |
|
chunkLength |
||
totalLengthField |
UDP header + payload in bytes |
|
checksum |
uint16_t |
|
checksumMode |
Properties¶
Name |
Value |
Description |
|---|---|---|
beforeChange |
handleChange() |
|
descriptor |
readonly |
|
existingClass |
||
packetData |
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 checksum = 0 @toString(utils::hex($)) @fromString(utils::uhex($));
ChecksumMode checksumMode = CHECKSUM_MODE_UNDEFINED;
}