1 /*
2  * hostapd - WPA/RSN IE and KDE definitions
3  * Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef WPA_AUTH_IE_H
10 #define WPA_AUTH_IE_H
11 
12 struct wpa_eapol_ie_parse {
13 	const u8 *wpa_ie;
14 	size_t wpa_ie_len;
15 	const u8 *rsn_ie;
16 	size_t rsn_ie_len;
17 	const u8 *pmkid;
18 	const u8 *gtk;
19 	size_t gtk_len;
20 	const u8 *mac_addr;
21 	size_t mac_addr_len;
22 #ifdef CONFIG_IEEE80211W
23 	const u8 *igtk;
24 	size_t igtk_len;
25 #endif /* CONFIG_IEEE80211W */
26 #ifdef CONFIG_IEEE80211R
27 	const u8 *mdie;
28 	size_t mdie_len;
29 	const u8 *ftie;
30 	size_t ftie_len;
31 #endif /* CONFIG_IEEE80211R */
32 	const u8 *rsnxe;
33 	size_t rsnxe_len;
34 };
35 
36 int wpa_parse_kde_ies(const u8 *buf, size_t len,
37 		      struct wpa_eapol_ie_parse *ie);
38 u8 * wpa_add_kde(u8 *pos, u32 kde, const u8 *data, size_t data_len,
39 		 const u8 *data2, size_t data2_len);
40 int wpa_auth_gen_wpa_ie(struct wpa_authenticator *wpa_auth);
41 
42 #endif /* WPA_AUTH_IE_H */
43