33#include <tins/macros.h>
35#include <tins/endianness.h>
107 return Endian::be_to_host(header_.dport);
115 return Endian::be_to_host(header_.sport);
123 return Endian::be_to_host(header_.len);
131 return Endian::be_to_host(header_.check);
183 return new UDP(*
this);
194 void write_serialization(uint8_t* buffer, uint32_t total_sz);
Represents a range of addresses.
Definition address_range.h:167
Base class for protocol data units.
Definition pdu.h:107
PDUType
Enum which identifies each type of PDU.
Definition pdu.h:127
Represents an UDP PDU.
Definition udp.h:63
PDUType pdu_type() const
Getter for the PDU's type.
Definition udp.h:177
UDP * clone() const
Definition udp.h:182
uint16_t length() const
Getter for the length of the datagram.
Definition udp.h:122
uint16_t checksum() const
Getter for the checksum of the datagram.
Definition udp.h:130
uint16_t dport() const
Getter for the destination port.
Definition udp.h:106
uint16_t sport() const
Getter for the source port.
Definition udp.h:114
The Tins namespace.
Definition address_range.h:38