libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
#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... | |
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 |
#define AKM_PSK_SHA384 20 /* WPA3 */ |
Definition at line 76 of file security.h.
#define AKM_PSK_SHA384_FT 19 /* WPA3 */ |
Definition at line 75 of file security.h.
#define AKM_SUITE_1X 1 /* WPA1/2 */ |
Definition at line 57 of file security.h.
#define AKM_SUITE_1X_FT 3 /* WPA1/2 */ |
Definition at line 59 of file security.h.
#define AKM_SUITE_1X_FT_SHA384 13 /* WPA3 */ |
Definition at line 69 of file security.h.
#define AKM_SUITE_1X_SHA256 5 /* WPA2 */ |
Definition at line 61 of file security.h.
#define AKM_SUITE_1X_SUITEB_SHA256 11 /* WPA3 */ |
Definition at line 67 of file security.h.
#define AKM_SUITE_1X_SUITEB_SHA384 12 /* WPA3 */ |
Definition at line 68 of file security.h.
#define AKM_SUITE_AP_PEER 10 /* WPA3 */ |
Definition at line 66 of file security.h.
#define AKM_SUITE_FILS_SHA256 14 /* WPA3 */ |
Definition at line 70 of file security.h.
#define AKM_SUITE_FILS_SHA256_FT 16 /* WPA3 */ |
Definition at line 72 of file security.h.
#define AKM_SUITE_FILS_SHA384 15 /* WPA3 */ |
Definition at line 71 of file security.h.
#define AKM_SUITE_FILS_SHA384_FT 17 /* WPA3 */ |
Definition at line 73 of file security.h.
#define AKM_SUITE_OWE 18 /* WPA3 */ |
Definition at line 74 of file security.h.
#define AKM_SUITE_PSK 2 /* WPA1/2 */ |
Definition at line 58 of file security.h.
#define AKM_SUITE_PSK_FT 4 /* WPA2 */ |
Definition at line 60 of file security.h.
#define AKM_SUITE_PSK_SHA256 6 /* WPA2 */ |
Definition at line 62 of file security.h.
#define AKM_SUITE_RESERVED 0 /* WPA1/2 */ |
Definition at line 56 of file security.h.
#define AKM_SUITE_SAE 8 /* WPA3 */ |
Definition at line 64 of file security.h.
#define AKM_SUITE_SAE_FT 9 /* WPA3 */ |
Definition at line 65 of file security.h.
#define AKM_SUITE_TDLS 7 /* WPA2 */ |
Definition at line 63 of file security.h.
#define AUTH_FAST_BSS 2 |
Definition at line 81 of file security.h.
#define AUTH_OPEN 0 |
Definition at line 79 of file security.h.
#define AUTH_SAE 3 |
Definition at line 82 of file security.h.
#define AUTH_SHARED_KEY 1 |
Definition at line 80 of file security.h.
#define AUTH_VENDOR 65535 |
Definition at line 83 of file security.h.
#define CIPHER_SUITE_BIP_CMAC128 6 /* WPA2 */ |
Definition at line 46 of file security.h.
#define CIPHER_SUITE_BIP_CMAC256 13 /* WPA3 */ |
Definition at line 53 of file security.h.
#define CIPHER_SUITE_BIP_GMAC128 11 /* WPA3 */ |
Definition at line 51 of file security.h.
#define CIPHER_SUITE_BIP_GMAC256 12 /* WPA3 */ |
Definition at line 52 of file security.h.
#define CIPHER_SUITE_CCMP128 4 /* WPA2 */ |
Definition at line 44 of file security.h.
#define CIPHER_SUITE_CCMP256 10 /* WPA3 */ |
Definition at line 50 of file security.h.
#define CIPHER_SUITE_GCMP128 8 /* WPA3 */ |
Definition at line 48 of file security.h.
#define CIPHER_SUITE_GCMP256 9 /* WPA3 */ |
Definition at line 49 of file security.h.
#define CIPHER_SUITE_GROUP 0 /* WPA1/2 */ |
Definition at line 40 of file security.h.
#define CIPHER_SUITE_NOTALLOWED 7 /* WPA2 */ |
Definition at line 47 of file security.h.
#define CIPHER_SUITE_OUI "\x00\x0F\xAC" |
Definition at line 32 of file security.h.
#define CIPHER_SUITE_RESERVED 3 /* WPA1/2 */ |
Definition at line 43 of file security.h.
#define CIPHER_SUITE_TKIP 2 /* WPA1/2 */ |
Definition at line 42 of file security.h.
#define CIPHER_SUITE_WEP104 5 /* WEP */ |
Definition at line 45 of file security.h.
#define CIPHER_SUITE_WEP40 1 /* WEP */ |
Definition at line 41 of file security.h.
#define EAPOL_KEY_INFO_M1 0x008A |
Definition at line 22 of file security.h.
#define EAPOL_KEY_INFO_M2 0x010A |
Definition at line 23 of file security.h.
#define EAPOL_KEY_INFO_M3 0x13CA |
Definition at line 24 of file security.h.
#define EAPOL_KEY_INFO_M4 0x030A |
Definition at line 25 of file security.h.
#define LIBWIFI_AKM_PSK_SHA384 (1ULL << 53) |
Definition at line 143 of file security.h.
#define LIBWIFI_AKM_PSK_SHA384_FT (1ULL << 52) |
Definition at line 142 of file security.h.
#define LIBWIFI_AKM_SUITE_1X (1ULL << 33) |
Definition at line 124 of file security.h.
#define LIBWIFI_AKM_SUITE_1X_FT (1ULL << 35) |
Definition at line 126 of file security.h.
#define LIBWIFI_AKM_SUITE_1X_FT_SHA384 (1ULL << 46) |
Definition at line 136 of file security.h.
#define LIBWIFI_AKM_SUITE_1X_SHA256 (1ULL << 37) |
Definition at line 128 of file security.h.
#define LIBWIFI_AKM_SUITE_1X_SUITEB_SHA256 (1ULL << 44) |
Definition at line 134 of file security.h.
#define LIBWIFI_AKM_SUITE_1X_SUITEB_SHA384 (1ULL << 45) |
Definition at line 135 of file security.h.
#define LIBWIFI_AKM_SUITE_AP_PEER (1ULL << 43) |
Definition at line 133 of file security.h.
#define LIBWIFI_AKM_SUITE_FILS_SHA256 (1ULL << 47) |
Definition at line 137 of file security.h.
#define LIBWIFI_AKM_SUITE_FILS_SHA256_FT (1ULL << 49) |
Definition at line 139 of file security.h.
#define LIBWIFI_AKM_SUITE_FILS_SHA384 (1ULL << 48) |
Definition at line 138 of file security.h.
#define LIBWIFI_AKM_SUITE_FILS_SHA384_FT (1ULL << 50) |
Definition at line 140 of file security.h.
#define LIBWIFI_AKM_SUITE_OWE (1ULL << 51) |
Definition at line 141 of file security.h.
#define LIBWIFI_AKM_SUITE_PSK (1ULL << 34) |
Definition at line 125 of file security.h.
#define LIBWIFI_AKM_SUITE_PSK_FT (1ULL << 36) |
Definition at line 127 of file security.h.
#define LIBWIFI_AKM_SUITE_PSK_SHA256 (1ULL << 39) |
Definition at line 129 of file security.h.
#define LIBWIFI_AKM_SUITE_RESERVED (1ULL << 32) |
Definition at line 123 of file security.h.
#define LIBWIFI_AKM_SUITE_SAE (1ULL << 41) |
Definition at line 131 of file security.h.
#define LIBWIFI_AKM_SUITE_SAE_FT (1ULL << 42) |
Definition at line 132 of file security.h.
#define LIBWIFI_AKM_SUITE_TDLS (1ULL << 40) |
Definition at line 130 of file security.h.
#define LIBWIFI_AUTH_FAST_BSS (1ULL << 56) |
Definition at line 148 of file security.h.
#define LIBWIFI_AUTH_OPEN (1ULL << 54) |
Definition at line 146 of file security.h.
#define LIBWIFI_AUTH_SAE (1ULL << 57) |
Definition at line 149 of file security.h.
#define LIBWIFI_AUTH_SHARED_KEY (1ULL << 55) |
Definition at line 147 of file security.h.
#define LIBWIFI_AUTH_VENDOR (1ULL << 58) |
Definition at line 150 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_CMAC128 (1ULL << 10) |
Definition at line 97 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_CMAC256 (1ULL << 17) |
Definition at line 104 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_GMAC128 (1ULL << 15) |
Definition at line 102 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_BIP_GMAC256 (1ULL << 16) |
Definition at line 103 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_CCMP128 (1ULL << 8) |
Definition at line 95 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_CCMP256 (1ULL << 14) |
Definition at line 101 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_GCMP128 (1ULL << 12) |
Definition at line 99 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_GCMP256 (1ULL << 13) |
Definition at line 100 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_NOTALLOWED (1ULL << 11) |
Definition at line 98 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_RESERVED (1ULL << 7) |
Definition at line 94 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_TKIP (1ULL << 6) |
Definition at line 93 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_WEP104 (1ULL << 9) |
Definition at line 96 of file security.h.
#define LIBWIFI_GROUP_CIPHER_SUITE_WEP40 (1ULL << 5) |
Definition at line 92 of file security.h.
#define LIBWIFI_MAX_CIPHER_SUITES 6 |
Definition at line 28 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_CMAC128 (1ULL << 24) |
Definition at line 113 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_CMAC256 (1ULL << 31) |
Definition at line 120 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_GMAC128 (1ULL << 29) |
Definition at line 118 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_BIP_GMAC256 (1ULL << 30) |
Definition at line 119 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_CCMP128 (1ULL << 22) |
Definition at line 111 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_CCMP256 (1ULL << 28) |
Definition at line 117 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_GCMP128 (1ULL << 26) |
Definition at line 115 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_GCMP256 (1ULL << 27) |
Definition at line 116 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_NOTALLOWED (1ULL << 25) |
Definition at line 114 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_RESERVED (1ULL << 21) |
Definition at line 110 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_TKIP (1ULL << 20) |
Definition at line 109 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_WEP104 (1ULL << 23) |
Definition at line 112 of file security.h.
#define LIBWIFI_PAIRWISE_CIPHER_SUITE_WEP40 (1ULL << 19) |
Definition at line 108 of file security.h.
#define LIBWIFI_PAIRWISE_SUITE_GROUP (1ULL << 18) |
Definition at line 107 of file security.h.
#define LIBWIFI_RSN_CAPAB_EXT_KEY_ID (1 << 13) |
Definition at line 161 of file security.h.
#define LIBWIFI_RSN_CAPAB_GTKSA_REPLAY (1 << 4 | 1 << 5) |
Definition at line 156 of file security.h.
#define LIBWIFI_RSN_CAPAB_JOINT_RSNA (1 << 8) |
Definition at line 159 of file security.h.
#define LIBWIFI_RSN_CAPAB_MFP_CAPABLE (1 << 7) |
Definition at line 158 of file security.h.
#define LIBWIFI_RSN_CAPAB_MFP_REQUIRED (1 << 6) |
Definition at line 157 of file security.h.
#define LIBWIFI_RSN_CAPAB_PAIRWISE (1 << 1) |
Definition at line 154 of file security.h.
#define LIBWIFI_RSN_CAPAB_PEERKEY (1 << 9) |
Definition at line 160 of file security.h.
#define LIBWIFI_RSN_CAPAB_PREAUTH (1 << 0) |
Definition at line 153 of file security.h.
#define LIBWIFI_RSN_CAPAB_PTKSA_REPLAY (1 << 2 | 1 << 3) |
Definition at line 155 of file security.h.
#define MICROSOFT_OUI "\x00\x50\xF2" |
Definition at line 31 of file security.h.
#define MICROSOFT_OUI_TYPE_WMM 2 |
Definition at line 36 of file security.h.
#define MICROSOFT_OUI_TYPE_WPA 1 |
Definition at line 35 of file security.h.
#define MICROSOFT_OUI_TYPE_WPS 4 |
Definition at line 37 of file security.h.
#define WEP (1ULL << 1) |
Definition at line 86 of file security.h.
#define WPA (1ULL << 2) |
Definition at line 87 of file security.h.
#define WPA2 (1ULL << 3) |
Definition at line 88 of file security.h.
#define WPA3 (1ULL << 4) |
Definition at line 89 of file security.h.
struct libwifi_cipher_suite __attribute__ | ( | (packed) | ) |
struct libwifi_cipher_suite auth_key_mgmt_suites |
Definition at line 5 of file security.h.
uint8_t descriptor |
Definition at line 3 of file security.h.
struct libwifi_cipher_suite group_cipher_suite |
Definition at line 1 of file security.h.
unsigned char id[8] |
Definition at line 6 of file security.h.
uint16_t information |
Definition at line 0 of file security.h.
unsigned char iv[16] |
Definition at line 4 of file security.h.
unsigned char* key_data |
Definition at line 9 of file security.h.
uint16_t key_data_length |
Definition at line 8 of file security.h.
struct libwifi_wpa_key_info key_info |
Definition at line 4 of file security.h.
uint16_t key_length |
Definition at line 1 of file security.h.
uint16_t length |
Definition at line 2 of file security.h.
unsigned char mic[16] |
Definition at line 7 of file security.h.
struct libwifi_cipher_suite multicast_cipher_suite |
Definition at line 1 of file security.h.
unsigned char nonce[32] |
Definition at line 3 of file security.h.
int num_auth_key_mgmt_suites |
Definition at line 4 of file security.h.
int num_pairwise_cipher_suites |
Definition at line 2 of file security.h.
uint16_t num_unicast_cipher_suites |
Definition at line 2 of file security.h.
unsigned char oui[3] |
Definition at line 0 of file security.h.
struct libwifi_cipher_suite pairwise_cipher_suites[LIBWIFI_MAX_CIPHER_SUITES] |
Definition at line 3 of file security.h.
uint64_t replay_counter |
Definition at line 2 of file security.h.
unsigned char rsc[8] |
Definition at line 5 of file security.h.
uint16_t rsn_capabilities |
Definition at line 6 of file security.h.
uint16_t rsn_version |
Definition at line 0 of file security.h.
uint8_t suite_type |
Definition at line 1 of file security.h.
uint8_t type |
Definition at line 1 of file security.h.
struct libwifi_cipher_suite unicast_cipher_suites[LIBWIFI_MAX_CIPHER_SUITES] |
Definition at line 3 of file security.h.
uint8_t version |
Definition at line 0 of file security.h.
uint16_t wpa_version |
Definition at line 0 of file security.h.