preauth.h revision 8d520ff1dc2da35cdca849e982051b86468016d8
1/* 2 * wpa_supplicant - WPA2/RSN pre-authentication functions 3 * Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 * 9 * Alternatively, this software may be distributed under the terms of BSD 10 * license. 11 * 12 * See README and COPYING for more details. 13 */ 14 15#ifndef PREAUTH_H 16#define PREAUTH_H 17 18struct wpa_scan_results; 19 20#if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2) 21 22void pmksa_candidate_free(struct wpa_sm *sm); 23int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst, 24 struct eap_peer_config *eap_conf); 25void rsn_preauth_deinit(struct wpa_sm *sm); 26int rsn_preauth_scan_results(struct wpa_sm *sm); 27void rsn_preauth_scan_result(struct wpa_sm *sm, const u8 *bssid, 28 const u8 *ssid, const u8 *rsn); 29void pmksa_candidate_add(struct wpa_sm *sm, const u8 *bssid, 30 int prio, int preauth); 31void rsn_preauth_candidate_process(struct wpa_sm *sm); 32int rsn_preauth_get_status(struct wpa_sm *sm, char *buf, size_t buflen, 33 int verbose); 34int rsn_preauth_in_progress(struct wpa_sm *sm); 35 36#else /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */ 37 38static inline void pmksa_candidate_free(struct wpa_sm *sm) 39{ 40} 41 42static inline void rsn_preauth_candidate_process(struct wpa_sm *sm) 43{ 44} 45 46static inline int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst, 47 struct eap_peer_config *eap_conf) 48{ 49 return -1; 50} 51 52static inline void rsn_preauth_deinit(struct wpa_sm *sm) 53{ 54} 55 56static inline int rsn_preauth_scan_results(struct wpa_sm *sm) 57{ 58 return -1; 59} 60 61static inline void rsn_preauth_scan_result(struct wpa_sm *sm, const u8 *bssid, 62 const u8 *ssid, const u8 *rsn) 63{ 64} 65 66static inline void pmksa_candidate_add(struct wpa_sm *sm, 67 const u8 *bssid, 68 int prio, int preauth) 69{ 70} 71 72static inline int rsn_preauth_get_status(struct wpa_sm *sm, char *buf, 73 size_t buflen, int verbose) 74{ 75 return 0; 76} 77 78static inline int rsn_preauth_in_progress(struct wpa_sm *sm) 79{ 80 return 0; 81} 82 83#endif /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */ 84 85#endif /* PREAUTH_H */ 86