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_PEERKEY 23 const u8 *smk; 24 size_t smk_len; 25 const u8 *nonce; 26 size_t nonce_len; 27 const u8 *lifetime; 28 size_t lifetime_len; 29 const u8 *error; 30 size_t error_len; 31 #endif /* CONFIG_PEERKEY */ 32 #ifdef CONFIG_IEEE80211W 33 const u8 *igtk; 34 size_t igtk_len; 35 #endif /* CONFIG_IEEE80211W */ 36 #ifdef CONFIG_IEEE80211R 37 const u8 *mdie; 38 size_t mdie_len; 39 const u8 *ftie; 40 size_t ftie_len; 41 #endif /* CONFIG_IEEE80211R */ 42 }; 43 44 int wpa_parse_kde_ies(const u8 *buf, size_t len, 45 struct wpa_eapol_ie_parse *ie); 46 u8 * wpa_add_kde(u8 *pos, u32 kde, const u8 *data, size_t data_len, 47 const u8 *data2, size_t data2_len); 48 int wpa_auth_gen_wpa_ie(struct wpa_authenticator *wpa_auth); 49 50 #endif /* WPA_AUTH_IE_H */ 51