libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
#include "../../core/frame/management/common.h"
#include "../../core/frame/tag_iterator.h"
#include "../../core/misc/security.h"
Go to the source code of this file.
Functions | |
void | libwifi_handle_ssid_tag (void *target, int target_type, const char *ssid, int ssid_len) |
A helper function to set the SSID of a libwifi_bss, as well as check if it is hidden or not. More... | |
int | libwifi_bss_handle_rsn_tag (struct libwifi_bss *bss, const unsigned char *rsn_data, int rsn_len) |
A helper function to handle the parsing of the RSN IE. More... | |
int | libwifi_bss_handle_msft_tag (struct libwifi_bss *bss, const unsigned char *msft_data, int msft_len) |
A helper function to handle the parsing of the Microsoft Vendor IE. More... | |
int | libwifi_bss_tag_parser (struct libwifi_bss *bss, struct libwifi_tag_iterator *it) |
A helper function to iterate through common tags found in a libwifi_bss. More... | |
int | libwifi_sta_tag_parser (struct libwifi_sta *sta, struct libwifi_tag_iterator *it) |
A helper function to iterate through common tags found in a libwifi_sta. More... | |
int libwifi_bss_handle_msft_tag | ( | struct libwifi_bss * | bss, |
const unsigned char * | msft_data, | ||
int | msft_len | ||
) |
A helper function to handle the parsing of the Microsoft Vendor IE.
bss | A libwifi_bss |
msft_data | The Microsoft vendor tag data |
msft_len | The length of the Microsoft tag data |
A helper function to handle the parsing of the Microsoft Vendor IE.
The difference between the tags is found via the "Vendor Specific OUI Type" field. A common representation of this is XX:XX:XX:YY, such as 00:50:F2:04, where 00:50:F2 is the Microsoft OUI and 04 is the type.
It is important to skip the OUI and Type as described above before parsing the data of the tag. This is encapsulated with the libwifi_tag_vendor_header struct.
int libwifi_bss_handle_rsn_tag | ( | struct libwifi_bss * | bss, |
const unsigned char * | rsn_data, | ||
int | rsn_len | ||
) |
A helper function to handle the parsing of the RSN IE.
bss | A libwifi_bss |
rsn_data | The RSN tag data |
rsn_len | The length of the RSN tag data |
A helper function to handle the parsing of the RSN IE.
At the minimum, the required RSN data is the version and the group cipher suites. RSN information is then enumerated within the libwifi_get_rsn_info() function.
int libwifi_bss_tag_parser | ( | struct libwifi_bss * | bss, |
struct libwifi_tag_iterator * | it | ||
) |
A helper function to iterate through common tags found in a libwifi_bss.
bss | A libwifi_bss |
it | A libwifi_tag_iterator |
A helper function to iterate through common tags found in a libwifi_bss.
These include the SSID and DS or HT fields, which can be used to determine the channel.
void libwifi_handle_ssid_tag | ( | void * | target, |
int | target_type, | ||
const char * | tag_data, | ||
int | tag_len | ||
) |
A helper function to set the SSID of a libwifi_bss, as well as check if it is hidden or not.
target | A libwifi_bss or libwifi_sta |
target_type | LIBWIFI_BSS or LIBWIFI_STA |
ssid | The SSID to set |
ssid_len | The length of the supplied SSID |
A helper function to set the SSID of a libwifi_bss, as well as check if it is hidden or not.
It is common to simply set the SSID to an empty string, but some devices may "blank" the real SSID without reducing the character count.
Example: "My-SSID" -> "\x00\x00\x00\x00\x00\x00\x00"
int libwifi_sta_tag_parser | ( | struct libwifi_sta * | sta, |
struct libwifi_tag_iterator * | it | ||
) |
A helper function to iterate through common tags found in a libwifi_sta.
sta | A libwifi_sta |
it | A libwifi_tag_iterator |
A helper function to iterate through common tags found in a libwifi_sta.
These include the SSID and DS or HT fields, which can be used to determine the channel.