1 /* 2 * wpa_supplicant - IBSS RSN 3 * Copyright (c) 2009, Jouni Malinen <j@w1.fi> 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef IBSS_RSN_H 10 #define IBSS_RSN_H 11 12 struct ibss_rsn; 13 14 struct ibss_rsn_peer { 15 struct ibss_rsn_peer *next; 16 struct ibss_rsn *ibss_rsn; 17 18 u8 addr[ETH_ALEN]; 19 20 struct wpa_sm *supp; 21 enum wpa_states supp_state; 22 u8 supp_ie[80]; 23 size_t supp_ie_len; 24 25 struct wpa_state_machine *auth; 26 }; 27 28 struct ibss_rsn { 29 struct wpa_supplicant *wpa_s; 30 struct wpa_authenticator *auth_group; 31 struct ibss_rsn_peer *peers; 32 u8 psk[PMK_LEN]; 33 }; 34 35 36 struct ibss_rsn * ibss_rsn_init(struct wpa_supplicant *wpa_s); 37 void ibss_rsn_deinit(struct ibss_rsn *ibss_rsn); 38 int ibss_rsn_start(struct ibss_rsn *ibss_rsn, const u8 *addr); 39 void ibss_rsn_stop(struct ibss_rsn *ibss_rsn, const u8 *peermac); 40 int ibss_rsn_rx_eapol(struct ibss_rsn *ibss_rsn, const u8 *src_addr, 41 const u8 *buf, size_t len); 42 void ibss_rsn_set_psk(struct ibss_rsn *ibss_rsn, const u8 *psk); 43 44 #endif /* IBSS_RSN_H */ 45