2008-02-28 02:34:43 +01:00
|
|
|
/*
|
|
|
|
* hostapd - WPA/RSN IE and KDE definitions
|
|
|
|
* Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
|
|
|
|
*
|
2012-02-11 15:46:35 +01:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2008-02-28 02:34:43 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WPA_AUTH_IE_H
|
|
|
|
#define WPA_AUTH_IE_H
|
|
|
|
|
|
|
|
struct wpa_eapol_ie_parse {
|
|
|
|
const u8 *wpa_ie;
|
|
|
|
size_t wpa_ie_len;
|
|
|
|
const u8 *rsn_ie;
|
|
|
|
size_t rsn_ie_len;
|
|
|
|
const u8 *pmkid;
|
|
|
|
const u8 *gtk;
|
|
|
|
size_t gtk_len;
|
|
|
|
const u8 *mac_addr;
|
|
|
|
size_t mac_addr_len;
|
|
|
|
#ifdef CONFIG_PEERKEY
|
|
|
|
const u8 *smk;
|
|
|
|
size_t smk_len;
|
|
|
|
const u8 *nonce;
|
|
|
|
size_t nonce_len;
|
|
|
|
const u8 *lifetime;
|
|
|
|
size_t lifetime_len;
|
|
|
|
const u8 *error;
|
|
|
|
size_t error_len;
|
|
|
|
#endif /* CONFIG_PEERKEY */
|
|
|
|
#ifdef CONFIG_IEEE80211W
|
|
|
|
const u8 *igtk;
|
|
|
|
size_t igtk_len;
|
|
|
|
#endif /* CONFIG_IEEE80211W */
|
2016-10-27 14:18:32 +02:00
|
|
|
#ifdef CONFIG_IEEE80211R_AP
|
2008-02-28 02:34:43 +01:00
|
|
|
const u8 *mdie;
|
|
|
|
size_t mdie_len;
|
2010-04-10 21:40:35 +02:00
|
|
|
const u8 *ftie;
|
|
|
|
size_t ftie_len;
|
2016-10-27 14:18:32 +02:00
|
|
|
#endif /* CONFIG_IEEE80211R_AP */
|
2013-03-16 18:13:31 +01:00
|
|
|
#ifdef CONFIG_P2P
|
|
|
|
const u8 *ip_addr_req;
|
|
|
|
const u8 *ip_addr_alloc;
|
|
|
|
#endif /* CONFIG_P2P */
|
2013-07-23 20:25:21 +02:00
|
|
|
|
|
|
|
const u8 *osen;
|
|
|
|
size_t osen_len;
|
2008-02-28 02:34:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
int wpa_parse_kde_ies(const u8 *buf, size_t len,
|
|
|
|
struct wpa_eapol_ie_parse *ie);
|
|
|
|
u8 * wpa_add_kde(u8 *pos, u32 kde, const u8 *data, size_t data_len,
|
|
|
|
const u8 *data2, size_t data2_len);
|
|
|
|
int wpa_auth_gen_wpa_ie(struct wpa_authenticator *wpa_auth);
|
|
|
|
|
|
|
|
#endif /* WPA_AUTH_IE_H */
|