libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
security.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  libwifi_cipher_suite
 libwifi Representation of a WPA or RSN cipher suite ┌────────────────────────┬────────────┐ │ OUI │ Suite Type │ ├────────────────────────┼────────────┤ │ 3 Bytes │ 1 Byte │ └────────────────────────┴────────────┘ More...
 
struct  libwifi_wpa_info
 libwifi Representation of a Microsoft WPA Information Element ┌───────────────────────────────────┐ │ Version │ ── 2 Bytes ├───────────────────────────────────┤ │ Multicast Cipher Suite │ ── 4 Bytes ├───────────────────────────────────┤ │ Unicast Cipher Suite Count │ ── 2 Bytes ├───────────────────────────────────┤ │ Unicast Cipher Suites │ ── 4 to 12 Bytes ├───────────────────────────────────┤ │ Auth Key Management Suite Count │ ── 2 Bytes ├───────────────────────────────────┤ │ Auth Key Management Suites │ ── 4 to 12 Bytes └───────────────────────────────────┘ More...
 
struct  libwifi_rsn_info
 libwifi Representation of a 802.11 RSN Information Element ┌───────────────────────────────────┐ │ Version │ ── 2 Bytes ├───────────────────────────────────┤ │ Group Cipher Suite │ ── 4 Bytes ├───────────────────────────────────┤ │ Pairwise Cipher Suite Count │ ── 2 Bytes ├───────────────────────────────────┤ │ Pairwise Cipher Suites │ ── 4 to 12 Bytes ├───────────────────────────────────┤ │ Auth Key Management Suite Count │ ── 2 Bytes ├───────────────────────────────────┤ │ Auth Key Management Suites │ ── 4 to 12 Bytes ├───────────────────────────────────┤ │ RSN Capabilities │ ── 2 Bytes └───────────────────────────────────┘ More...
 
struct  libwifi_wpa_key_info
 
struct  libwifi_wpa_auth_data
 libwifi Representation of the encapsulating 802.1X data in an EAPOL frame ┌─────────────────┐ │ Version │ ── 1 Byte ├─────────────────┤ │ Type │ ── 1 Byte ├─────────────────┤ │ Length │ ── 2 Bytes ├─────────────────┤ │ Descriptor │ ── 1 Byte ├─────────────────┤ │ Key Information │ ── See libwifi_wpa_key_info └─────────────────┘ More...
 

Macros

#define EAPOL_KEY_INFO_M1   0x008A
 
#define EAPOL_KEY_INFO_M2   0x010A
 
#define EAPOL_KEY_INFO_M3   0x13CA
 
#define EAPOL_KEY_INFO_M4   0x030A
 
#define LIBWIFI_MAX_CIPHER_SUITES   6
 
#define MICROSOFT_OUI   "\x00\x50\xF2"
 
#define CIPHER_SUITE_OUI   "\x00\x0F\xAC"
 
#define MICROSOFT_OUI_TYPE_WPA   1
 
#define MICROSOFT_OUI_TYPE_WMM   2
 
#define MICROSOFT_OUI_TYPE_WPS   4
 
#define CIPHER_SUITE_GROUP   0 /* WPA1/2 */
 
#define CIPHER_SUITE_WEP40   1 /* WEP */
 
#define CIPHER_SUITE_TKIP   2 /* WPA1/2 */
 
#define CIPHER_SUITE_RESERVED   3 /* WPA1/2 */
 
#define CIPHER_SUITE_CCMP128   4 /* WPA2 */
 
#define CIPHER_SUITE_WEP104   5 /* WEP */
 
#define CIPHER_SUITE_BIP_CMAC128   6 /* WPA2 */
 
#define CIPHER_SUITE_NOTALLOWED   7 /* WPA2 */
 
#define CIPHER_SUITE_GCMP128   8 /* WPA3 */
 
#define CIPHER_SUITE_GCMP256   9 /* WPA3 */
 
#define CIPHER_SUITE_CCMP256   10 /* WPA3 */
 
#define CIPHER_SUITE_BIP_GMAC128   11 /* WPA3 */
 
#define CIPHER_SUITE_BIP_GMAC256   12 /* WPA3 */
 
#define CIPHER_SUITE_BIP_CMAC256   13 /* WPA3 */
 
#define AKM_SUITE_RESERVED   0 /* WPA1/2 */
 
#define AKM_SUITE_1X   1 /* WPA1/2 */
 
#define AKM_SUITE_PSK   2 /* WPA1/2 */
 
#define AKM_SUITE_1X_FT   3 /* WPA1/2 */
 
#define AKM_SUITE_PSK_FT   4 /* WPA2 */
 
#define AKM_SUITE_1X_SHA256   5 /* WPA2 */
 
#define AKM_SUITE_PSK_SHA256   6 /* WPA2 */
 
#define AKM_SUITE_TDLS   7 /* WPA2 */
 
#define AKM_SUITE_SAE   8 /* WPA3 */
 
#define AKM_SUITE_SAE_FT   9 /* WPA3 */
 
#define AKM_SUITE_AP_PEER   10 /* WPA3 */
 
#define AKM_SUITE_1X_SUITEB_SHA256   11 /* WPA3 */
 
#define AKM_SUITE_1X_SUITEB_SHA384   12 /* WPA3 */
 
#define AKM_SUITE_1X_FT_SHA384   13 /* WPA3 */
 
#define AKM_SUITE_FILS_SHA256   14 /* WPA3 */
 
#define AKM_SUITE_FILS_SHA384   15 /* WPA3 */
 
#define AKM_SUITE_FILS_SHA256_FT   16 /* WPA3 */
 
#define AKM_SUITE_FILS_SHA384_FT   17 /* WPA3 */
 
#define AKM_SUITE_OWE   18 /* WPA3 */
 
#define AKM_PSK_SHA384_FT   19 /* WPA3 */
 
#define AKM_PSK_SHA384   20 /* WPA3 */
 
#define AUTH_OPEN   0
 
#define AUTH_SHARED_KEY   1
 
#define AUTH_FAST_BSS   2
 
#define AUTH_SAE   3
 
#define AUTH_VENDOR   65535
 
#define WEP   (1ULL << 1)
 
#define WPA   (1ULL << 2)
 
#define WPA2   (1ULL << 3)
 
#define WPA3   (1ULL << 4)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_WEP40   (1ULL << 5)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_TKIP   (1ULL << 6)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_RESERVED   (1ULL << 7)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_CCMP128   (1ULL << 8)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_WEP104   (1ULL << 9)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_CMAC128   (1ULL << 10)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_NOTALLOWED   (1ULL << 11)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_GCMP128   (1ULL << 12)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_GCMP256   (1ULL << 13)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_CCMP256   (1ULL << 14)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_GMAC128   (1ULL << 15)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_GMAC256   (1ULL << 16)
 
#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_CMAC256   (1ULL << 17)
 
#define LIBWIFI_PAIRWISE_SUITE_GROUP   (1ULL << 18)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_WEP40   (1ULL << 19)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_TKIP   (1ULL << 20)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_RESERVED   (1ULL << 21)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_CCMP128   (1ULL << 22)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_WEP104   (1ULL << 23)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_CMAC128   (1ULL << 24)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_NOTALLOWED   (1ULL << 25)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_GCMP128   (1ULL << 26)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_GCMP256   (1ULL << 27)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_CCMP256   (1ULL << 28)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_GMAC128   (1ULL << 29)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_GMAC256   (1ULL << 30)
 
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_CMAC256   (1ULL << 31)
 
#define LIBWIFI_AKM_SUITE_RESERVED   (1ULL << 32)
 
#define LIBWIFI_AKM_SUITE_1X   (1ULL << 33)
 
#define LIBWIFI_AKM_SUITE_PSK   (1ULL << 34)
 
#define LIBWIFI_AKM_SUITE_1X_FT   (1ULL << 35)
 
#define LIBWIFI_AKM_SUITE_PSK_FT   (1ULL << 36)
 
#define LIBWIFI_AKM_SUITE_1X_SHA256   (1ULL << 37)
 
#define LIBWIFI_AKM_SUITE_PSK_SHA256   (1ULL << 39)
 
#define LIBWIFI_AKM_SUITE_TDLS   (1ULL << 40)
 
#define LIBWIFI_AKM_SUITE_SAE   (1ULL << 41)
 
#define LIBWIFI_AKM_SUITE_SAE_FT   (1ULL << 42)
 
#define LIBWIFI_AKM_SUITE_AP_PEER   (1ULL << 43)
 
#define LIBWIFI_AKM_SUITE_1X_SUITEB_SHA256   (1ULL << 44)
 
#define LIBWIFI_AKM_SUITE_1X_SUITEB_SHA384   (1ULL << 45)
 
#define LIBWIFI_AKM_SUITE_1X_FT_SHA384   (1ULL << 46)
 
#define LIBWIFI_AKM_SUITE_FILS_SHA256   (1ULL << 47)
 
#define LIBWIFI_AKM_SUITE_FILS_SHA384   (1ULL << 48)
 
#define LIBWIFI_AKM_SUITE_FILS_SHA256_FT   (1ULL << 49)
 
#define LIBWIFI_AKM_SUITE_FILS_SHA384_FT   (1ULL << 50)
 
#define LIBWIFI_AKM_SUITE_OWE   (1ULL << 51)
 
#define LIBWIFI_AKM_PSK_SHA384_FT   (1ULL << 52)
 
#define LIBWIFI_AKM_PSK_SHA384   (1ULL << 53)
 
#define LIBWIFI_AUTH_OPEN   (1ULL << 54)
 
#define LIBWIFI_AUTH_SHARED_KEY   (1ULL << 55)
 
#define LIBWIFI_AUTH_FAST_BSS   (1ULL << 56)
 
#define LIBWIFI_AUTH_SAE   (1ULL << 57)
 
#define LIBWIFI_AUTH_VENDOR   (1ULL << 58)
 
#define LIBWIFI_RSN_CAPAB_PREAUTH   (1 << 0)
 
#define LIBWIFI_RSN_CAPAB_PAIRWISE   (1 << 1)
 
#define LIBWIFI_RSN_CAPAB_PTKSA_REPLAY   (1 << 2 | 1 << 3)
 
#define LIBWIFI_RSN_CAPAB_GTKSA_REPLAY   (1 << 4 | 1 << 5)
 
#define LIBWIFI_RSN_CAPAB_MFP_REQUIRED   (1 << 6)
 
#define LIBWIFI_RSN_CAPAB_MFP_CAPABLE   (1 << 7)
 
#define LIBWIFI_RSN_CAPAB_JOINT_RSNA   (1 << 8)
 
#define LIBWIFI_RSN_CAPAB_PEERKEY   (1 << 9)
 
#define LIBWIFI_RSN_CAPAB_EXT_KEY_ID   (1 << 13)
 

Functions

struct libwifi_cipher_suite __attribute__ ((packed))
 

Variables

unsigned char oui [3]
 
uint8_t suite_type
 
uint16_t wpa_version
 
struct libwifi_cipher_suite multicast_cipher_suite
 
uint16_t num_unicast_cipher_suites
 
struct libwifi_cipher_suite unicast_cipher_suites [LIBWIFI_MAX_CIPHER_SUITES]
 
uint16_t num_auth_key_mgmt_suites
 
struct libwifi_cipher_suite auth_key_mgmt_suites [LIBWIFI_MAX_CIPHER_SUITES]
 
uint16_t rsn_version
 
struct libwifi_cipher_suite group_cipher_suite
 
int num_pairwise_cipher_suites
 
struct libwifi_cipher_suite pairwise_cipher_suites [LIBWIFI_MAX_CIPHER_SUITES]
 
uint16_t rsn_capabilities
 
uint16_t information
 
uint16_t key_length
 
uint64_t replay_counter
 
unsigned char nonce [32]
 
unsigned char iv [16]
 
unsigned char rsc [8]
 
unsigned char id [8]
 
unsigned char mic [16]
 
uint16_t key_data_length
 
unsigned char * key_data
 
uint8_t version
 
uint8_t type
 
uint16_t length
 
uint8_t descriptor
 
struct libwifi_wpa_key_info key_info
 

Macro Definition Documentation

◆ AKM_PSK_SHA384

#define AKM_PSK_SHA384   20 /* WPA3 */

Definition at line 76 of file security.h.

◆ AKM_PSK_SHA384_FT

#define AKM_PSK_SHA384_FT   19 /* WPA3 */

Definition at line 75 of file security.h.

◆ AKM_SUITE_1X

#define AKM_SUITE_1X   1 /* WPA1/2 */

Definition at line 57 of file security.h.

◆ AKM_SUITE_1X_FT

#define AKM_SUITE_1X_FT   3 /* WPA1/2 */

Definition at line 59 of file security.h.

◆ AKM_SUITE_1X_FT_SHA384

#define AKM_SUITE_1X_FT_SHA384   13 /* WPA3 */

Definition at line 69 of file security.h.

◆ AKM_SUITE_1X_SHA256

#define AKM_SUITE_1X_SHA256   5 /* WPA2 */

Definition at line 61 of file security.h.

◆ AKM_SUITE_1X_SUITEB_SHA256

#define AKM_SUITE_1X_SUITEB_SHA256   11 /* WPA3 */

Definition at line 67 of file security.h.

◆ AKM_SUITE_1X_SUITEB_SHA384

#define AKM_SUITE_1X_SUITEB_SHA384   12 /* WPA3 */

Definition at line 68 of file security.h.

◆ AKM_SUITE_AP_PEER

#define AKM_SUITE_AP_PEER   10 /* WPA3 */

Definition at line 66 of file security.h.

◆ AKM_SUITE_FILS_SHA256

#define AKM_SUITE_FILS_SHA256   14 /* WPA3 */

Definition at line 70 of file security.h.

◆ AKM_SUITE_FILS_SHA256_FT

#define AKM_SUITE_FILS_SHA256_FT   16 /* WPA3 */

Definition at line 72 of file security.h.

◆ AKM_SUITE_FILS_SHA384

#define AKM_SUITE_FILS_SHA384   15 /* WPA3 */

Definition at line 71 of file security.h.

◆ AKM_SUITE_FILS_SHA384_FT

#define AKM_SUITE_FILS_SHA384_FT   17 /* WPA3 */

Definition at line 73 of file security.h.

◆ AKM_SUITE_OWE

#define AKM_SUITE_OWE   18 /* WPA3 */

Definition at line 74 of file security.h.

◆ AKM_SUITE_PSK

#define AKM_SUITE_PSK   2 /* WPA1/2 */

Definition at line 58 of file security.h.

◆ AKM_SUITE_PSK_FT

#define AKM_SUITE_PSK_FT   4 /* WPA2 */

Definition at line 60 of file security.h.

◆ AKM_SUITE_PSK_SHA256

#define AKM_SUITE_PSK_SHA256   6 /* WPA2 */

Definition at line 62 of file security.h.

◆ AKM_SUITE_RESERVED

#define AKM_SUITE_RESERVED   0 /* WPA1/2 */

Definition at line 56 of file security.h.

◆ AKM_SUITE_SAE

#define AKM_SUITE_SAE   8 /* WPA3 */

Definition at line 64 of file security.h.

◆ AKM_SUITE_SAE_FT

#define AKM_SUITE_SAE_FT   9 /* WPA3 */

Definition at line 65 of file security.h.

◆ AKM_SUITE_TDLS

#define AKM_SUITE_TDLS   7 /* WPA2 */

Definition at line 63 of file security.h.

◆ AUTH_FAST_BSS

#define AUTH_FAST_BSS   2

Definition at line 81 of file security.h.

◆ AUTH_OPEN

#define AUTH_OPEN   0

Definition at line 79 of file security.h.

◆ AUTH_SAE

#define AUTH_SAE   3

Definition at line 82 of file security.h.

◆ AUTH_SHARED_KEY

#define AUTH_SHARED_KEY   1

Definition at line 80 of file security.h.

◆ AUTH_VENDOR

#define AUTH_VENDOR   65535

Definition at line 83 of file security.h.

◆ CIPHER_SUITE_BIP_CMAC128

#define CIPHER_SUITE_BIP_CMAC128   6 /* WPA2 */

Definition at line 46 of file security.h.

◆ CIPHER_SUITE_BIP_CMAC256

#define CIPHER_SUITE_BIP_CMAC256   13 /* WPA3 */

Definition at line 53 of file security.h.

◆ CIPHER_SUITE_BIP_GMAC128

#define CIPHER_SUITE_BIP_GMAC128   11 /* WPA3 */

Definition at line 51 of file security.h.

◆ CIPHER_SUITE_BIP_GMAC256

#define CIPHER_SUITE_BIP_GMAC256   12 /* WPA3 */

Definition at line 52 of file security.h.

◆ CIPHER_SUITE_CCMP128

#define CIPHER_SUITE_CCMP128   4 /* WPA2 */

Definition at line 44 of file security.h.

◆ CIPHER_SUITE_CCMP256

#define CIPHER_SUITE_CCMP256   10 /* WPA3 */

Definition at line 50 of file security.h.

◆ CIPHER_SUITE_GCMP128

#define CIPHER_SUITE_GCMP128   8 /* WPA3 */

Definition at line 48 of file security.h.

◆ CIPHER_SUITE_GCMP256

#define CIPHER_SUITE_GCMP256   9 /* WPA3 */

Definition at line 49 of file security.h.

◆ CIPHER_SUITE_GROUP

#define CIPHER_SUITE_GROUP   0 /* WPA1/2 */

Definition at line 40 of file security.h.

◆ CIPHER_SUITE_NOTALLOWED

#define CIPHER_SUITE_NOTALLOWED   7 /* WPA2 */

Definition at line 47 of file security.h.

◆ CIPHER_SUITE_OUI

#define CIPHER_SUITE_OUI   "\x00\x0F\xAC"

Definition at line 32 of file security.h.

◆ CIPHER_SUITE_RESERVED

#define CIPHER_SUITE_RESERVED   3 /* WPA1/2 */

Definition at line 43 of file security.h.

◆ CIPHER_SUITE_TKIP

#define CIPHER_SUITE_TKIP   2 /* WPA1/2 */

Definition at line 42 of file security.h.

◆ CIPHER_SUITE_WEP104

#define CIPHER_SUITE_WEP104   5 /* WEP */

Definition at line 45 of file security.h.

◆ CIPHER_SUITE_WEP40

#define CIPHER_SUITE_WEP40   1 /* WEP */

Definition at line 41 of file security.h.

◆ EAPOL_KEY_INFO_M1

#define EAPOL_KEY_INFO_M1   0x008A

Definition at line 22 of file security.h.

◆ EAPOL_KEY_INFO_M2

#define EAPOL_KEY_INFO_M2   0x010A

Definition at line 23 of file security.h.

◆ EAPOL_KEY_INFO_M3

#define EAPOL_KEY_INFO_M3   0x13CA

Definition at line 24 of file security.h.

◆ EAPOL_KEY_INFO_M4

#define EAPOL_KEY_INFO_M4   0x030A

Definition at line 25 of file security.h.

◆ LIBWIFI_AKM_PSK_SHA384

#define LIBWIFI_AKM_PSK_SHA384   (1ULL << 53)

Definition at line 143 of file security.h.

◆ LIBWIFI_AKM_PSK_SHA384_FT

#define LIBWIFI_AKM_PSK_SHA384_FT   (1ULL << 52)

Definition at line 142 of file security.h.

◆ LIBWIFI_AKM_SUITE_1X

#define LIBWIFI_AKM_SUITE_1X   (1ULL << 33)

Definition at line 124 of file security.h.

◆ LIBWIFI_AKM_SUITE_1X_FT

#define LIBWIFI_AKM_SUITE_1X_FT   (1ULL << 35)

Definition at line 126 of file security.h.

◆ LIBWIFI_AKM_SUITE_1X_FT_SHA384

#define LIBWIFI_AKM_SUITE_1X_FT_SHA384   (1ULL << 46)

Definition at line 136 of file security.h.

◆ LIBWIFI_AKM_SUITE_1X_SHA256

#define LIBWIFI_AKM_SUITE_1X_SHA256   (1ULL << 37)

Definition at line 128 of file security.h.

◆ LIBWIFI_AKM_SUITE_1X_SUITEB_SHA256

#define LIBWIFI_AKM_SUITE_1X_SUITEB_SHA256   (1ULL << 44)

Definition at line 134 of file security.h.

◆ LIBWIFI_AKM_SUITE_1X_SUITEB_SHA384

#define LIBWIFI_AKM_SUITE_1X_SUITEB_SHA384   (1ULL << 45)

Definition at line 135 of file security.h.

◆ LIBWIFI_AKM_SUITE_AP_PEER

#define LIBWIFI_AKM_SUITE_AP_PEER   (1ULL << 43)

Definition at line 133 of file security.h.

◆ LIBWIFI_AKM_SUITE_FILS_SHA256

#define LIBWIFI_AKM_SUITE_FILS_SHA256   (1ULL << 47)

Definition at line 137 of file security.h.

◆ LIBWIFI_AKM_SUITE_FILS_SHA256_FT

#define LIBWIFI_AKM_SUITE_FILS_SHA256_FT   (1ULL << 49)

Definition at line 139 of file security.h.

◆ LIBWIFI_AKM_SUITE_FILS_SHA384

#define LIBWIFI_AKM_SUITE_FILS_SHA384   (1ULL << 48)

Definition at line 138 of file security.h.

◆ LIBWIFI_AKM_SUITE_FILS_SHA384_FT

#define LIBWIFI_AKM_SUITE_FILS_SHA384_FT   (1ULL << 50)

Definition at line 140 of file security.h.

◆ LIBWIFI_AKM_SUITE_OWE

#define LIBWIFI_AKM_SUITE_OWE   (1ULL << 51)

Definition at line 141 of file security.h.

◆ LIBWIFI_AKM_SUITE_PSK

#define LIBWIFI_AKM_SUITE_PSK   (1ULL << 34)

Definition at line 125 of file security.h.

◆ LIBWIFI_AKM_SUITE_PSK_FT

#define LIBWIFI_AKM_SUITE_PSK_FT   (1ULL << 36)

Definition at line 127 of file security.h.

◆ LIBWIFI_AKM_SUITE_PSK_SHA256

#define LIBWIFI_AKM_SUITE_PSK_SHA256   (1ULL << 39)

Definition at line 129 of file security.h.

◆ LIBWIFI_AKM_SUITE_RESERVED

#define LIBWIFI_AKM_SUITE_RESERVED   (1ULL << 32)

Definition at line 123 of file security.h.

◆ LIBWIFI_AKM_SUITE_SAE

#define LIBWIFI_AKM_SUITE_SAE   (1ULL << 41)

Definition at line 131 of file security.h.

◆ LIBWIFI_AKM_SUITE_SAE_FT

#define LIBWIFI_AKM_SUITE_SAE_FT   (1ULL << 42)

Definition at line 132 of file security.h.

◆ LIBWIFI_AKM_SUITE_TDLS

#define LIBWIFI_AKM_SUITE_TDLS   (1ULL << 40)

Definition at line 130 of file security.h.

◆ LIBWIFI_AUTH_FAST_BSS

#define LIBWIFI_AUTH_FAST_BSS   (1ULL << 56)

Definition at line 148 of file security.h.

◆ LIBWIFI_AUTH_OPEN

#define LIBWIFI_AUTH_OPEN   (1ULL << 54)

Definition at line 146 of file security.h.

◆ LIBWIFI_AUTH_SAE

#define LIBWIFI_AUTH_SAE   (1ULL << 57)

Definition at line 149 of file security.h.

◆ LIBWIFI_AUTH_SHARED_KEY

#define LIBWIFI_AUTH_SHARED_KEY   (1ULL << 55)

Definition at line 147 of file security.h.

◆ LIBWIFI_AUTH_VENDOR

#define LIBWIFI_AUTH_VENDOR   (1ULL << 58)

Definition at line 150 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_BIP_CMAC128

#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_CMAC128   (1ULL << 10)

Definition at line 97 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_BIP_CMAC256

#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_CMAC256   (1ULL << 17)

Definition at line 104 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_BIP_GMAC128

#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_GMAC128   (1ULL << 15)

Definition at line 102 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_BIP_GMAC256

#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_GMAC256   (1ULL << 16)

Definition at line 103 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_CCMP128

#define LIBWIFI_GROUP_CIPHER_SUITE_CCMP128   (1ULL << 8)

Definition at line 95 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_CCMP256

#define LIBWIFI_GROUP_CIPHER_SUITE_CCMP256   (1ULL << 14)

Definition at line 101 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_GCMP128

#define LIBWIFI_GROUP_CIPHER_SUITE_GCMP128   (1ULL << 12)

Definition at line 99 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_GCMP256

#define LIBWIFI_GROUP_CIPHER_SUITE_GCMP256   (1ULL << 13)

Definition at line 100 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_NOTALLOWED

#define LIBWIFI_GROUP_CIPHER_SUITE_NOTALLOWED   (1ULL << 11)

Definition at line 98 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_RESERVED

#define LIBWIFI_GROUP_CIPHER_SUITE_RESERVED   (1ULL << 7)

Definition at line 94 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_TKIP

#define LIBWIFI_GROUP_CIPHER_SUITE_TKIP   (1ULL << 6)

Definition at line 93 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_WEP104

#define LIBWIFI_GROUP_CIPHER_SUITE_WEP104   (1ULL << 9)

Definition at line 96 of file security.h.

◆ LIBWIFI_GROUP_CIPHER_SUITE_WEP40

#define LIBWIFI_GROUP_CIPHER_SUITE_WEP40   (1ULL << 5)

Definition at line 92 of file security.h.

◆ LIBWIFI_MAX_CIPHER_SUITES

#define LIBWIFI_MAX_CIPHER_SUITES   6

Definition at line 28 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_CMAC128

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_CMAC128   (1ULL << 24)

Definition at line 113 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_CMAC256

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_CMAC256   (1ULL << 31)

Definition at line 120 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_GMAC128

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_GMAC128   (1ULL << 29)

Definition at line 118 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_GMAC256

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_GMAC256   (1ULL << 30)

Definition at line 119 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_CCMP128

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_CCMP128   (1ULL << 22)

Definition at line 111 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_CCMP256

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_CCMP256   (1ULL << 28)

Definition at line 117 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_GCMP128

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_GCMP128   (1ULL << 26)

Definition at line 115 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_GCMP256

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_GCMP256   (1ULL << 27)

Definition at line 116 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_NOTALLOWED

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_NOTALLOWED   (1ULL << 25)

Definition at line 114 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_RESERVED

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_RESERVED   (1ULL << 21)

Definition at line 110 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_TKIP

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_TKIP   (1ULL << 20)

Definition at line 109 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_WEP104

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_WEP104   (1ULL << 23)

Definition at line 112 of file security.h.

◆ LIBWIFI_PAIRWISE_CIPHER_SUITE_WEP40

#define LIBWIFI_PAIRWISE_CIPHER_SUITE_WEP40   (1ULL << 19)

Definition at line 108 of file security.h.

◆ LIBWIFI_PAIRWISE_SUITE_GROUP

#define LIBWIFI_PAIRWISE_SUITE_GROUP   (1ULL << 18)

Definition at line 107 of file security.h.

◆ LIBWIFI_RSN_CAPAB_EXT_KEY_ID

#define LIBWIFI_RSN_CAPAB_EXT_KEY_ID   (1 << 13)

Definition at line 161 of file security.h.

◆ LIBWIFI_RSN_CAPAB_GTKSA_REPLAY

#define LIBWIFI_RSN_CAPAB_GTKSA_REPLAY   (1 << 4 | 1 << 5)

Definition at line 156 of file security.h.

◆ LIBWIFI_RSN_CAPAB_JOINT_RSNA

#define LIBWIFI_RSN_CAPAB_JOINT_RSNA   (1 << 8)

Definition at line 159 of file security.h.

◆ LIBWIFI_RSN_CAPAB_MFP_CAPABLE

#define LIBWIFI_RSN_CAPAB_MFP_CAPABLE   (1 << 7)

Definition at line 158 of file security.h.

◆ LIBWIFI_RSN_CAPAB_MFP_REQUIRED

#define LIBWIFI_RSN_CAPAB_MFP_REQUIRED   (1 << 6)

Definition at line 157 of file security.h.

◆ LIBWIFI_RSN_CAPAB_PAIRWISE

#define LIBWIFI_RSN_CAPAB_PAIRWISE   (1 << 1)

Definition at line 154 of file security.h.

◆ LIBWIFI_RSN_CAPAB_PEERKEY

#define LIBWIFI_RSN_CAPAB_PEERKEY   (1 << 9)

Definition at line 160 of file security.h.

◆ LIBWIFI_RSN_CAPAB_PREAUTH

#define LIBWIFI_RSN_CAPAB_PREAUTH   (1 << 0)

Definition at line 153 of file security.h.

◆ LIBWIFI_RSN_CAPAB_PTKSA_REPLAY

#define LIBWIFI_RSN_CAPAB_PTKSA_REPLAY   (1 << 2 | 1 << 3)

Definition at line 155 of file security.h.

◆ MICROSOFT_OUI

#define MICROSOFT_OUI   "\x00\x50\xF2"

Definition at line 31 of file security.h.

◆ MICROSOFT_OUI_TYPE_WMM

#define MICROSOFT_OUI_TYPE_WMM   2

Definition at line 36 of file security.h.

◆ MICROSOFT_OUI_TYPE_WPA

#define MICROSOFT_OUI_TYPE_WPA   1

Definition at line 35 of file security.h.

◆ MICROSOFT_OUI_TYPE_WPS

#define MICROSOFT_OUI_TYPE_WPS   4

Definition at line 37 of file security.h.

◆ WEP

#define WEP   (1ULL << 1)

Definition at line 86 of file security.h.

◆ WPA

#define WPA   (1ULL << 2)

Definition at line 87 of file security.h.

◆ WPA2

#define WPA2   (1ULL << 3)

Definition at line 88 of file security.h.

◆ WPA3

#define WPA3   (1ULL << 4)

Definition at line 89 of file security.h.

Function Documentation

◆ __attribute__()

struct libwifi_cipher_suite __attribute__ ( (packed)  )

Variable Documentation

◆ auth_key_mgmt_suites

struct libwifi_cipher_suite auth_key_mgmt_suites

Definition at line 5 of file security.h.

◆ descriptor

uint8_t descriptor

Definition at line 3 of file security.h.

◆ group_cipher_suite

struct libwifi_cipher_suite group_cipher_suite

Definition at line 1 of file security.h.

◆ id

unsigned char id[8]

Definition at line 6 of file security.h.

◆ information

uint16_t information

Definition at line 0 of file security.h.

◆ iv

unsigned char iv[16]

Definition at line 4 of file security.h.

◆ key_data

unsigned char* key_data

Definition at line 9 of file security.h.

◆ key_data_length

uint16_t key_data_length

Definition at line 8 of file security.h.

◆ key_info

struct libwifi_wpa_key_info key_info

Definition at line 4 of file security.h.

◆ key_length

uint16_t key_length

Definition at line 1 of file security.h.

◆ length

uint16_t length

Definition at line 2 of file security.h.

◆ mic

unsigned char mic[16]

Definition at line 7 of file security.h.

◆ multicast_cipher_suite

struct libwifi_cipher_suite multicast_cipher_suite

Definition at line 1 of file security.h.

◆ nonce

unsigned char nonce[32]

Definition at line 3 of file security.h.

◆ num_auth_key_mgmt_suites

int num_auth_key_mgmt_suites

Definition at line 4 of file security.h.

◆ num_pairwise_cipher_suites

int num_pairwise_cipher_suites

Definition at line 2 of file security.h.

◆ num_unicast_cipher_suites

uint16_t num_unicast_cipher_suites

Definition at line 2 of file security.h.

◆ oui

unsigned char oui[3]

Definition at line 0 of file security.h.

◆ pairwise_cipher_suites

struct libwifi_cipher_suite pairwise_cipher_suites[LIBWIFI_MAX_CIPHER_SUITES]

Definition at line 3 of file security.h.

◆ replay_counter

uint64_t replay_counter

Definition at line 2 of file security.h.

◆ rsc

unsigned char rsc[8]

Definition at line 5 of file security.h.

◆ rsn_capabilities

uint16_t rsn_capabilities

Definition at line 6 of file security.h.

◆ rsn_version

uint16_t rsn_version

Definition at line 0 of file security.h.

◆ suite_type

uint8_t suite_type

Definition at line 1 of file security.h.

◆ type

uint8_t type

Definition at line 1 of file security.h.

◆ unicast_cipher_suites

struct libwifi_cipher_suite unicast_cipher_suites[LIBWIFI_MAX_CIPHER_SUITES]

Definition at line 3 of file security.h.

◆ version

uint8_t version

Definition at line 0 of file security.h.

◆ wpa_version

uint16_t wpa_version

Definition at line 0 of file security.h.