libtins 4.5
|
Base class for all management frames in the IEEE 802.11 protocol. More...
#include <dot11_mgmt.h>
Classes | |
struct | bss_load_type |
class | capability_information |
struct | cf_params_set |
struct | channel_switch_type |
struct | country_params |
struct | dot11_extended_header |
struct | fh_params_set |
struct | fh_pattern_type |
struct | ibss_dfs_params |
struct | quiet_type |
struct | tim_type |
struct | vendor_specific_type |
Public Types | |
enum | ReasonCodes { UNSPECIFIED = 1 , PREV_AUTH_NOT_VALID = 2 , STA_LEAVING_IBSS_ESS = 3 , INACTIVITY = 4 , CANT_HANDLE_STA = 5 , CLASS2_FROM_NO_AUTH = 6 , CLASS3_FROM_NO_AUTH = 7 , STA_LEAVING_BSS = 8 , STA_NOT_AUTH_WITH_STA = 9 , POW_CAP_NOT_VALID = 10 , SUPPORTED_CHANN_NOT_VALID = 11 , INVALID_CONTENT = 13 , MIC_FAIL = 14 , HANDSHAKE_TIMEOUT = 15 , GROUP_KEY_TIMEOUT = 16 , WRONG_HANDSHAKE = 17 , INVALID_GROUP_CIPHER = 18 , INVALID_PAIRWISE_CIPHER = 19 , INVALID_AKMP = 20 , UNSOPPORTED_RSN_VERSION = 21 , INVALID_RSN_CAPABILITIES = 22 , AUTH_FAILED = 23 , CIPHER_SUITE_REJECTED = 24 , UNSPECIFIED_QOS_REASON = 32 , NOT_ENOUGH_BANDWITH = 33 , POOR_CHANNEL = 34 , STA_OUT_OF_LIMITS = 35 , REQUESTED_BY_STA_LEAVING = 36 , REQUESTED_BY_STA_REJECT_MECHANISM = 37 , REQUESTED_BY_STA_REJECT_SETUP = 38 , REQUESTED_BY_STA_TIMEOUT = 39 , PEER_STA_NOT_SUPPORT_CIPHER = 45 } |
Enum used in the reason code field. More... | |
enum | MapMask { BSS = 0x1 , OFDM_PREAMBLE = 0x2 , UNIDENTIFIED_SIGNAL = 0x4 , RADAR = 0x8 , UNMEASURED = 0x10 , RESERVED = 0xE0 } |
Enum that represents the map field within a channels map field. More... | |
typedef std::vector< float > | rates_type |
typedef std::vector< std::pair< uint8_t, uint8_t > > | channels_type |
typedef std::vector< std::pair< uint8_t, uint8_t > > | channel_map_type |
typedef std::vector< uint8_t > | request_info_type |
typedef uint8_t | qos_capability_type |
![]() | |
enum | Types { MANAGEMENT = 0 , CONTROL = 1 , DATA = 2 } |
Enum for the different types of 802.11 frames. | |
enum | OptionTypes { SSID , SUPPORTED_RATES , FH_SET , DS_SET , CF_SET , TIM , IBSS_SET , COUNTRY , HOPPING_PATTERN_PARAMS , HOPPING_PATTERN_TABLE , REQUEST_INFORMATION , BSS_LOAD , EDCA , TSPEC , TCLAS , SCHEDULE , CHALLENGE_TEXT , POWER_CONSTRAINT = 32 , POWER_CAPABILITY , TPC_REQUEST , TPC_REPORT , SUPPORTED_CHANNELS , CHANNEL_SWITCH , MEASUREMENT_REQUEST , MEASUREMENT_REPORT , QUIET , IBSS_DFS , ERP_INFORMATION , TS_DELAY , TCLAS_PROCESSING , HT_CAPABILITY , QOS_CAPABILITY , RSN = 48 , EXT_SUPPORTED_RATES = 50 , AP_CHANNEL_REPORT , NEIGHBOR_REPORT , RCPI , MOBILITY_DOMAIN_MDE , FAST_BSS_TRANSITION_FTE , TIMEOUT_INTERVAL , RIC_DATA_RDE , DSE_REG_LOC , SUPPORTED_OP_CLASSES , EXT_CH_SWITCH_ANNOUNCEMENT , HT_OPERATION , SEC_CH_OFFSET , BSS_AVG_ACCESS_DELAY , ANTENNA , RSNI , MEASUREMENT_PILOT_TRANSMISSION , BSS_AVAIL_ADMISSION_CAPACITY , BSS_AC_ACCESS_DELAY , TIME_ADVERTISEMENT , RM_ENABLED_CAP , MULTIPLE_BSSID , BSS_2040_COEX , BSS_2040_INTOLERANT_CH_REPORT , OVERLAPPING_BSS_SCAN_PARAM , RIC_DESCRIPTOR , MGMT_MIC , EVENT_REQ = 78 , EVENT_REPORT , DIAG_REQ , DIAG_REPORT , LOCATION_PARAMS , NONTRANSMITTED_BSSID_CAP , SSID_LIST , MULTIPLE_BSSID_INDEX , FMS_DESCRIPTOR , FMS_REQ , FMS_RESP , QOS_TRAFFIC_CAP , BSS_MAX_IDLE_PERIOD , TFS_REQ , TFS_RESP , WNM_SLEEP_MODE , TIM_BROADCAST_REQ , TIM_BROADCAST_RESP , COLLOCATED_INTERFERENCE_REPORT , CH_USAGE , TIME_ZONE , DMS_REQ , DMS_RESP , LINK_ID , WAKEUP_SCHEDULE , CH_SWITCH_TIMING , PTI_CONTROL , TPU_BUFFER_STATUS , INTERWORKING , ADVERTISEMENT_PROTOCOL , EXPEDITED_BANDWIDTH_REQ , QOS_MAP , ROAMING_CONSORTIUM , EMERG_ALERT_ID , MESH_CONFIG , MESH_ID , MESH_LINK_METRIC_REPORT , CONGESTION_NOTIFICATION , MESH_PEERING_MGMT , MESH_CH_SWITCH_PARAMS , MESH_AWAKE_WINDOW , BEACON_TIMING , MCCAOP_SETUP_REQ , MCCAOP_SETUP_REPLY , MCCAOP_ADVERTISEMENT , MCCAOP_TEARDOWN , GANN , RANN , EXT_CAP , PREQ = 130 , PREP , PERR , PXU = 137 , PXUC , AUTH_MESH_PEER_EX , MIC , DEST_URI , UAPSD_COEX , DMG_WAKEUP_SCHEDULE , EXT_SCHEDULE , STA_AVAIL , DMG_TSPEC , NEXT_DMG_ATI , DMG_CAP , DMG_OP = 151 , DMG_BSS_PARAM_CHG , DMG_BEAM_REFINEMENT , CH_MEASUREMENT_FEEDBACK , AWAKE_WINDOW = 157 , MULTIBAND , ADDBA_ESXT , NEXTPCP_LIST , PCP_HANDOVER , DMG_LINK_MARGIN , SWITCHING_STREAM , SESSION_TRANSITION , DYNAMIC_TONE_PAIRING_REPORT , CLUSTER_REPORT , RELAY_CAP , RELAY_TRANSFER_PARAM_SET , BEAMLINK_MAINTENANCE , MULTIPLE_MAC_SUBLAYERS , UPID , DMG_LINK_ADAPTATION_ACK , MCCAOP_ADV_OVERVIEW = 174 , QUIET_PERIOD_REQ , QUIET_PERIOD_RESP = 177 , QMF_POLICY = 181 , ECAPC_POLICY = 182 , CLUSTER_TIME_OFFSET , INTRA_ACCESS_CAT_PRIORITY , SCS_DESCRIPTOR , QLOAD_REPORT , HCCA_TXOP_UPDATE_COUNT , HIGHER_LAYER_STREAM_ID , GCR_GROUP_ADDR , ANTENNA_SECTOR_ID_PATTERN , VHT_CAP , VHT_OP , EXT_BSS_LOAD , WIDE_BANDWIDTH_CH_SWITCH , TRANSMIT_POWER_ENVELOPE , CH_SWITCH_WRAPPER , AID , QUIET_CHANNEL , OP_MODE_NOTIFY , UPSIM , REDUCED_NEIGHBOR_REPORT , TVHT_OP , DEV_LOC = 204 , WHITE_SPACE_MAP , FINE_TUNING_MEASUREMENT_PARAMS , VENDOR_SPECIFIC = 221 } |
Enum for the different types of tagged options. | |
enum | ManagementSubtypes { ASSOC_REQ = 0 , ASSOC_RESP = 1 , REASSOC_REQ = 2 , REASSOC_RESP = 3 , PROBE_REQ = 4 , PROBE_RESP = 5 , BEACON = 8 , ATIM = 9 , DISASSOC = 10 , AUTH = 11 , DEAUTH = 12 } |
Enum for the different subtypes of 802.11 management frames. | |
enum | ControlSubtypes { BLOCK_ACK_REQ = 8 , BLOCK_ACK = 9 , PS = 10 , RTS = 11 , CTS = 12 , ACK = 13 , CF_END = 14 , CF_END_ACK = 15 } |
Enum for the different subtypes of 802.11 control frames. | |
enum | DataSubtypes { DATA_DATA = 0 , DATA_CF_ACK = 1 , DATA_CF_POLL = 2 , DATA_CF_ACK_POLL = 3 , DATA_NULL = 4 , CF_ACK = 5 , CF_POLL = 6 , CF_ACK_POLL = 7 , QOS_DATA_DATA = 8 , QOS_DATA_CF_ACK = 9 , QOS_DATA_CF_POLL = 10 , QOS_DATA_CF_ACK_POLL = 11 , QOS_DATA_NULL = 12 } |
Enum fro the different subtypes of 802.11 data frames. | |
typedef HWAddress< 6 > | address_type |
typedef PDUOption< uint8_t, Dot11 > | option |
IEEE 802.11 options struct. | |
typedef std::vector< option > | options_type |
![]() | |
enum | endian_type { BE , LE } |
enum | PDUType { RAW , ETHERNET_II , IEEE802_3 , DOT3 = IEEE802_3 , RADIOTAP , DOT11 , DOT11_ACK , DOT11_ASSOC_REQ , DOT11_ASSOC_RESP , DOT11_AUTH , DOT11_BEACON , DOT11_BLOCK_ACK , DOT11_BLOCK_ACK_REQ , DOT11_CF_END , DOT11_DATA , DOT11_CONTROL , DOT11_DEAUTH , DOT11_DIASSOC , DOT11_END_CF_ACK , DOT11_MANAGEMENT , DOT11_PROBE_REQ , DOT11_PROBE_RESP , DOT11_PS_POLL , DOT11_REASSOC_REQ , DOT11_REASSOC_RESP , DOT11_RTS , DOT11_QOS_DATA , LLC , SNAP , IP , ARP , TCP , UDP , ICMP , BOOTP , DHCP , EAPOL , RC4EAPOL , RSNEAPOL , DNS , LOOPBACK , IPv6 , ICMPv6 , SLL , DHCPv6 , DOT1AD , DOT1Q , PPPOE , STP , PPI , IPSEC_AH , IPSEC_ESP , PKTAP , MPLS , DOT11_CONTROL_TA , VXLAN , UNKNOWN = 999 , USER_DEFINED_PDU = 1000 } |
Enum which identifies each type of PDU. More... | |
typedef byte_array | serialization_type |
Public Member Functions | |
address_type | addr2 () const |
Getter for the second address. | |
address_type | addr3 () const |
Getter for the third address. | |
small_uint< 4 > | frag_num () const |
Getter for the fragment number. | |
small_uint< 12 > | seq_num () const |
Getter for the sequence number field. | |
const address_type & | addr4 () const |
Getter for the fourth address. | |
void | addr2 (const address_type &new_addr2) |
Setter for the second address. | |
void | addr3 (const address_type &new_addr3) |
Setter for the third address. | |
void | frag_num (small_uint< 4 > new_frag_num) |
Setter for the fragment number. | |
void | seq_num (small_uint< 12 > new_seq_num) |
Setter for the sequence number. | |
void | addr4 (const address_type &new_addr4) |
Setter for the fourth address. | |
void | ssid (const std::string &new_ssid) |
Helper method to set the SSID. | |
void | rsn_information (const RSNInformation &info) |
Helper method to set the RSN information option. | |
void | supported_rates (const rates_type &new_rates) |
Helper method to set the supported rates option. | |
void | extended_supported_rates (const rates_type &new_rates) |
Helper method to set the extended supported rates option. | |
void | qos_capability (qos_capability_type new_qos_capability) |
Helper method to set the QoS capabilities option. | |
void | power_capability (uint8_t min_power, uint8_t max_power) |
Helper method to set the power capabilities option. | |
void | supported_channels (const channels_type &new_channels) |
Helper method to set the supported channels option. | |
void | edca_parameter_set (uint32_t ac_be, uint32_t ac_bk, uint32_t ac_vi, uint32_t ac_vo) |
Helper method to set the EDCA Parameter Set. | |
void | request_information (const request_info_type elements) |
Helper method to set the Request Information element tagged option. | |
void | fh_parameter_set (const fh_params_set &fh_params) |
Helper method to set the FH parameter set tagged option. | |
void | ds_parameter_set (uint8_t current_channel) |
Helper method to set the DS parameter tagged option. | |
void | cf_parameter_set (const cf_params_set ¶ms) |
Helper method to set the CF parameter set tagged option. | |
void | ibss_parameter_set (uint16_t atim_window) |
Helper method to set the IBSS parameter set tagged option. | |
void | ibss_dfs (const ibss_dfs_params ¶ms) |
Helper method to set the IBSS DFS tagged option. | |
void | country (const country_params ¶ms) |
Helper method to set the country tagged option. | |
void | fh_parameters (uint8_t prime_radix, uint8_t number_channels) |
Helper method to set the FH parameters set tagged option. | |
void | fh_pattern_table (const fh_pattern_type ¶ms) |
Helper method to set the FH pattern table tagged option. | |
void | power_constraint (uint8_t local_power_constraint) |
Helper method to set the Power Constraint tagged option. | |
void | channel_switch (const channel_switch_type &data) |
Helper method to set the Channel Switch tagged option. | |
void | quiet (const quiet_type &data) |
Helper method to set the Quiet tagged option. | |
void | tpc_report (uint8_t transmit_power, uint8_t link_margin) |
Helper method to set the TPC Report tagged option. | |
void | erp_information (uint8_t value) |
Helper method to set the ERP Information tagged option. | |
void | bss_load (const bss_load_type &data) |
Helper method to set the BSS Load tagged option. | |
void | tim (const tim_type &data) |
Helper method to set the TIM tagged option. | |
void | challenge_text (const std::string &text) |
Helper method to set the Challenge Text tagged option. | |
void | vendor_specific (const vendor_specific_type &data) |
Helper method to add a Vendor Specific tagged option. | |
RSNInformation | rsn_information () const |
Helper method to search for this PDU's rsn information option. | |
std::string | ssid () const |
Helper method to search for this PDU's SSID. | |
rates_type | supported_rates () const |
Helper method to get the supported rates. | |
rates_type | extended_supported_rates () const |
Helper method to get the extended supported rates. | |
qos_capability_type | qos_capability () const |
Helper method to get the QOS capability. | |
std::pair< uint8_t, uint8_t > | power_capability () const |
Helper method to get the power capability. | |
channels_type | supported_channels () const |
Helper method to get the supported channels. | |
request_info_type | request_information () const |
Helper method to get the request information. | |
fh_params_set | fh_parameter_set () const |
Helper method to get the fh parameter set. | |
uint8_t | ds_parameter_set () const |
Helper method to get the DSSS parameter set. | |
cf_params_set | cf_parameter_set () const |
Helper method to get the CF parameter set. | |
uint16_t | ibss_parameter_set () const |
Helper method to get the ibss parameter set. | |
ibss_dfs_params | ibss_dfs () const |
Helper method to get the ibss dfs. | |
country_params | country () const |
Helper method to get the country option. | |
std::pair< uint8_t, uint8_t > | fh_parameters () const |
Helper method to get the fh parameters option. | |
fh_pattern_type | fh_pattern_table () const |
Helper method to get the fh patterns option. | |
uint8_t | power_constraint () const |
Helper method to get the power constraint option. | |
channel_switch_type | channel_switch () const |
Helper method to get the channel switch option. | |
quiet_type | quiet () const |
Helper method to get the quiet option. | |
std::pair< uint8_t, uint8_t > | tpc_report () const |
Helper method to get the tpc report option. | |
uint8_t | erp_information () const |
Helper method to get the erp information option. | |
bss_load_type | bss_load () const |
Helper method to get the bss load option. | |
tim_type | tim () const |
Helper method to get the tim option. | |
std::string | challenge_text () const |
Helper method to get the challenge text option. | |
vendor_specific_type | vendor_specific () const |
Helper method to get a Vendor Specific option. | |
uint32_t | header_size () const |
Returns the 802.11 frame's header length. | |
PDUType | pdu_type () const |
Getter for the PDU's type. | |
bool | matches_flag (PDUType flag) const |
Check whether this PDU matches the specified flag. | |
![]() | |
Dot11 (const address_type &dst_hw_addr=address_type()) | |
Constructs an 802.11 PDU. | |
Dot11 (const uint8_t *buffer, uint32_t total_sz) | |
Constructs 802.11 PDU from a buffer and adds all identifiable PDUs found in the buffer as children of this one. | |
small_uint< 2 > | protocol () const |
Getter for the protocol version field. | |
small_uint< 2 > | type () const |
Getter for the Type field. | |
small_uint< 4 > | subtype () const |
Getter for the Subtype field. | |
small_uint< 1 > | to_ds () const |
Getter for the To-DS field. | |
small_uint< 1 > | from_ds () const |
Getter for the From-DS field. | |
small_uint< 1 > | more_frag () const |
Getter for the More-Frag field. | |
small_uint< 1 > | retry () const |
Getter for the Retry field. | |
small_uint< 1 > | power_mgmt () const |
Getter for the Power-Management field. | |
small_uint< 1 > | more_data () const |
Getter for the More Data field. | |
small_uint< 1 > | wep () const |
Getter for the WEP field. | |
small_uint< 1 > | order () const |
Getter for the Order field. | |
uint16_t | duration_id () const |
Getter for the Duration-ID field. | |
address_type | addr1 () const |
Getter for the first address. | |
void | protocol (small_uint< 2 > new_proto) |
Setter for the protocol version field. | |
void | type (small_uint< 2 > new_type) |
Setter for the type field. | |
void | subtype (small_uint< 4 > new_subtype) |
Setter for the subtype field. | |
void | to_ds (small_uint< 1 > new_value) |
Setter for the To-DS field. | |
void | from_ds (small_uint< 1 > new_value) |
Setter for the From-DS field. | |
void | more_frag (small_uint< 1 > new_value) |
Setter for the More-Frag field. | |
void | retry (small_uint< 1 > new_value) |
Setter for the Retry field. | |
void | power_mgmt (small_uint< 1 > new_value) |
Setter for the Power-Management field. | |
void | more_data (small_uint< 1 > new_value) |
Setter for the More Data field. | |
void | wep (small_uint< 1 > new_value) |
Setter for the WEP field. | |
void | order (small_uint< 1 > new_value) |
Setter for the Order field. | |
void | duration_id (uint16_t new_duration_id) |
Setter for the Duration-ID field. | |
void | addr1 (const address_type &new_addr1) |
Setter for the first address. | |
void | send (PacketSender &sender, const NetworkInterface &iface) |
void | add_option (const option &opt) |
Adds a new option to this Dot11 PDU. | |
void | add_option (option &&opt) |
Adds a new option to this Dot11 PDU. | |
bool | remove_option (OptionTypes type) |
Removes a Dot11 option. | |
const option * | search_option (OptionTypes type) const |
Looks up a tagged option in the option list. | |
Dot11 * | clone () const |
const options_type & | options () const |
Getter for the option list. | |
![]() | |
PDU () | |
Default constructor. | |
PDU (PDU &&rhs) TINS_NOEXCEPT | |
Move constructor. | |
PDU & | operator= (PDU &&rhs) TINS_NOEXCEPT |
Move assignment operator. | |
virtual | ~PDU () |
PDU destructor. | |
virtual uint32_t | trailer_size () const |
Trailer's size. | |
uint32_t | size () const |
The whole chain of PDU's size, including this one. | |
virtual uint32_t | advertised_size () const |
The whole chain of PDU's advertised size, including this one. | |
PDU * | inner_pdu () const |
Getter for the inner PDU. | |
PDU * | parent_pdu () const |
PDU * | release_inner_pdu () |
Releases the inner PDU. | |
void | inner_pdu (PDU *next_pdu) |
Sets the child PDU. | |
void | inner_pdu (const PDU &next_pdu) |
Sets the child PDU. | |
serialization_type | serialize () |
Serializes the whole chain of PDU's, including this one. | |
template<typename T > | |
T * | find_pdu (PDUType type=T::pdu_flag) |
Finds and returns the first PDU that matches the given flag. | |
template<typename T > | |
const T * | find_pdu (PDUType type=T::pdu_flag) const |
Finds and returns the first PDU that matches the given flag. | |
template<typename T > | |
T & | rfind_pdu (PDUType type=T::pdu_flag) |
Finds and returns the first PDU that matches the given flag. | |
template<typename T > | |
const T & | rfind_pdu (PDUType type=T::pdu_flag) const |
Finds and returns the first PDU that matches the given flag. | |
virtual PDU * | recv_response (PacketSender &sender, const NetworkInterface &iface) |
Receives a matching response for this packet. | |
virtual bool | matches_response (const uint8_t *ptr, uint32_t total_sz) const |
Check whether ptr points to a valid response for this PDU. | |
Public Attributes | |
TINS_BEGIN_PACK class Tins::Dot11ManagementFrame::capability_information | TINS_END_PACK |
Static Public Attributes | |
static const PDU::PDUType | pdu_flag = PDU::DOT11_MANAGEMENT |
![]() | |
static const PDU::PDUType | pdu_flag = PDU::DOT11 |
This PDU's flag. | |
static const address_type | BROADCAST = "ff:ff:ff:ff:ff:ff" |
Broadcast hardware address. | |
static const endian_type | endianness = LE |
![]() | |
static const endian_type | endianness = BE |
Protected Member Functions | |
Dot11ManagementFrame (const address_type &dst_hw_addr=address_type(), const address_type &src_hw_addr=address_type()) | |
Dot11ManagementFrame (const uint8_t *buffer, uint32_t total_sz) | |
Constructs a Dot11ManagementFrame object from a buffer and adds all identifiable PDUs found in the buffer as children of this one. | |
void | write_ext_header (Memory::OutputMemoryStream &stream) |
uint32_t | management_frame_size () |
![]() | |
virtual void | write_fixed_parameters (Memory::OutputMemoryStream &stream) |
void | parse_tagged_parameters (Memory::InputMemoryStream &stream) |
void | add_tagged_option (OptionTypes opt, uint8_t len, const uint8_t *val) |
![]() | |
PDU (const PDU &other) | |
Copy constructor. | |
PDU & | operator= (const PDU &other) |
Copy assignment operator. | |
void | copy_inner_pdu (const PDU &pdu) |
Copy other PDU's inner PDU(if any). | |
virtual void | prepare_for_serialize () |
Prepares this PDU for serialization. | |
void | serialize (uint8_t *buffer, uint32_t total_sz) |
Serializes this PDU and propagates this action to child PDUs. | |
Protected Attributes | |
TINS_BEGIN_PACK struct Tins::Dot11ManagementFrame::dot11_extended_header | TINS_END_PACK |
![]() | |
TINS_BEGIN_PACK struct Tins::Dot11::dot11_header | TINS_END_PACK |
Additional Inherited Members | |
![]() | |
static Dot11 * | from_bytes (const uint8_t *buffer, uint32_t total_sz) |
Allocates an Dot11 PDU from a buffer. | |
Base class for all management frames in the IEEE 802.11 protocol.
typedef std::vector<std::pair<uint8_t, uint8_t> > Tins::Dot11ManagementFrame::channel_map_type |
The channel map container type.
typedef std::vector<std::pair<uint8_t, uint8_t> > Tins::Dot11ManagementFrame::channels_type |
The supported channels container type.
The type used to store the QOS capability tagged option data.
typedef std::vector<float> Tins::Dot11ManagementFrame::rates_type |
The supported rates container type.
typedef std::vector<uint8_t> Tins::Dot11ManagementFrame::request_info_type |
The requested information container type.
Enum that represents the map field within a channels map field.
These bitmasks can be used to get or set the second value of ibss_dfs_params().channel_map
Enum used in the reason code field.
This enumeration can be used to get or set the reason code field in a Deauthentication or Disassociation
|
protected |
Constructs a Dot11ManagementFrame object from a buffer and adds all identifiable PDUs found in the buffer as children of this one.
If the next PDU is not recognized, then a RawPDU is used.
If there is not enough size for the header in the buffer or the input data is malformed, a malformed_packet exception is thrown.
buffer | The buffer from which this PDU will be constructed. |
total_sz | The total size of the buffer. |
|
inline |
Getter for the second address.
void Tins::Dot11ManagementFrame::addr2 | ( | const address_type & | new_addr2 | ) |
Setter for the second address.
new_addr2 | The new second address to be set. |
|
inline |
Getter for the third address.
void Tins::Dot11ManagementFrame::addr3 | ( | const address_type & | new_addr3 | ) |
Setter for the third address.
new_addr3 | The new third address to be set. |
|
inline |
Getter for the fourth address.
void Tins::Dot11ManagementFrame::addr4 | ( | const address_type & | new_addr4 | ) |
Setter for the fourth address.
new_addr4 | The new fourth address to be set. |
Dot11ManagementFrame::bss_load_type Tins::Dot11ManagementFrame::bss_load | ( | ) | const |
Helper method to get the bss load option.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::bss_load | ( | const bss_load_type & | data | ) |
Helper method to set the BSS Load tagged option.
data | The value to set in this bss load option. |
Dot11ManagementFrame::cf_params_set Tins::Dot11ManagementFrame::cf_parameter_set | ( | ) | const |
Helper method to get the CF parameter set.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::cf_parameter_set | ( | const cf_params_set & | params | ) |
Helper method to set the CF parameter set tagged option.
params | The new CF parameter set value. |
string Tins::Dot11ManagementFrame::challenge_text | ( | ) | const |
Helper method to get the challenge text option.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the Challenge Text tagged option.
text The challenge text to be added.
Dot11ManagementFrame::channel_switch_type Tins::Dot11ManagementFrame::channel_switch | ( | ) | const |
Helper method to get the channel switch option.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::channel_switch | ( | const channel_switch_type & | data | ) |
Helper method to set the Channel Switch tagged option.
data | The value of the Channel Switch option. |
Dot11ManagementFrame::country_params Tins::Dot11ManagementFrame::country | ( | ) | const |
Helper method to get the country option.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::country | ( | const country_params & | params | ) |
Helper method to set the country tagged option.
params | The data to be used for this country option. |
uint8_t Tins::Dot11ManagementFrame::ds_parameter_set | ( | ) | const |
Helper method to get the DSSS parameter set.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the DS parameter tagged option.
current_channel | The access point's new current channel. |
void Tins::Dot11ManagementFrame::edca_parameter_set | ( | uint32_t | ac_be, |
uint32_t | ac_bk, | ||
uint32_t | ac_vi, | ||
uint32_t | ac_vo | ||
) |
Helper method to set the EDCA Parameter Set.
ac_be | uint32_t with the value of the ac_be field. |
ac_bk | uint32_t with the value of the ac_bk field. |
ac_vi | uint32_t with the value of the ac_vi field. |
ac_vo | uint32_t with the value of the ac_vo field. |
uint8_t Tins::Dot11ManagementFrame::erp_information | ( | ) | const |
Helper method to get the erp information option.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the ERP Information tagged option.
value | The value to set in this erp information option. |
Dot11ManagementFrame::rates_type Tins::Dot11ManagementFrame::extended_supported_rates | ( | ) | const |
Helper method to get the extended supported rates.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::extended_supported_rates | ( | const rates_type & | new_rates | ) |
Helper method to set the extended supported rates option.
new_rates | The new rates to be set. |
Dot11ManagementFrame::fh_params_set Tins::Dot11ManagementFrame::fh_parameter_set | ( | ) | const |
Helper method to get the fh parameter set.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::fh_parameter_set | ( | const fh_params_set & | fh_params | ) |
Helper method to set the FH parameter set tagged option.
fh_params | The new FH parameter set value. |
Helper method to get the fh parameters option.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the FH parameters set tagged option.
prime_radix | The value of the prime radix field. |
number_channels | The value of the number channels field. |
Dot11ManagementFrame::fh_pattern_type Tins::Dot11ManagementFrame::fh_pattern_table | ( | ) | const |
Helper method to get the fh patterns option.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::fh_pattern_table | ( | const fh_pattern_type & | params | ) |
Helper method to set the FH pattern table tagged option.
params | The data to be used for this FH pattern table option. |
|
inline |
Getter for the fragment number.
void Tins::Dot11ManagementFrame::frag_num | ( | small_uint< 4 > | new_frag_num | ) |
Setter for the fragment number.
new_frag_num | The new fragment number. |
|
virtual |
Returns the 802.11 frame's header length.
Reimplemented from Tins::Dot11.
Reimplemented in Tins::Dot11ReAssocRequest, Tins::Dot11ReAssocResponse, and Tins::Dot11ProbeResponse.
Dot11ManagementFrame::ibss_dfs_params Tins::Dot11ManagementFrame::ibss_dfs | ( | ) | const |
Helper method to get the ibss dfs.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::ibss_dfs | ( | const ibss_dfs_params & | params | ) |
Helper method to set the IBSS DFS tagged option.
params | The IBSS DFS data to be set. |
uint16_t Tins::Dot11ManagementFrame::ibss_parameter_set | ( | ) | const |
Helper method to get the ibss parameter set.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the IBSS parameter set tagged option.
atim_window | uint16_t with the value of the ATIM window field. |
Check whether this PDU matches the specified flag.
flag | The flag to match |
Reimplemented from Tins::Dot11.
Reimplemented in Tins::Dot11ReAssocRequest, Tins::Dot11ReAssocResponse, Tins::Dot11ProbeRequest, and Tins::Dot11ProbeResponse.
|
inlinevirtual |
Getter for the PDU's type.
Reimplemented from Tins::Dot11.
Reimplemented in Tins::Dot11ReAssocRequest, Tins::Dot11ReAssocResponse, Tins::Dot11ProbeRequest, and Tins::Dot11ProbeResponse.
Helper method to get the power capability.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the power capabilities option.
min_power | uint8_t indicating the minimum transmiting power capability. |
max_power | uint8_t indicating the maximum transmiting power capability. |
uint8_t Tins::Dot11ManagementFrame::power_constraint | ( | ) | const |
Helper method to get the power constraint option.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the Power Constraint tagged option.
local_power_constraint | The value of the local power constraint field. |
Dot11ManagementFrame::qos_capability_type Tins::Dot11ManagementFrame::qos_capability | ( | ) | const |
Helper method to get the QOS capability.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::qos_capability | ( | qos_capability_type | new_qos_capability | ) |
Helper method to set the QoS capabilities option.
new_qos_capabilities | uint8_t with the capabilities. |
Dot11ManagementFrame::quiet_type Tins::Dot11ManagementFrame::quiet | ( | ) | const |
Helper method to get the quiet option.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::quiet | ( | const quiet_type & | data | ) |
Helper method to set the Quiet tagged option.
data | The value of the quiet count field. |
Dot11ManagementFrame::request_info_type Tins::Dot11ManagementFrame::request_information | ( | ) | const |
Helper method to get the request information.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::request_information | ( | const request_info_type | elements | ) |
Helper method to set the Request Information element tagged option.
elements | The new list of elements. |
RSNInformation Tins::Dot11ManagementFrame::rsn_information | ( | ) | const |
Helper method to search for this PDU's rsn information option.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::rsn_information | ( | const RSNInformation & | info | ) |
Helper method to set the RSN information option.
info | The RSNInformation structure to be set. |
|
inline |
Getter for the sequence number field.
void Tins::Dot11ManagementFrame::seq_num | ( | small_uint< 12 > | new_seq_num | ) |
Setter for the sequence number.
new_seq_num | The new sequence number. |
string Tins::Dot11ManagementFrame::ssid | ( | ) | const |
Helper method to search for this PDU's SSID.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the SSID.
new_ssid | The SSID to be set. |
Dot11ManagementFrame::channels_type Tins::Dot11ManagementFrame::supported_channels | ( | ) | const |
Helper method to get the supported channels.
Each element in the provided vector is a tuple (First channel number, number of channels), as defined in the standard.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::supported_channels | ( | const channels_type & | new_channels | ) |
Helper method to set the supported channels option.
Each element in the provided vector should be a tuple (First channel number, number of channels), as defined in the standard.
new_channels | A list of channels to be set. |
Dot11ManagementFrame::rates_type Tins::Dot11ManagementFrame::supported_rates | ( | ) | const |
Helper method to get the supported rates.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::supported_rates | ( | const rates_type & | new_rates | ) |
Helper method to set the supported rates option.
new_rates | The new rates to be set. |
Dot11ManagementFrame::tim_type Tins::Dot11ManagementFrame::tim | ( | ) | const |
Helper method to get the tim option.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the TIM tagged option.
data The value to set in this tim option.
Helper method to get the tpc report option.
An option_not_found exception is thrown if the option has not been set.
Helper method to set the TPC Report tagged option.
transmit_power | uint8_t with the value of the transmit power field. |
link_margin | uint8_t with the value of the link margin field. |
Dot11ManagementFrame::vendor_specific_type Tins::Dot11ManagementFrame::vendor_specific | ( | ) | const |
Helper method to get a Vendor Specific option.
An option_not_found exception is thrown if the option has not been set.
void Tins::Dot11ManagementFrame::vendor_specific | ( | const vendor_specific_type & | data | ) |
Helper method to add a Vendor Specific tagged option.
text The option to be added.
|
protectedvirtual |
Reimplemented from Tins::Dot11.
|
static |
This PDU's flag.