Representation of the UDP header. More...
#include <headers.hpp>
Public Member Functions | |
void | setSrcPort (uint16_t p) |
Set the source port. More... | |
void | setDstPort (uint16_t p) |
Set the destination port. More... | |
uint16_t | getSrcPort () const |
Get the source port. More... | |
uint16_t | getDstPort () const |
Get the destination port. More... | |
uint16_t | getPayloadLength () const |
Get the length of the L4-SDU (UDP payload) More... | |
void | setPayloadLength (uint16_t length) |
Set the length of the L4-SDU (UDP payload) More... | |
void * | getPayload () |
Get the SDU. More... | |
Public Attributes | |
uint16_t | srcPort |
Source port. More... | |
uint16_t | dstPort |
Destination port. More... | |
uint16_t | len |
Length. More... | |
uint16_t | checksum |
Checksum. More... | |
Detailed Description
Representation of the UDP header.
Definition at line 209 of file headers.hpp.
Member Function Documentation
◆ getDstPort()
|
inline |
Get the destination port.
- Returns
- Destination port in host byte order
Definition at line 233 of file headers.hpp.
◆ getPayload()
|
inline |
◆ getPayloadLength()
|
inline |
Get the length of the L4-SDU (UDP payload)
- Returns
- Length of the payload (host byte order)
Definition at line 238 of file headers.hpp.
◆ getSrcPort()
|
inline |
Get the source port.
- Returns
- Source port in host byte order
Definition at line 228 of file headers.hpp.
◆ setDstPort()
|
inline |
Set the destination port.
- Parameters
-
p Destination port in host byte order
Definition at line 223 of file headers.hpp.
◆ setPayloadLength()
|
inline |
Set the length of the L4-SDU (UDP payload)
- Parameters
-
length of the payload (host byte order)
Definition at line 243 of file headers.hpp.
◆ setSrcPort()
|
inline |
Set the source port.
- Parameters
-
p Source port in host byte order
Definition at line 218 of file headers.hpp.
Member Data Documentation
◆ checksum
uint16_t Headers::Udp::checksum |
Checksum.
Definition at line 213 of file headers.hpp.
◆ dstPort
uint16_t Headers::Udp::dstPort |
Destination port.
Definition at line 211 of file headers.hpp.
◆ len
uint16_t Headers::Udp::len |
Length.
Definition at line 212 of file headers.hpp.
◆ srcPort
uint16_t Headers::Udp::srcPort |
Source port.
Definition at line 210 of file headers.hpp.
The documentation for this struct was generated from the following file:
- /home/dominik/uni/MoonState/include/headers.hpp