#include <gpxe/if_ether.h>
#include <endian.h>
Go to the source code of this file.
Data Structures | |
| struct | ieee80211_frame |
| An 802.11 data or management frame without QoS or WDS header fields. More... | |
| struct | ieee80211_llc_snap_header |
| The 802.2 LLC/SNAP header sent before actual data in a data frame. More... | |
| struct | ieee80211_rts |
| 16-byte RTS frame format, with abbreviated header More... | |
| struct | ieee80211_cts_or_ack |
| 10-byte CTS or ACK frame format, with abbreviated header More... | |
| struct | ieee80211_ie_header |
| Generic 802.11 information element header. More... | |
| struct | ieee80211_ie_ssid |
| 802.11 SSID information element More... | |
| struct | ieee80211_ie_rates |
| 802.11 rates information element More... | |
| struct | ieee80211_ie_ds_param |
| 802.11 Direct Spectrum parameter information element More... | |
| struct | ieee80211_ie_country_ext_triplet |
| 802.11 Country information element regulatory extension triplet More... | |
| struct | ieee80211_ie_country_band_triplet |
| 802.11 Country information element regulatory band triplet More... | |
| union | ieee80211_ie_country_triplet |
| 802.11 Country information element regulatory triplet More... | |
| struct | ieee80211_ie_country |
| 802.11 Country information element More... | |
| struct | ieee80211_ie_request |
| 802.11 Request information element More... | |
| struct | ieee80211_ie_challenge_text |
| 802.11 Challenge Text information element More... | |
| struct | ieee80211_ie_power_constraint |
| 802.11 Power Constraint information element More... | |
| struct | ieee80211_ie_power_capab |
| 802.11 Power Capability information element More... | |
| struct | ieee80211_ie_channels_channel_band |
| 802.11 Channels information element channel band tuple More... | |
| struct | ieee80211_ie_channels |
| 802.11 Channels information element More... | |
| struct | ieee80211_ie_erp_info |
| 802.11 ERP Information information element More... | |
| struct | ieee80211_ie_rsn |
| 802.11 Robust Security Network ("WPA") information element More... | |
| struct | ieee80211_ie_vendor |
| 802.11 Vendor Specific information element More... | |
| union | ieee80211_ie |
| Any 802.11 information element. More... | |
| struct | ieee80211_beacon_or_probe_resp |
| Beacon or probe response frame data. More... | |
| struct | ieee80211_disassoc_or_deauth |
| Disassociation or deauthentication frame data. More... | |
| struct | ieee80211_assoc_req |
| Association request frame data. More... | |
| struct | ieee80211_assoc_or_reassoc_resp |
| Association or reassociation response frame data. More... | |
| struct | ieee80211_reassoc_req |
| Reassociation request frame data. More... | |
| struct | ieee80211_probe_req |
| Probe request frame data. More... | |
| struct | ieee80211_auth |
| Authentication frame data. More... | |
Defines | |
| #define | IEEE80211_MAX_DATA_LEN 2304 |
| Maximum length of frame payload. | |
| #define | IEEE80211_LLC_HEADER_LEN 8 |
| Length of LLC/SNAP headers on data frames. | |
| #define | IEEE80211_MAX_CRYPTO_HEADER 8 |
| Maximum cryptographic overhead before encrypted data. | |
| #define | IEEE80211_MAX_CRYPTO_TRAILER 8 |
| Maximum cryptographic overhead after encrypted data. | |
| #define | IEEE80211_MAX_CRYPTO_OVERHEAD 16 |
| Total maximum cryptographic overhead. | |
| #define | IEEE80211_MAX_FRAME_DATA 2296 |
| Bytes of network-layer data that can go into a regular data frame. | |
| #define | IEEE80211_TYP_FRAME_HEADER_LEN 24 |
| Frame header length for frames we might work with. | |
| #define | IEEE80211_MAX_FRAME_HEADER_LEN 32 |
| Theoretical maximum frame header length. | |
| #define | IEEE80211_MAX_FRAME_LEN 2352 |
| Maximum combined frame length. | |
| #define | IEEE80211_MAX_SSID_LEN 32 |
| Maximum length of an ESSID. | |
| #define | IEEE80211_FC_VERSION 0x0003 |
| 802.11 Frame Control field, Version bitmask | |
| #define | IEEE80211_THIS_VERSION 0x0000 |
| Expected value of Version bits in Frame Control. | |
| #define | IEEE80211_FC_TYPE 0x000C |
| 802.11 Frame Control field, Frame Type bitmask | |
| #define | IEEE80211_TYPE_MGMT 0x0000 |
| Type value for management (layer-2) frames. | |
| #define | IEEE80211_TYPE_CTRL 0x0004 |
| Type value for control (layer-1, hardware-managed) frames. | |
| #define | IEEE80211_TYPE_DATA 0x0008 |
| Type value for data frames. | |
| #define | IEEE80211_FC_SUBTYPE 0x00F0 |
| 802.11 Frame Control field, Frame Subtype bitmask | |
| #define | IEEE80211_STYPE_ASSOC_REQ 0x0000 |
| Subtype value for association-request management frames. | |
| #define | IEEE80211_STYPE_ASSOC_RESP 0x0010 |
| Subtype value for association-response management frames. | |
| #define | IEEE80211_STYPE_REASSOC_REQ 0x0020 |
| Subtype value for reassociation-request management frames. | |
| #define | IEEE80211_STYPE_REASSOC_RESP 0x0030 |
| Subtype value for reassociation-response management frames. | |
| #define | IEEE80211_STYPE_PROBE_REQ 0x0040 |
| Subtype value for probe-request management frames. | |
| #define | IEEE80211_STYPE_PROBE_RESP 0x0050 |
| Subtype value for probe-response management frames. | |
| #define | IEEE80211_STYPE_BEACON 0x0080 |
| Subtype value for beacon management frames. | |
| #define | IEEE80211_STYPE_DISASSOC 0x00A0 |
| Subtype value for disassociation management frames. | |
| #define | IEEE80211_STYPE_AUTH 0x00B0 |
| Subtype value for authentication management frames. | |
| #define | IEEE80211_STYPE_DEAUTH 0x00C0 |
| Subtype value for deauthentication management frames. | |
| #define | IEEE80211_STYPE_ACTION 0x00D0 |
| Subtype value for action management frames. | |
| #define | IEEE80211_STYPE_RTS 0x00B0 |
| Subtype value for RTS (request to send) control frames. | |
| #define | IEEE80211_STYPE_CTS 0x00C0 |
| Subtype value for CTS (clear to send) control frames. | |
| #define | IEEE80211_STYPE_ACK 0x00D0 |
| Subtype value for ACK (acknowledgement) control frames. | |
| #define | IEEE80211_STYPE_DATA 0x0000 |
| Subtype value for ordinary data frames, with no QoS or CF add-ons. | |
| #define | IEEE80211_STYPE_NODATA 0x0040 |
| Subtype value for data frames containing no data. | |
| #define | IEEE80211_FC_TODS 0x0100 |
| 802.11 Frame Control field: To Data System flag | |
| #define | IEEE80211_FC_FROMDS 0x0200 |
| 802.11 Frame Control field: From Data System flag | |
| #define | IEEE80211_FC_MORE_FRAG 0x0400 |
| 802.11 Frame Control field: More Fragments flag | |
| #define | IEEE80211_FC_RETRY 0x0800 |
| 802.11 Frame Control field: Retransmission flag | |
| #define | IEEE80211_FC_PWR_MGMT 0x1000 |
| 802.11 Frame Control field: Power Managed flag | |
| #define | IEEE80211_FC_MORE_DATA 0x2000 |
| 802.11 Frame Control field: More Data flag | |
| #define | IEEE80211_FC_PROTECTED 0x4000 |
| 802.11 Frame Control field: Protected flag | |
| #define | IEEE80211_FC_ORDER 0x8000 |
| 802.11 Frame Control field: Ordered flag [?] | |
| #define | IEEE80211_SEQNR(seq) ( ( seq ) >> 4 ) |
| Extract sequence number from 802.11 Sequence Control field. | |
| #define | IEEE80211_FRAG(seq) ( ( seq ) & 0x000F ) |
| Extract fragment number from 802.11 Sequence Control field. | |
| #define | IEEE80211_MAKESEQ(seqnr, frag) ( ( ( ( seqnr ) & 0xFFF ) << 4 ) | ( ( frag ) & 0xF ) ) |
| Make 802.11 Sequence Control field from sequence and fragment numbers. | |
| #define | IEEE80211_LLC_DSAP 0xAA |
| Value for DSAP field in 802.2 LLC header for 802.11 frames: SNAP. | |
| #define | IEEE80211_LLC_SSAP 0xAA |
| Value for SSAP field in 802.2 LLC header for 802.11 frames: SNAP. | |
| #define | IEEE80211_LLC_CTRL 0x03 |
| Value for control field in 802.2 LLC header for 802.11 frames. | |
| #define | IEEE80211_RTS_LEN 16 |
| Length of 802.11 RTS control frame. | |
| #define | ieee80211_cts ieee80211_cts_or_ack |
| #define | ieee80211_ack ieee80211_cts_or_ack |
| #define | IEEE80211_CTS_LEN 10 |
| Length of 802.11 CTS control frame. | |
| #define | IEEE80211_ACK_LEN 10 |
| Length of 802.11 ACK control frame. | |
| #define | IEEE80211_CAPAB_MANAGED 0x0001 |
| Set if using an Access Point (managed mode). | |
| #define | IEEE80211_CAPAB_ADHOC 0x0002 |
| Set if operating in IBSS (no-AP, "Ad-Hoc") mode. | |
| #define | IEEE80211_CAPAB_CFPOLL 0x0004 |
| Set if we support Contention-Free Period operation. | |
| #define | IEEE80211_CAPAB_CFPR 0x0008 |
| Set if we wish to be polled for Contention-Free operation. | |
| #define | IEEE80211_CAPAB_PRIVACY 0x0010 |
| Set if the network is encrypted (by any method). | |
| #define | IEEE80211_CAPAB_SHORT_PMBL 0x0020 |
| Set if PHY supports short preambles on 802.11b. | |
| #define | IEEE80211_CAPAB_PBCC 0x0040 |
| Set if PHY supports PBCC modulation. | |
| #define | IEEE80211_CAPAB_CHAN_AGILITY 0x0080 |
| Set if we support Channel Agility. | |
| #define | IEEE80211_CAPAB_SPECTRUM_MGMT 0x0100 |
| Set if we support spectrum management (DFS and TPC) on the 5GHz band. | |
| #define | IEEE80211_CAPAB_QOS 0x0200 |
| Set if we support Quality of Service enhancements. | |
| #define | IEEE80211_CAPAB_SHORT_SLOT 0x0400 |
| Set if PHY supports short slot time on 802.11g. | |
| #define | IEEE80211_CAPAB_APSD 0x0800 |
| Set if PHY supports APSD option. | |
| #define | IEEE80211_CAPAB_DSSS_OFDM 0x2000 |
| Set if PHY supports DSSS/OFDM modulation (one way of 802.11 b/g mixing). | |
| #define | IEEE80211_CAPAB_DELAYED_BACK 0x4000 |
| Set if we support delayed block ACK. | |
| #define | IEEE80211_CAPAB_IMMED_BACK 0x8000 |
| Set if we support immediate block ACK. | |
| #define | IEEE80211_STATUS_SUCCESS 0 |
| #define | IEEE80211_STATUS_FAILURE 1 |
| #define | IEEE80211_STATUS_CAPAB_UNSUPP 10 |
| #define | IEEE80211_STATUS_REASSOC_INVALID 11 |
| #define | IEEE80211_STATUS_ASSOC_DENIED 12 |
| #define | IEEE80211_STATUS_AUTH_ALGO_UNSUPP 13 |
| #define | IEEE80211_STATUS_AUTH_SEQ_INVALID 14 |
| #define | IEEE80211_STATUS_AUTH_CHALL_INVALID 15 |
| #define | IEEE80211_STATUS_AUTH_TIMEOUT 16 |
| #define | IEEE80211_STATUS_ASSOC_NO_ROOM 17 |
| #define | IEEE80211_STATUS_ASSOC_NEED_RATE 18 |
| #define | IEEE80211_STATUS_ASSOC_NEED_SHORT_PMBL 19 |
| #define | IEEE80211_STATUS_ASSOC_NEED_PBCC 20 |
| #define | IEEE80211_STATUS_ASSOC_NEED_CHAN_AGILITY 21 |
| #define | IEEE80211_STATUS_ASSOC_NEED_SPECTRUM_MGMT 22 |
| #define | IEEE80211_STATUS_ASSOC_BAD_POWER 23 |
| #define | IEEE80211_STATUS_ASSOC_BAD_CHANNELS 24 |
| #define | IEEE80211_STATUS_ASSOC_NEED_SHORT_SLOT 25 |
| #define | IEEE80211_STATUS_ASSOC_NEED_DSSS_OFDM 26 |
| #define | IEEE80211_STATUS_QOS_FAILURE 32 |
| #define | IEEE80211_STATUS_QOS_NO_ROOM 33 |
| #define | IEEE80211_STATUS_LINK_IS_HORRIBLE 34 |
| #define | IEEE80211_STATUS_ASSOC_NEED_QOS 35 |
| #define | IEEE80211_STATUS_REQUEST_DECLINED 37 |
| #define | IEEE80211_STATUS_REQUEST_INVALID 38 |
| #define | IEEE80211_STATUS_TS_NOT_CREATED_AGAIN 39 |
| #define | IEEE80211_STATUS_INVALID_IE 40 |
| #define | IEEE80211_STATUS_GROUP_CIPHER_INVALID 41 |
| #define | IEEE80211_STATUS_PAIR_CIPHER_INVALID 42 |
| #define | IEEE80211_STATUS_AKMP_INVALID 43 |
| #define | IEEE80211_STATUS_RSN_VERSION_UNSUPP 44 |
| #define | IEEE80211_STATUS_RSN_CAPAB_INVALID 45 |
| #define | IEEE80211_STATUS_CIPHER_REJECTED 46 |
| #define | IEEE80211_STATUS_TS_NOT_CREATED_WAIT 47 |
| #define | IEEE80211_STATUS_DIRECT_LINK_FORBIDDEN 48 |
| #define | IEEE80211_STATUS_DEST_NOT_PRESENT 49 |
| #define | IEEE80211_STATUS_DEST_NOT_QOS 50 |
| #define | IEEE80211_STATUS_ASSOC_LISTEN_TOO_HIGH 51 |
| #define | IEEE80211_REASON_NONE 0 |
| #define | IEEE80211_REASON_UNSPECIFIED 1 |
| #define | IEEE80211_REASON_AUTH_NO_LONGER_VALID 2 |
| #define | IEEE80211_REASON_LEAVING 3 |
| #define | IEEE80211_REASON_INACTIVITY 4 |
| #define | IEEE80211_REASON_OUT_OF_RESOURCES 5 |
| #define | IEEE80211_REASON_NEED_AUTH 6 |
| #define | IEEE80211_REASON_NEED_ASSOC 7 |
| #define | IEEE80211_REASON_LEAVING_TO_ROAM 8 |
| #define | IEEE80211_REASON_REASSOC_INVALID 9 |
| #define | IEEE80211_REASON_BAD_POWER 10 |
| #define | IEEE80211_REASON_BAD_CHANNELS 11 |
| #define | IEEE80211_REASON_INVALID_IE 13 |
| #define | IEEE80211_REASON_MIC_FAILURE 14 |
| #define | IEEE80211_REASON_4WAY_TIMEOUT 15 |
| #define | IEEE80211_REASON_GROUPKEY_TIMEOUT 16 |
| #define | IEEE80211_REASON_4WAY_INVALID 17 |
| #define | IEEE80211_REASON_GROUP_CIPHER_INVALID 18 |
| #define | IEEE80211_REASON_PAIR_CIPHER_INVALID 19 |
| #define | IEEE80211_REASON_AKMP_INVALID 20 |
| #define | IEEE80211_REASON_RSN_VERSION_INVALID 21 |
| #define | IEEE80211_REASON_RSN_CAPAB_INVALID 22 |
| #define | IEEE80211_REASON_8021X_FAILURE 23 |
| #define | IEEE80211_REASON_CIPHER_REJECTED 24 |
| #define | IEEE80211_REASON_QOS_UNSPECIFIED 32 |
| #define | IEEE80211_REASON_QOS_OUT_OF_RESOURCES 33 |
| #define | IEEE80211_REASON_LINK_IS_HORRIBLE 34 |
| #define | IEEE80211_REASON_INVALID_TXOP 35 |
| #define | IEEE80211_REASON_REQUESTED_LEAVING 36 |
| #define | IEEE80211_REASON_REQUESTED_NO_USE 37 |
| #define | IEEE80211_REASON_REQUESTED_NEED_SETUP 38 |
| #define | IEEE80211_REASON_REQUESTED_TIMEOUT 39 |
| #define | IEEE80211_REASON_CIPHER_UNSUPPORTED 45 |
| #define | IEEE80211_IE_SSID 0 |
| Information element ID for SSID information element. | |
| #define | IEEE80211_IE_RATES 1 |
| Information element ID for rates information element. | |
| #define | IEEE80211_IE_EXT_RATES 50 |
| Information element ID for extended rates information element. | |
| #define | IEEE80211_IE_DS_PARAM 3 |
| Information element ID for Direct Spectrum parameter information element. | |
| #define | IEEE80211_IE_COUNTRY 7 |
| Information element ID for Country information element. | |
| #define | IEEE80211_IE_REQUEST 10 |
| Information element ID for Request information element. | |
| #define | IEEE80211_IE_CHALLENGE_TEXT 16 |
| Information element ID for Challenge Text information element. | |
| #define | IEEE80211_IE_POWER_CONSTRAINT 52 |
| Information element ID for Power Constraint information element. | |
| #define | IEEE80211_IE_POWER_CAPAB 33 |
| Information element ID for Power Capability information element. | |
| #define | IEEE80211_IE_CHANNELS 36 |
| Information element ID for Channels information element. | |
| #define | IEEE80211_IE_ERP_INFO 42 |
| Information element ID for ERP Information information element. | |
| #define | IEEE80211_ERP_NONERP_PRESENT 0x01 |
| ERP information element: Flag set if 802.11b stations are present. | |
| #define | IEEE80211_ERP_USE_PROTECTION 0x02 |
| ERP information element: Flag set if CTS protection must be used. | |
| #define | IEEE80211_ERP_BARKER_LONG 0x04 |
| ERP information element: Flag set if long preambles must be used. | |
| #define | IEEE80211_IE_RSN 48 |
| Information element ID for Robust Security Network information element. | |
| #define | _MKOUI(a, b, c, t) ( ( ( t ) << 24 ) | ( ( c ) << 16 ) | ( ( b ) << 8 ) | ( a ) ) |
| Make OUI plus type byte into 32-bit integer for easy comparison. | |
| #define | OUI_ORG_MASK 0x00FFFFFF |
| #define | OUI_TYPE_MASK 0xFF000000 |
| #define | IEEE80211_RSN_OUI _MKOUI ( 0x00, 0x0F, 0xAC, 0 ) |
| Organization part for OUIs in standard RSN IE. | |
| #define | IEEE80211_WPA_OUI _MKOUI ( 0x00, 0x50, 0xF2, 0 ) |
| Organization part for OUIs in old WPA IE. | |
| #define | IEEE80211_WPA_OUI_VEN _MKOUI ( 0x00, 0x50, 0xF2, 0x01 ) |
| Old vendor-type WPA IE OUI type + subtype. | |
| #define | IEEE80211_RSN_VERSION 1 |
| 802.11 RSN IE: expected version number | |
| #define | IEEE80211_RSN_CTYPE_WEP40 _MKOUI ( 0, 0, 0, 0x01 ) |
| 802.11 RSN IE: cipher type for 40-bit WEP | |
| #define | IEEE80211_RSN_CTYPE_WEP104 _MKOUI ( 0, 0, 0, 0x05 ) |
| 802.11 RSN IE: cipher type for 104-bit WEP | |
| #define | IEEE80211_RSN_CTYPE_TKIP _MKOUI ( 0, 0, 0, 0x02 ) |
| 802.11 RSN IE: cipher type for TKIP ("WPA") | |
| #define | IEEE80211_RSN_CTYPE_CCMP _MKOUI ( 0, 0, 0, 0x04 ) |
| 802.11 RSN IE: cipher type for CCMP ("WPA2") | |
| #define | IEEE80211_RSN_CTYPE_USEGROUP _MKOUI ( 0, 0, 0, 0x00 ) |
| 802.11 RSN IE: cipher type for "use group" | |
| #define | IEEE80211_RSN_ATYPE_8021X _MKOUI ( 0, 0, 0, 0x01 ) |
| 802.11 RSN IE: auth method type for using an 802.1X server | |
| #define | IEEE80211_RSN_ATYPE_PSK _MKOUI ( 0, 0, 0, 0x02 ) |
| 802.11 RSN IE: auth method type for using a pre-shared key | |
| #define | IEEE80211_RSN_CAPAB_PREAUTH 0x001 |
| 802.11 RSN IE capabilities: AP supports pre-authentication | |
| #define | IEEE80211_RSN_CAPAB_NO_PAIRWISE 0x002 |
| 802.11 RSN IE capabilities: Node has conflict between TKIP and WEP | |
| #define | IEEE80211_RSN_CAPAB_PTKSA_REPLAY 0x00C |
| 802.11 RSN IE capabilities: Number of PTKSA replay counters | |
| #define | IEEE80211_RSN_CAPAB_GTKSA_REPLAY 0x030 |
| 802.11 RSN IE capabilities: Number of GTKSA replay counters | |
| #define | IEEE80211_RSN_CAPAB_PEERKEY 0x200 |
| 802.11 RSN IE capabilities: PeerKey Handshaking is suported | |
| #define | IEEE80211_RSN_1_CTR 0x000 |
| 802.11 RSN IE capabilities: One replay counter | |
| #define | IEEE80211_RSN_2_CTR 0x014 |
| 802.11 RSN IE capabilities: Two replay counters | |
| #define | IEEE80211_RSN_4_CTR 0x028 |
| 802.11 RSN IE capabilities: Four replay counters | |
| #define | IEEE80211_RSN_16_CTR 0x03C |
| 802.11 RSN IE capabilities: 16 replay counters | |
| #define | IEEE80211_IE_VENDOR 221 |
| Information element ID for Vendor Specific information element. | |
| #define | ieee80211_beacon ieee80211_beacon_or_probe_resp |
| #define | ieee80211_probe_resp ieee80211_beacon_or_probe_resp |
| #define | ieee80211_disassoc ieee80211_disassoc_or_deauth |
| #define | ieee80211_deauth ieee80211_disassoc_or_deauth |
| #define | ieee80211_assoc_resp ieee80211_assoc_or_reassoc_resp |
| #define | ieee80211_reassoc_resp ieee80211_assoc_or_reassoc_resp |
| #define | IEEE80211_AUTH_OPEN_SYSTEM 0 |
| Open System authentication algorithm. | |
| #define | IEEE80211_AUTH_SHARED_KEY 1 |
| Shared Key authentication algorithm. | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| static size_t | ieee80211_rsn_size (int npair, int nauth, int npmkid, int rsn_ie) |
| Calculate necessary size of RSN information element. | |
| static int | ieee80211_ie_bound (union ieee80211_ie *ie, void *end) |
| Check that 802.11 information element is bounded by buffer. | |
| static union ieee80211_ie * | ieee80211_next_ie (union ieee80211_ie *ie, void *end) |
| Advance to next 802.11 information element. | |
Variables | |
| struct ieee80211_frame | packed |
| An 802.11 data or management frame without QoS or WDS header fields. | |
Definition in file ieee80211.h.
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
1.5.7.1