2 * IEEE 802.11 Common routines
3 * Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi>
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
9 #ifndef IEEE802_11_COMMON_H
10 #define IEEE802_11_COMMON_H
12 /* Parsed Information Elements */
13 struct ieee802_11_elems {
20 const u8 *ibss_params;
23 const u8 *ext_supp_rates;
26 const u8 *wmm; /* WMM Information or Parameter Element */
30 const u8 *supp_channels;
33 const u8 *timeout_int;
34 const u8 *ht_capabilities;
35 const u8 *ht_operation;
36 const u8 *vht_capabilities;
37 const u8 *vht_operation;
38 const u8 *vendor_ht_cap;
42 const u8 *interworking;
45 const u8 *bss_max_idle_period;
57 u8 ext_supp_rates_len;
60 u8 wmm_len; /* 7 = WMM Information; 24 = WMM Parameter */
68 u8 ht_capabilities_len;
70 u8 vht_capabilities_len;
81 typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes;
83 ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
84 struct ieee802_11_elems *elems,
86 int ieee802_11_ie_count(const u8 *ies, size_t ies_len);
87 struct wpabuf * ieee802_11_vendor_ie_concat(const u8 *ies, size_t ies_len,
90 const u8 * get_hdr_bssid(const struct ieee80211_hdr *hdr, size_t len);
92 struct hostapd_wmm_ac_params {
96 int txop_limit; /* in units of 32us */
97 int admission_control_mandatory;
100 int hostapd_config_wmm_ac(struct hostapd_wmm_ac_params wmm_ac_params[],
101 const char *name, const char *val);
103 #endif /* IEEE802_11_COMMON_H */