5#include <tins/small_uint.h>
38 VXLAN(
const uint8_t* buffer, uint32_t total_sz);
43 uint8_t
get_flags()
const {
return Endian::be_to_host(header_.flags) >> 24; }
54 void set_flags(uint8_t new_flags) { header_.flags = Endian::host_to_be(new_flags << 24); }
91 void write_serialization(uint8_t* buffer, uint32_t total_sz);
Base class for protocol data units.
Definition pdu.h:107
PDUType
Enum which identifies each type of PDU.
Definition pdu.h:127
Represents a VXLAN PDU.
Definition vxlan.h:17
small_uint< 24 > get_vni() const
Getter for the VNI.
Definition vxlan.h:48
void set_flags(uint8_t new_flags)
Setter for the flags.
Definition vxlan.h:54
VXLAN * clone() const
Definition vxlan.h:82
uint32_t header_size() const
Returns the VXLAN frame's header length.
Definition vxlan.h:71
PDUType pdu_type() const
Getter for the PDU's type.
Definition vxlan.h:77
void set_vni(small_uint< 24 > new_vni)
Setter for the VNI.
Definition vxlan.h:60
uint8_t get_flags() const
Getter for the flags.
Definition vxlan.h:43
Represents a field of n bits.
Definition small_uint.h:52
The Tins namespace.
Definition address_range.h:38