mesh_rsn.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * WPA Supplicant - Mesh RSN routines
  3. * Copyright (c) 2013-2014, cozybit, Inc. All rights reserved.
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef MESH_RSN_H
  9. #define MESH_RSN_H
  10. struct mesh_rsn {
  11. struct wpa_supplicant *wpa_s;
  12. struct wpa_authenticator *auth;
  13. u8 mgtk[16];
  14. #ifdef CONFIG_SAE
  15. struct wpabuf *sae_token;
  16. int sae_group_index;
  17. #endif /* CONFIG_SAE */
  18. };
  19. struct mesh_rsn * mesh_rsn_auth_init(struct wpa_supplicant *wpa_s,
  20. struct mesh_conf *conf);
  21. int mesh_rsn_auth_sae_sta(struct wpa_supplicant *wpa_s, struct sta_info *sta);
  22. int mesh_rsn_derive_mtk(struct wpa_supplicant *wpa_s, struct sta_info *sta);
  23. void mesh_rsn_get_pmkid(struct mesh_rsn *rsn, struct sta_info *sta, u8 *pmkid);
  24. void mesh_rsn_init_ampe_sta(struct wpa_supplicant *wpa_s,
  25. struct sta_info *sta);
  26. int mesh_rsn_protect_frame(struct mesh_rsn *rsn, struct sta_info *sta,
  27. const u8 *cat, struct wpabuf *buf);
  28. int mesh_rsn_process_ampe(struct wpa_supplicant *wpa_s, struct sta_info *sta,
  29. struct ieee802_11_elems *elems, const u8 *cat,
  30. const u8 *start, size_t elems_len);
  31. void mesh_auth_timer(void *eloop_ctx, void *user_data);
  32. #endif /* MESH_RSN_H */