]> git.ipfire.org Git - thirdparty/hostap.git/blame - src/common/ieee802_11_common.h
RSN IBSS: RX GTK configuration with nl80211
[thirdparty/hostap.git] / src / common / ieee802_11_common.h
CommitLineData
cb7b04c8
JM
1/*
2 * IEEE 802.11 Common routines
ba091c06 3 * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
cb7b04c8
JM
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
11 *
12 * See README and COPYING for more details.
13 */
14
15#ifndef IEEE802_11_COMMON_H
16#define IEEE802_11_COMMON_H
17
18/* Parsed Information Elements */
19struct ieee802_11_elems {
ba091c06
JM
20 const u8 *ssid;
21 const u8 *supp_rates;
22 const u8 *fh_params;
23 const u8 *ds_params;
24 const u8 *cf_params;
25 const u8 *tim;
26 const u8 *ibss_params;
27 const u8 *challenge;
28 const u8 *erp_info;
29 const u8 *ext_supp_rates;
30 const u8 *wpa_ie;
31 const u8 *rsn_ie;
32 const u8 *wmm; /* WMM Information or Parameter Element */
33 const u8 *wmm_tspec;
34 const u8 *wps_ie;
35 const u8 *power_cap;
36 const u8 *supp_channels;
37 const u8 *mdie;
38 const u8 *ftie;
39 const u8 *timeout_int;
40 const u8 *ht_capabilities;
41 const u8 *ht_operation;
42 const u8 *vendor_ht_cap;
91a94645 43 const u8 *p2p;
ba091c06 44
cb7b04c8 45 u8 ssid_len;
cb7b04c8 46 u8 supp_rates_len;
cb7b04c8 47 u8 fh_params_len;
cb7b04c8 48 u8 ds_params_len;
cb7b04c8 49 u8 cf_params_len;
cb7b04c8 50 u8 tim_len;
cb7b04c8 51 u8 ibss_params_len;
cb7b04c8 52 u8 challenge_len;
cb7b04c8 53 u8 erp_info_len;
cb7b04c8 54 u8 ext_supp_rates_len;
cb7b04c8 55 u8 wpa_ie_len;
cb7b04c8 56 u8 rsn_ie_len;
3ae0800c 57 u8 wmm_len; /* 7 = WMM Information; 24 = WMM Parameter */
3ae0800c 58 u8 wmm_tspec_len;
ad08c363 59 u8 wps_ie_len;
cb7b04c8 60 u8 power_cap_len;
cb7b04c8 61 u8 supp_channels_len;
cb7b04c8 62 u8 mdie_len;
cb7b04c8 63 u8 ftie_len;
adddffd1 64 u8 timeout_int_len;
cb7b04c8 65 u8 ht_capabilities_len;
cb7b04c8 66 u8 ht_operation_len;
15828ba8 67 u8 vendor_ht_cap_len;
91a94645 68 u8 p2p_len;
cb7b04c8
JM
69};
70
71typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes;
72
ba091c06 73ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
cb7b04c8
JM
74 struct ieee802_11_elems *elems,
75 int show_errors);
babfbf15 76int ieee802_11_ie_count(const u8 *ies, size_t ies_len);
abad3ccb
JM
77struct wpabuf * ieee802_11_vendor_ie_concat(const u8 *ies, size_t ies_len,
78 u32 oui_type);
cb7b04c8
JM
79
80#endif /* IEEE802_11_COMMON_H */