wpa_auth_ie.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * hostapd - WPA/RSN IE and KDE definitions
  3. * Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
  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. #ifndef WPA_AUTH_IE_H
  15. #define WPA_AUTH_IE_H
  16. struct wpa_eapol_ie_parse {
  17. const u8 *wpa_ie;
  18. size_t wpa_ie_len;
  19. const u8 *rsn_ie;
  20. size_t rsn_ie_len;
  21. const u8 *pmkid;
  22. const u8 *gtk;
  23. size_t gtk_len;
  24. const u8 *mac_addr;
  25. size_t mac_addr_len;
  26. #ifdef CONFIG_PEERKEY
  27. const u8 *smk;
  28. size_t smk_len;
  29. const u8 *nonce;
  30. size_t nonce_len;
  31. const u8 *lifetime;
  32. size_t lifetime_len;
  33. const u8 *error;
  34. size_t error_len;
  35. #endif /* CONFIG_PEERKEY */
  36. #ifdef CONFIG_IEEE80211W
  37. const u8 *igtk;
  38. size_t igtk_len;
  39. #endif /* CONFIG_IEEE80211W */
  40. #ifdef CONFIG_IEEE80211R
  41. const u8 *mdie;
  42. size_t mdie_len;
  43. #endif /* CONFIG_IEEE80211R */
  44. };
  45. int wpa_parse_kde_ies(const u8 *buf, size_t len,
  46. struct wpa_eapol_ie_parse *ie);
  47. u8 * wpa_add_kde(u8 *pos, u32 kde, const u8 *data, size_t data_len,
  48. const u8 *data2, size_t data2_len);
  49. int wpa_auth_gen_wpa_ie(struct wpa_authenticator *wpa_auth);
  50. #endif /* WPA_AUTH_IE_H */