30 #include <tins/config.h> 32 #if !defined(TINS_DOT11_DOT11_CONTROL_H) && defined(TINS_HAVE_DOT11) 34 #define TINS_DOT11_DOT11_CONTROL_H 36 #include <tins/dot11/dot11_base.h> 37 #include <tins/macros.h> 111 void target_addr(
const address_type& addr);
123 const address_type& target_addr = address_type());
147 uint32_t header_size()
const;
153 return static_cast<uint32_t
>(taddr_.size() +
sizeof(
dot11_header));
156 void write_ext_header(Memory::OutputMemoryStream& stream);
197 Dot11RTS(
const uint8_t* buffer, uint32_t total_sz);
259 Dot11PSPoll(
const uint8_t* buffer, uint32_t total_sz);
321 Dot11CFEnd(
const uint8_t* buffer, uint32_t total_sz);
443 Dot11Ack(
const uint8_t* buffer, uint32_t total_sz);
517 #if TINS_IS_LITTLE_ENDIAN 518 return bar_control_ & 0xf;
520 return (bar_control_ >> 8) & 0xf;
529 #if TINS_IS_LITTLE_ENDIAN 530 return (start_sequence_ >> 4) & 0xfff;
532 return (Endian::le_to_host<uint16_t>(start_sequence_) >> 4) & 0xfff;
541 #if TINS_IS_LITTLE_ENDIAN 542 return start_sequence_ & 0xf;
544 return (start_sequence_ >> 8) & 0xf;
554 uint32_t header_size()
const;
602 void write_ext_header(Memory::OutputMemoryStream& stream);
604 uint16_t bar_control_;
605 uint16_t start_sequence_;
621 static const size_t bitmap_size = 8;
658 #if TINS_IS_LITTLE_ENDIAN 659 return bar_control_ & 0xf;
661 return (bar_control_ >> 8) & 0xf;
670 #if TINS_IS_LITTLE_ENDIAN 671 return (start_sequence_ >> 4) & 0xfff;
673 return (Endian::le_to_host<uint16_t>(start_sequence_) >> 4) & 0xfff;
682 #if TINS_IS_LITTLE_ENDIAN 683 return start_sequence_ & 0xf;
685 return (start_sequence_ >> 8) & 0xf;
695 uint32_t header_size()
const;
732 void bitmap(
const uint8_t* bit);
760 void write_ext_header(Memory::OutputMemoryStream& stream);
762 uint16_t bar_control_, start_sequence_;
763 uint8_t bitmap_[bitmap_size];
768 #endif // TINS_DOT11_DOT11_CONTROL_H PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_control.h:458
address_type target_addr() const
Getter for the target address field.
Definition: dot11_control.h:103
Dot11BlockAckRequest * clone() const
Clones this PDU.
Definition: dot11_control.h:581
small_uint< 4 > bar_control() const
Getter for the bar control field.
Definition: dot11_control.h:516
Dot11RTS * clone() const
Clones this PDU.
Definition: dot11_control.h:204
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_control.h:345
Class representing an 802.11 frame.
Definition: dot11_base.h:54
PDUType
Enum which identifies each type of PDU.
Definition: pdu.h:127
PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_control.h:738
Dot11Ack * clone() const
Clones this PDU.
Definition: dot11_control.h:450
Dot11BlockAck * clone() const
Clones this PDU.
Definition: dot11_control.h:756
uint32_t controlta_size() const
Getter for the control ta additional fields size.
Definition: dot11_control.h:152
Class that represents an 802.11 block ack frame.
Definition: dot11_control.h:611
PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_control.h:398
const uint8_t * bitmap() const
Getter for the bitmap field.
Definition: dot11_control.h:724
small_uint< 4 > fragment_number() const
Getter for the fragment number field.
Definition: dot11_control.h:681
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_control.h:283
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_control.h:89
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_control.h:407
Class that represents an abstraction of the 802.11 control frames that contain a target address...
Definition: dot11_control.h:98
small_uint< 12 > start_sequence() const
Getter for the start sequence field.
Definition: dot11_control.h:528
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_control.h:467
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_base.h:497
small_uint< 4 > fragment_number() const
Getter for the fragment number field.
Definition: dot11_control.h:540
PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_control.h:274
PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_control.h:589
Represents an IEEE 802.11 control frame.
Definition: dot11_control.h:43
small_uint< 12 > start_sequence() const
Getter for the start sequence field.
Definition: dot11_control.h:669
PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_control.h:336
Dot11PSPoll * clone() const
Clones this PDU.
Definition: dot11_control.h:266
The Tins namespace.
Definition: address_range.h:38
IEEE 802.11 RTS frame.
Definition: dot11_control.h:165
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_control.h:221
PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_control.h:212
Dot11EndCFAck * clone() const
Clones this PDU.
Definition: dot11_control.h:390
small_uint< 4 > bar_control() const
Getter for the bar control field.
Definition: dot11_control.h:657
Class that represents an 802.11 Block Ack Request PDU.
Definition: dot11_control.h:475
Definition: dot11_control.h:412
PDUType pdu_type() const
Getter for the PDU's type.
Definition: dot11_control.h:80
Definition: dot11_control.h:350
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_control.h:598
bool matches_flag(PDUType flag) const
Check whether this PDU matches the specified flag.
Definition: dot11_control.h:747
Definition: dot11_control.h:226
Dot11CFEnd * clone() const
Clones this PDU.
Definition: dot11_control.h:328
Definition: dot11_control.h:288