Deleted Added
full compact
mesh_rsn.h (302408) mesh_rsn.h (337817)
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
9#ifndef MESH_RSN_H
10#define MESH_RSN_H
11
12struct mesh_rsn {
13 struct wpa_supplicant *wpa_s;
14 struct wpa_authenticator *auth;
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
9#ifndef MESH_RSN_H
10#define MESH_RSN_H
11
12struct mesh_rsn {
13 struct wpa_supplicant *wpa_s;
14 struct wpa_authenticator *auth;
15 u8 mgtk[16];
15 unsigned int pairwise_cipher;
16 unsigned int group_cipher;
17 u8 mgtk[WPA_TK_MAX_LEN];
18 size_t mgtk_len;
19 u8 mgtk_key_id;
20 unsigned int mgmt_group_cipher;
21 u8 igtk_key_id;
22 u8 igtk[WPA_TK_MAX_LEN];
23 size_t igtk_len;
16#ifdef CONFIG_SAE
17 struct wpabuf *sae_token;
18 int sae_group_index;
19#endif /* CONFIG_SAE */
20};
21
22struct mesh_rsn * mesh_rsn_auth_init(struct wpa_supplicant *wpa_s,
23 struct mesh_conf *conf);
24int mesh_rsn_auth_sae_sta(struct wpa_supplicant *wpa_s, struct sta_info *sta);
25int mesh_rsn_derive_mtk(struct wpa_supplicant *wpa_s, struct sta_info *sta);
26void mesh_rsn_get_pmkid(struct mesh_rsn *rsn, struct sta_info *sta, u8 *pmkid);
27void mesh_rsn_init_ampe_sta(struct wpa_supplicant *wpa_s,
28 struct sta_info *sta);
29int mesh_rsn_protect_frame(struct mesh_rsn *rsn, struct sta_info *sta,
30 const u8 *cat, struct wpabuf *buf);
31int mesh_rsn_process_ampe(struct wpa_supplicant *wpa_s, struct sta_info *sta,
32 struct ieee802_11_elems *elems, const u8 *cat,
24#ifdef CONFIG_SAE
25 struct wpabuf *sae_token;
26 int sae_group_index;
27#endif /* CONFIG_SAE */
28};
29
30struct mesh_rsn * mesh_rsn_auth_init(struct wpa_supplicant *wpa_s,
31 struct mesh_conf *conf);
32int mesh_rsn_auth_sae_sta(struct wpa_supplicant *wpa_s, struct sta_info *sta);
33int mesh_rsn_derive_mtk(struct wpa_supplicant *wpa_s, struct sta_info *sta);
34void mesh_rsn_get_pmkid(struct mesh_rsn *rsn, struct sta_info *sta, u8 *pmkid);
35void mesh_rsn_init_ampe_sta(struct wpa_supplicant *wpa_s,
36 struct sta_info *sta);
37int mesh_rsn_protect_frame(struct mesh_rsn *rsn, struct sta_info *sta,
38 const u8 *cat, struct wpabuf *buf);
39int mesh_rsn_process_ampe(struct wpa_supplicant *wpa_s, struct sta_info *sta,
40 struct ieee802_11_elems *elems, const u8 *cat,
41 const u8 *chosen_pmk,
33 const u8 *start, size_t elems_len);
34void mesh_auth_timer(void *eloop_ctx, void *user_data);
35
36#endif /* MESH_RSN_H */
42 const u8 *start, size_t elems_len);
43void mesh_auth_timer(void *eloop_ctx, void *user_data);
44
45#endif /* MESH_RSN_H */