35 #include <tins/macros.h> 36 #include <tins/endianness.h> 37 #include <tins/hw_address.h> 74 SLL(
const uint8_t* buffer, uint32_t total_sz);
83 return Endian::be_to_host(header_.packet_type);
91 return Endian::be_to_host(header_.lladdr_type);
99 return Endian::be_to_host(header_.lladdr_len);
107 return header_.address;
115 return Endian::be_to_host(header_.protocol);
130 void packet_type(uint16_t new_packet_type);
136 void lladdr_type(uint16_t new_lladdr_type);
142 void lladdr_len(uint16_t new_lladdr_len);
148 void address(
const address_type& new_address);
154 void protocol(uint16_t new_protocol);
161 uint32_t header_size()
const;
167 return new SLL(*
this);
172 uint16_t packet_type, lladdr_type, lladdr_len;
177 void write_serialization(uint8_t* buffer, uint32_t total_sz);
HWAddress< 8 > address_type
Definition: sll.h:55
SLL * clone() const
Definition: sll.h:166
uint16_t packet_type() const
Getter for the Packet Type field.
Definition: sll.h:82
Represents a Linux cooked-mode capture (SLL) PDU.
Definition: sll.h:45
PDUType
Enum which identifies each type of PDU.
Definition: pdu.h:127
PDUType pdu_type() const
Getter for the PDU's type.
Definition: sll.h:122
Represents a hardware address.
Definition: hw_address.h:91
The Tins namespace.
Definition: address_range.h:38
uint16_t lladdr_type() const
Getter for the LLADDR Type field.
Definition: sll.h:90
uint16_t lladdr_len() const
Getter for the LLADDR Length field.
Definition: sll.h:98
Base class for protocol data units.
Definition: pdu.h:107
uint16_t protocol() const
Getter for the Protocol field.
Definition: sll.h:114
address_type address() const
Getter for the Address field.
Definition: sll.h:106