2 * IEEE 802.11 Common routines
3 * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
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.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
15 #ifndef IEEE802_11_COMMON_H
16 #define IEEE802_11_COMMON_H
18 /* Parsed Information Elements */
19 struct ieee802_11_elems
{
26 const u8
*ibss_params
;
29 const u8
*ext_supp_rates
;
32 const u8
*wmm
; /* WMM Information or Parameter Element */
36 const u8
*supp_channels
;
39 const u8
*timeout_int
;
40 const u8
*ht_capabilities
;
41 const u8
*ht_operation
;
42 const u8
*vendor_ht_cap
;
53 u8 ext_supp_rates_len
;
56 u8 wmm_len
; /* 7 = WMM Information; 24 = WMM Parameter */
64 u8 ht_capabilities_len
;
69 typedef enum { ParseOK
= 0, ParseUnknown
= 1, ParseFailed
= -1 } ParseRes
;
71 ParseRes
ieee802_11_parse_elems(const u8
*start
, size_t len
,
72 struct ieee802_11_elems
*elems
,
74 int ieee802_11_ie_count(const u8
*ies
, size_t ies_len
);
75 struct wpabuf
* ieee802_11_vendor_ie_concat(const u8
*ies
, size_t ies_len
,
78 #endif /* IEEE802_11_COMMON_H */