30 #include <tins/config.h> 32 #if !defined(TINS_DOT11_DOT11_DATA_H) && defined(TINS_HAVE_DOT11) 33 #define TINS_DOT11_DOT11_DATA_H 35 #include <tins/dot11/dot11_base.h> 36 #include <tins/macros.h> 76 Dot11Data(
const uint8_t* buffer, uint32_t total_sz);
84 return ext_header_.addr2;
93 return ext_header_.addr3;
102 #if TINS_IS_LITTLE_ENDIAN 103 return ext_header_.frag_seq & 0xf;
105 return (ext_header_.frag_seq >> 8) & 0xf;
115 #if TINS_IS_LITTLE_ENDIAN 116 return (ext_header_.frag_seq >> 4) & 0xfff;
118 return (Endian::le_to_host<uint16_t>(ext_header_.frag_seq) >> 4) & 0xfff;
175 if (!from_ds() && !to_ds()) {
178 if (!from_ds() && to_ds()) {
193 if (!from_ds() && !to_ds()) {
196 if (!from_ds() && to_ds()) {
211 if (!from_ds() && !to_ds()) {
214 if (!from_ds() && to_ds()) {
226 uint32_t header_size()
const;
256 uint8_t addr2[address_type::address_size];
257 uint8_t addr3[address_type::address_size];
264 uint32_t init(
const uint8_t* buffer, uint32_t total_sz);
265 void write_ext_header(Memory::OutputMemoryStream& stream);
312 return Endian::le_to_host(qos_control_);
320 void qos_control(uint16_t new_qos_control);
328 uint32_t header_size()
const;
356 void write_fixed_parameters(Memory::OutputMemoryStream& stream);
358 uint16_t qos_control_;
362 #endif // TINS_DOT11_DOT11_DATA_H Definition: dot11_data.h:271
PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_data.h:232
Class representing an 802.11 frame.
Definition: dot11_base.h:54
PDUType
Enum which identifies each type of PDU.
Definition: pdu.h:127
address_type addr3() const
Getter for the third address.
Definition: dot11_data.h:92
uint16_t qos_control() const
Getter for the QOS Control field.
Definition: dot11_data.h:311
Represents an IEEE 802.11 data frame.
Definition: dot11_data.h:43
address_type addr2() const
Getter for the second address.
Definition: dot11_data.h:83
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_base.h:497
address_type dst_addr() const
Retrieves the frame's destination address.
Definition: dot11_data.h:192
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_data.h:241
address_type bssid_addr() const
Retrieves the frame's BSSID address.
Definition: dot11_data.h:210
address_type src_addr() const
Retrieves the frame's source address.
Definition: dot11_data.h:174
Definition: dot11_data.h:261
The Tins namespace.
Definition: address_range.h:38
small_uint< 12 > seq_num() const
Getter for the sequence number field.
Definition: dot11_data.h:114
address_type addr4() const
Getter for the fourth address.
Definition: dot11_data.h:127
PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_data.h:343
Dot11Data * clone() const
Clones this PDU.
Definition: dot11_data.h:250
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_data.h:352
Dot11QoSData * clone() const
Clones this PDU.
Definition: dot11_data.h:335
small_uint< 4 > frag_num() const
Getter for the fragment number field.
Definition: dot11_data.h:101