Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 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 | |
| 18 | struct wpa_scan_results; |
| 19 | |
| 20 | #if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA2) |
| 21 | |
| 22 | void pmksa_candidate_free(struct wpa_sm *sm); |
| 23 | int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst, |
| 24 | struct eap_peer_config *eap_conf); |
| 25 | void rsn_preauth_deinit(struct wpa_sm *sm); |
| 26 | int rsn_preauth_scan_results(struct wpa_sm *sm); |
| 27 | void rsn_preauth_scan_result(struct wpa_sm *sm, const u8 *bssid, |
| 28 | const u8 *ssid, const u8 *rsn); |
| 29 | void pmksa_candidate_add(struct wpa_sm *sm, const u8 *bssid, |
| 30 | int prio, int preauth); |
| 31 | void rsn_preauth_candidate_process(struct wpa_sm *sm); |
| 32 | int rsn_preauth_get_status(struct wpa_sm *sm, char *buf, size_t buflen, |
| 33 | int verbose); |
| 34 | int rsn_preauth_in_progress(struct wpa_sm *sm); |
| 35 | |
| 36 | #else /* IEEE8021X_EAPOL and !CONFIG_NO_WPA2 */ |
| 37 | |
| 38 | static inline void pmksa_candidate_free(struct wpa_sm *sm) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | static inline void rsn_preauth_candidate_process(struct wpa_sm *sm) |
| 43 | { |
| 44 | } |
| 45 | |
| 46 | static 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 | |
| 52 | static inline void rsn_preauth_deinit(struct wpa_sm *sm) |
| 53 | { |
| 54 | } |
| 55 | |
| 56 | static inline int rsn_preauth_scan_results(struct wpa_sm *sm) |
| 57 | { |
| 58 | return -1; |
| 59 | } |
| 60 | |
| 61 | static inline void rsn_preauth_scan_result(struct wpa_sm *sm, const u8 *bssid, |
| 62 | const u8 *ssid, const u8 *rsn) |
| 63 | { |
| 64 | } |
| 65 | |
| 66 | static inline void pmksa_candidate_add(struct wpa_sm *sm, |
| 67 | const u8 *bssid, |
| 68 | int prio, int preauth) |
| 69 | { |
| 70 | } |
| 71 | |
| 72 | static inline int rsn_preauth_get_status(struct wpa_sm *sm, char *buf, |
| 73 | size_t buflen, int verbose) |
| 74 | { |
| 75 | return 0; |
| 76 | } |
| 77 | |
| 78 | static 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 */ |