xref: /freebsd/contrib/wpa/wpa_supplicant/ibss_rsn.h (revision e28a4053b110e06768631ac8401ed4a3c05e68a5)
1*e28a4053SRui Paulo /*
2*e28a4053SRui Paulo  * wpa_supplicant - IBSS RSN
3*e28a4053SRui Paulo  * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
4*e28a4053SRui Paulo  *
5*e28a4053SRui Paulo  * This program is free software; you can redistribute it and/or modify
6*e28a4053SRui Paulo  * it under the terms of the GNU General Public License version 2 as
7*e28a4053SRui Paulo  * published by the Free Software Foundation.
8*e28a4053SRui Paulo  *
9*e28a4053SRui Paulo  * Alternatively, this software may be distributed under the terms of BSD
10*e28a4053SRui Paulo  * license.
11*e28a4053SRui Paulo  *
12*e28a4053SRui Paulo  * See README and COPYING for more details.
13*e28a4053SRui Paulo  */
14*e28a4053SRui Paulo 
15*e28a4053SRui Paulo #ifndef IBSS_RSN_H
16*e28a4053SRui Paulo #define IBSS_RSN_H
17*e28a4053SRui Paulo 
18*e28a4053SRui Paulo struct ibss_rsn;
19*e28a4053SRui Paulo 
20*e28a4053SRui Paulo struct ibss_rsn_peer {
21*e28a4053SRui Paulo 	struct ibss_rsn_peer *next;
22*e28a4053SRui Paulo 	struct ibss_rsn *ibss_rsn;
23*e28a4053SRui Paulo 
24*e28a4053SRui Paulo 	u8 addr[ETH_ALEN];
25*e28a4053SRui Paulo 
26*e28a4053SRui Paulo 	struct wpa_sm *supp;
27*e28a4053SRui Paulo 	enum wpa_states supp_state;
28*e28a4053SRui Paulo 	u8 supp_ie[80];
29*e28a4053SRui Paulo 	size_t supp_ie_len;
30*e28a4053SRui Paulo 
31*e28a4053SRui Paulo 	struct wpa_state_machine *auth;
32*e28a4053SRui Paulo };
33*e28a4053SRui Paulo 
34*e28a4053SRui Paulo struct ibss_rsn {
35*e28a4053SRui Paulo 	struct wpa_supplicant *wpa_s;
36*e28a4053SRui Paulo 	struct wpa_authenticator *auth_group;
37*e28a4053SRui Paulo 	struct ibss_rsn_peer *peers;
38*e28a4053SRui Paulo 	u8 psk[PMK_LEN];
39*e28a4053SRui Paulo };
40*e28a4053SRui Paulo 
41*e28a4053SRui Paulo 
42*e28a4053SRui Paulo struct ibss_rsn * ibss_rsn_init(struct wpa_supplicant *wpa_s);
43*e28a4053SRui Paulo void ibss_rsn_deinit(struct ibss_rsn *ibss_rsn);
44*e28a4053SRui Paulo int ibss_rsn_start(struct ibss_rsn *ibss_rsn, const u8 *addr);
45*e28a4053SRui Paulo int ibss_rsn_rx_eapol(struct ibss_rsn *ibss_rsn, const u8 *src_addr,
46*e28a4053SRui Paulo 		      const u8 *buf, size_t len);
47*e28a4053SRui Paulo void ibss_rsn_set_psk(struct ibss_rsn *ibss_rsn, const u8 *psk);
48*e28a4053SRui Paulo 
49*e28a4053SRui Paulo #endif /* IBSS_RSN_H */
50