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