]> git.ipfire.org Git - thirdparty/hostap.git/blame - src/common/ieee802_11_common.h
WNM: Add support for SSID List element matching
[thirdparty/hostap.git] / src / common / ieee802_11_common.h
CommitLineData
cb7b04c8
JM
1/*
2 * IEEE 802.11 Common routines
0a66ce3c 3 * Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi>
cb7b04c8 4 *
0f3d578e
JM
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
cb7b04c8
JM
7 */
8
9#ifndef IEEE802_11_COMMON_H
10#define IEEE802_11_COMMON_H
11
12/* Parsed Information Elements */
13struct ieee802_11_elems {
ba091c06
JM
14 const u8 *ssid;
15 const u8 *supp_rates;
16 const u8 *fh_params;
17 const u8 *ds_params;
18 const u8 *cf_params;
19 const u8 *tim;
20 const u8 *ibss_params;
21 const u8 *challenge;
22 const u8 *erp_info;
23 const u8 *ext_supp_rates;
24 const u8 *wpa_ie;
25 const u8 *rsn_ie;
26 const u8 *wmm; /* WMM Information or Parameter Element */
27 const u8 *wmm_tspec;
28 const u8 *wps_ie;
29 const u8 *power_cap;
30 const u8 *supp_channels;
31 const u8 *mdie;
32 const u8 *ftie;
33 const u8 *timeout_int;
34 const u8 *ht_capabilities;
35 const u8 *ht_operation;
74b95d1d
MP
36 const u8 *vht_capabilities;
37 const u8 *vht_operation;
ba091c06 38 const u8 *vendor_ht_cap;
91a94645 39 const u8 *p2p;
9675ce35 40 const u8 *wfd;
b39f5834 41 const u8 *link_id;
538958ae 42 const u8 *interworking;
0b12e961 43 const u8 *hs20;
b6668734
JM
44 const u8 *ext_capab;
45 const u8 *bss_max_idle_period;
0a66ce3c 46 const u8 *ssid_list;
ba091c06 47
cb7b04c8 48 u8 ssid_len;
cb7b04c8 49 u8 supp_rates_len;
cb7b04c8 50 u8 fh_params_len;
cb7b04c8 51 u8 ds_params_len;
cb7b04c8 52 u8 cf_params_len;
cb7b04c8 53 u8 tim_len;
cb7b04c8 54 u8 ibss_params_len;
cb7b04c8 55 u8 challenge_len;
cb7b04c8 56 u8 erp_info_len;
cb7b04c8 57 u8 ext_supp_rates_len;
cb7b04c8 58 u8 wpa_ie_len;
cb7b04c8 59 u8 rsn_ie_len;
3ae0800c 60 u8 wmm_len; /* 7 = WMM Information; 24 = WMM Parameter */
3ae0800c 61 u8 wmm_tspec_len;
ad08c363 62 u8 wps_ie_len;
cb7b04c8 63 u8 power_cap_len;
cb7b04c8 64 u8 supp_channels_len;
cb7b04c8 65 u8 mdie_len;
cb7b04c8 66 u8 ftie_len;
adddffd1 67 u8 timeout_int_len;
cb7b04c8 68 u8 ht_capabilities_len;
cb7b04c8 69 u8 ht_operation_len;
74b95d1d
MP
70 u8 vht_capabilities_len;
71 u8 vht_operation_len;
15828ba8 72 u8 vendor_ht_cap_len;
91a94645 73 u8 p2p_len;
9675ce35 74 u8 wfd_len;
538958ae 75 u8 interworking_len;
0b12e961 76 u8 hs20_len;
b6668734 77 u8 ext_capab_len;
0a66ce3c 78 u8 ssid_list_len;
cb7b04c8
JM
79};
80
81typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes;
82
ba091c06 83ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
cb7b04c8
JM
84 struct ieee802_11_elems *elems,
85 int show_errors);
babfbf15 86int ieee802_11_ie_count(const u8 *ies, size_t ies_len);
abad3ccb
JM
87struct wpabuf * ieee802_11_vendor_ie_concat(const u8 *ies, size_t ies_len,
88 u32 oui_type);
9236ba4c
JB
89struct ieee80211_hdr;
90const u8 * get_hdr_bssid(const struct ieee80211_hdr *hdr, size_t len);
cb7b04c8 91
eda070f1
YD
92struct hostapd_wmm_ac_params {
93 int cwmin;
94 int cwmax;
95 int aifs;
96 int txop_limit; /* in units of 32us */
97 int admission_control_mandatory;
98};
99
100int hostapd_config_wmm_ac(struct hostapd_wmm_ac_params wmm_ac_params[],
101 const char *name, const char *val);
102
cb7b04c8 103#endif /* IEEE802_11_COMMON_H */