libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
Go to the source code of this file.
Enumerations | |
enum | WPA_HANDSHAKE_PART { HANDSHAKE_M1 = 1 , HANDSHAKE_M2 = 2 , HANDSHAKE_M3 = 4 , HANDSHAKE_M4 = 8 , HANDSHAKE_INVALID = 16 } |
Functions | |
int | libwifi_check_wpa_handshake (struct libwifi_frame *frame) |
Check if a libwifi_frame contains a WPA1/2 handshake message. More... | |
int | libwifi_check_wpa_message (struct libwifi_frame *frame) |
Check what message of the WPA1/2 handshake is in the given frame. More... | |
const char * | libwifi_get_wpa_message_string (struct libwifi_frame *frame) |
Get a string describing the WPA handshake message inside a supplied libwifi_frame. More... | |
int | libwifi_get_wpa_key_data_length (struct libwifi_frame *frame) |
Get the length of the key data, if any, present at the end of an EAPOL frame. More... | |
int | libwifi_get_wpa_data (struct libwifi_frame *frame, struct libwifi_wpa_auth_data *data) |
Get the EAPOL/WPA information from a given libwifi_frame. More... | |
void | libwifi_free_wpa_data (struct libwifi_wpa_auth_data *data) |
Free any memory allocated inside of a libwifi_wpa_auth data, such as a buffer for WPA key data allocated by the library. More... | |
enum WPA_HANDSHAKE_PART |
int libwifi_check_wpa_handshake | ( | struct libwifi_frame * | frame | ) |
Check if a libwifi_frame contains a WPA1/2 handshake message.
libwifi_frame | A libwifi_frame |
Check if a libwifi_frame contains a WPA1/2 handshake message.
int libwifi_check_wpa_message | ( | struct libwifi_frame * | frame | ) |
Check what message of the WPA1/2 handshake is in the given frame.
The returned value can be used with the WPA_HANDSHAKE_PART enum, such as:
part = libwifi_check_wpa_message(frame); if (part & HANDSHAKE_M1) { // This is EAPOL Message 1 }
libwifi_frame | A libwifi_frame |
void libwifi_free_wpa_data | ( | struct libwifi_wpa_auth_data * | data | ) |
Free any memory allocated inside of a libwifi_wpa_auth data, such as a buffer for WPA key data allocated by the library.
data | A pointer to a libwifi_wpa_auth_data struct |
int libwifi_get_wpa_data | ( | struct libwifi_frame * | frame, |
struct libwifi_wpa_auth_data * | data | ||
) |
Get the EAPOL/WPA information from a given libwifi_frame.
As the values in the frame below and including the logical link control layer will be in network byte order, the values will be automatically byte swapped if necessary to match the host systems byte order.
libwifi_frame | A libwifi_frame |
data | A pointer to a libwifi_wpa_auth_data struct |
int libwifi_get_wpa_key_data_length | ( | struct libwifi_frame * | frame | ) |
Get the length of the key data, if any, present at the end of an EAPOL frame.
libwifi_frame | A libwifi_frame |
const char * libwifi_get_wpa_message_string | ( | struct libwifi_frame * | frame | ) |
Get a string describing the WPA handshake message inside a supplied libwifi_frame.
libwifi_frame | A libwifi_frame |