wpa_ie.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * wpa_supplicant - 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_IE_H
  15. #define WPA_IE_H
  16. struct wpa_sm;
  17. struct wpa_eapol_ie_parse {
  18. const u8 *wpa_ie;
  19. size_t wpa_ie_len;
  20. const u8 *rsn_ie;
  21. size_t rsn_ie_len;
  22. const u8 *pmkid;
  23. const u8 *gtk;
  24. size_t gtk_len;
  25. const u8 *mac_addr;
  26. size_t mac_addr_len;
  27. #ifdef CONFIG_PEERKEY
  28. const u8 *smk;
  29. size_t smk_len;
  30. const u8 *nonce;
  31. size_t nonce_len;
  32. const u8 *lifetime;
  33. size_t lifetime_len;
  34. const u8 *error;
  35. size_t error_len;
  36. #endif /* CONFIG_PEERKEY */
  37. #ifdef CONFIG_IEEE80211W
  38. const u8 *igtk;
  39. size_t igtk_len;
  40. #endif /* CONFIG_IEEE80211W */
  41. const u8 *mdie;
  42. size_t mdie_len;
  43. const u8 *ftie;
  44. size_t ftie_len;
  45. const u8 *reassoc_deadline;
  46. const u8 *key_lifetime;
  47. const u8 *lnkid;
  48. size_t lnkid_len;
  49. const u8 *ext_capab;
  50. size_t ext_capab_len;
  51. const u8 *supp_rates;
  52. size_t supp_rates_len;
  53. const u8 *ext_supp_rates;
  54. size_t ext_supp_rates_len;
  55. };
  56. int wpa_supplicant_parse_ies(const u8 *buf, size_t len,
  57. struct wpa_eapol_ie_parse *ie);
  58. int wpa_gen_wpa_ie(struct wpa_sm *sm, u8 *wpa_ie, size_t wpa_ie_len);
  59. #endif /* WPA_IE_H */