wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ibss_rsn.h
Go to the documentation of this file.
1 
5 #ifndef IBSS_RSN_H
6 #define IBSS_RSN_H
7 
8 struct ibss_rsn;
9 
10 /* not authenticated */
11 #define IBSS_RSN_AUTH_NOT_AUTHENTICATED 0x00
12 /* remote peer sent an EAPOL message */
13 #define IBSS_RSN_AUTH_EAPOL_BY_PEER 0x01
14 /* we sent an AUTH message with seq 1 */
15 #define IBSS_RSN_AUTH_BY_US 0x02
16 /* we sent an EAPOL message */
17 #define IBSS_RSN_AUTH_EAPOL_BY_US 0x04
18 /* PTK derived as supplicant */
19 #define IBSS_RSN_SET_PTK_SUPP 0x08
20 /* PTK derived as authenticator */
21 #define IBSS_RSN_SET_PTK_AUTH 0x10
22 /* PTK completion reported */
23 #define IBSS_RSN_REPORTED_PTK 0x20
24 
25 struct ibss_rsn_peer {
26  struct ibss_rsn_peer *next;
27  struct ibss_rsn *ibss_rsn;
28 
29  u8 addr[ETH_ALEN];
30 
31  struct wpa_sm *supp;
32  enum wpa_states supp_state;
33  u8 supp_ie[80];
34  size_t supp_ie_len;
35 
36  struct wpa_state_machine *auth;
37  int authentication_status;
38 
39  struct os_reltime own_auth_tx;
40 };
41 
42 struct ibss_rsn {
43  struct wpa_supplicant *wpa_s;
44  struct wpa_authenticator *auth_group;
45  struct ibss_rsn_peer *peers;
46  u8 psk[PMK_LEN];
47 };
48 
49 
50 struct ibss_rsn * ibss_rsn_init(struct wpa_supplicant *wpa_s);
51 void ibss_rsn_deinit(struct ibss_rsn *ibss_rsn);
52 int ibss_rsn_start(struct ibss_rsn *ibss_rsn, const u8 *addr);
53 void ibss_rsn_stop(struct ibss_rsn *ibss_rsn, const u8 *peermac);
54 int ibss_rsn_rx_eapol(struct ibss_rsn *ibss_rsn, const u8 *src_addr,
55  const u8 *buf, size_t len);
56 void ibss_rsn_set_psk(struct ibss_rsn *ibss_rsn, const u8 *psk);
57 void ibss_rsn_handle_auth(struct ibss_rsn *ibss_rsn, const u8 *auth_frame,
58  size_t len);
59 
60 #endif /* IBSS_RSN_H */
Definition: wpa_auth_i.h:20
Definition: ibss_rsn.h:25
wpa_states
wpa_supplicant state
Definition: defs.h:161
Definition: os.h:22
Definition: wpa_auth_i.h:176
Internal data for wpa_supplicant interface.
Definition: wpa_supplicant_i.h:451
Internal WPA state machine data.
Definition: wpa_i.h:18
Definition: ibss_rsn.h:42