30 #include <tins/config.h> 32 #if !defined(TINS_RADIOTAP_H) && defined(TINS_HAVE_DOT11) 33 #define TINS_RADIOTAP_H 35 #include <tins/macros.h> 37 #include <tins/endianness.h> 38 #include <tins/pdu_option.h> 61 static const endian_type endianness = LE;
94 LOCK_QUALITY = 1 << 7,
95 TX_ATTENUATION = 1 << 8,
96 DB_TX_ATTENUATION = 1 << 9,
97 DBM_TX_ATTENUATION = 1 << 10,
103 DATA_RETRIES = 1 << 17,
105 CHANNEL_PLUS = 1 << 18,
169 RadioTap(
const uint8_t* buffer, uint32_t total_sz);
184 void version(uint8_t new_version);
190 void padding(uint8_t new_padding);
196 void length(uint16_t new_length);
202 void tsft(uint64_t new_tsft);
214 void rate(uint8_t new_rate);
221 void channel(uint16_t new_freq, uint16_t new_type);
227 void dbm_signal(int8_t new_dbm_signal);
233 void dbm_noise(int8_t new_dbm_noise);
239 void signal_quality(uint8_t new_signal_quality);
245 void antenna(uint8_t new_antenna);
251 void db_signal(uint8_t new_db_signal);
257 void rx_flags(uint16_t new_rx_flag);
263 void tx_flags(uint16_t new_tx_flag);
275 void data_retries(uint8_t new_data_retries);
289 uint8_t version()
const;
295 uint8_t padding()
const;
301 uint16_t length()
const;
307 uint64_t tsft()
const;
319 uint8_t rate()
const;
325 uint16_t channel_freq()
const;
331 uint16_t channel_type()
const;
337 int8_t dbm_signal()
const;
343 int8_t dbm_noise()
const;
349 uint16_t signal_quality()
const;
355 uint8_t antenna()
const;
361 uint8_t db_signal()
const;
373 uint8_t data_retries()
const;
379 uint16_t rx_flags()
const;
385 uint16_t tx_flags()
const;
410 bool matches_response(
const uint8_t* ptr, uint32_t total_sz)
const;
418 uint32_t header_size()
const;
424 uint32_t trailer_size()
const;
431 void add_option(
const option& opt);
440 const options_payload_type& options_payload()
const;
458 struct radiotap_header {
459 #if TINS_IS_LITTLE_ENDIAN 465 #endif // TINS_IS_LITTLE_ENDIAN 469 void write_serialization(uint8_t* buffer, uint32_t total_sz);
472 radiotap_header header_;
473 options_payload_type options_payload_;
477 #endif // TINS_RADIOTAP_H The type used to represent the MCS flags field.
Definition: radiotap.h:127
PDUType
Enum which identifies each type of PDU.
Definition: pdu.h:127
PresentFlags
Flags used in the present field.
Definition: radiotap.h:85
Sends packets through a network interface.
Definition: packet_sender.h:116
Represents a PDU option field.
Definition: pdu_option.h:201
PDUType pdu_type() const
Getter for the PDU's type.
Definition: radiotap.h:453
FrameFlags
Flags used in the RadioTap::flags() method.
Definition: radiotap.h:112
ChannelType
Enumeration of the different channel type flags.
Definition: radiotap.h:69
Class that represents the IEEE 802.11 radio tap header.
Definition: radiotap.h:51
The Tins namespace.
Definition: address_range.h:38
The type used to represent the XChannel field.
Definition: radiotap.h:137
Abstraction of a network interface.
Definition: network_interface.h:47
RadioTap * clone() const
Definition: radiotap.h:445
PDUOption< RadioTap::PresentFlags, RadioTap > option
Definition: radiotap.h:147
std::vector< uint8_t > options_payload_type
Definition: radiotap.h:152
Base class for protocol data units.
Definition: pdu.h:107