17#include "../../core/frame/tag.h"
18#include "../misc/security.h"
41 for (
int i = 0; i <
tag_len; i++) {
42 if (memcmp(&tag_data[i],
"\x00", 1) != 0) {
74 if (rsn_len < min_len) {
78 const unsigned char *rsn_end = rsn_data + rsn_len;
106 switch (vendor_header->
type) {
150 memcpy(&bss->channel, it->
tag_data, 1);
int libwifi_bss_handle_rsn_tag(struct libwifi_bss *bss, const unsigned char *rsn_data, int rsn_len)
Handle the RSN Tagged Parameter.
int libwifi_bss_tag_parser(struct libwifi_bss *bss, struct libwifi_tag_iterator *it)
This function is a parser for common and useful tags found in frames usually originating from the BSS...
int libwifi_sta_tag_parser(struct libwifi_sta *sta, struct libwifi_tag_iterator *it)
This function is a parser for common and useful tags found in frames usually originating from the STA...
void libwifi_handle_ssid_tag(void *target, int target_type, const char *tag_data, int tag_len)
Different implementations can have variations of hidden SSIDs.
int libwifi_bss_handle_msft_tag(struct libwifi_bss *bss, const unsigned char *msft_data, int msft_len)
The Microsoft vendor tag is used to advertise WPA and WPS information, as well as some other features...
#define MICROSOFT_OUI_TYPE_WMM
#define MICROSOFT_OUI_TYPE_WPA
#define MICROSOFT_OUI_TYPE_WPS
void libwifi_enumerate_rsn_suites(struct libwifi_rsn_info *rsn_info, struct libwifi_bss *bss)
This function will enumerate over a supplied struct libwifi_rsn_info and write the following into a s...
int libwifi_get_wpa_info(struct libwifi_wpa_info *info, const unsigned char *tag_data, const unsigned char *tag_end)
Similar to libwifi_get_rsn_info, WPA Information is supplied via the raw tag data.
int libwifi_get_rsn_info(struct libwifi_rsn_info *info, const unsigned char *tag_data, const unsigned char *tag_end)
RSN Information is supplied via the raw tag data.
void libwifi_enumerate_wpa_suites(struct libwifi_wpa_info *wpa_info, struct libwifi_bss *bss)
Similarly to libwifi_enumerate_wpa_suites, this function will enumerate over a supplied struct libwif...
struct libwifi_wpa_info wpa_info
struct libwifi_rsn_info rsn_info
libwifi Representation of a WPA or RSN cipher suite ┌────────────────────────┬────────────┐ │ OUI │ S...
libwifi Representation of a 802.11 RSN Information Element ┌───────────────────────────────────┐ │ Ve...
A libwifi_tag_iterator is used to iterate through a list of tagged parameters in a wifi frame.
struct libwifi_tag_header * tag_header
const unsigned char * tag_data
libwifi Representation of a Microsoft WPA Information Element ┌───────────────────────────────────┐ │...
int libwifi_tag_iterator_next(struct libwifi_tag_iterator *it)
Iterate towards the next tagged parameter in a libwifi tag iterator.