1 /* 2 * wpa_supplicant - WPA2/RSN pre-authentication functions 3 * Copyright (c) 2003-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 PREAUTH_H 10 #define PREAUTH_H 11 12 struct wpa_scan_results; 13 14 #if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA) 15 16 void pmksa_candidate_free(struct wpa_sm *sm); 17 int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst, 18 struct eap_peer_config *eap_conf); 19 void rsn_preauth_deinit(struct wpa_sm *sm); 20 int rsn_preauth_scan_results(struct wpa_sm *sm); 21 void rsn_preauth_scan_result(struct wpa_sm *sm, const u8 *bssid, 22 const u8 *ssid, const u8 *rsn); 23 void pmksa_candidate_add(struct wpa_sm *sm, const u8 *bssid, 24 int prio, int preauth); 25 void rsn_preauth_candidate_process(struct wpa_sm *sm); 26 int rsn_preauth_get_status(struct wpa_sm *sm, char *buf, size_t buflen, 27 int verbose); 28 int rsn_preauth_in_progress(struct wpa_sm *sm); 29 30 #else /* IEEE8021X_EAPOL && !CONFIG_NO_WPA */ 31 32 static inline void pmksa_candidate_free(struct wpa_sm *sm) 33 { 34 } 35 36 static inline void rsn_preauth_candidate_process(struct wpa_sm *sm) 37 { 38 } 39 40 static inline int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst, 41 struct eap_peer_config *eap_conf) 42 { 43 return -1; 44 } 45 46 static inline void rsn_preauth_deinit(struct wpa_sm *sm) 47 { 48 } 49 50 static inline int rsn_preauth_scan_results(struct wpa_sm *sm) 51 { 52 return -1; 53 } 54 55 static inline void rsn_preauth_scan_result(struct wpa_sm *sm, const u8 *bssid, 56 const u8 *ssid, const u8 *rsn) 57 { 58 } 59 60 static inline void pmksa_candidate_add(struct wpa_sm *sm, 61 const u8 *bssid, 62 int prio, int preauth) 63 { 64 } 65 66 static inline int rsn_preauth_get_status(struct wpa_sm *sm, char *buf, 67 size_t buflen, int verbose) 68 { 69 return 0; 70 } 71 72 static inline int rsn_preauth_in_progress(struct wpa_sm *sm) 73 { 74 return 0; 75 } 76 77 #endif /* IEEE8021X_EAPOL && !CONFIG_NO_WPA */ 78 79 #endif /* PREAUTH_H */ 80