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