Added Doxygen documentation for WPS code
[mech_eap.git] / wpa_supplicant / wps_supplicant.h
1 /*
2  * wpa_supplicant / WPS integration
3  * Copyright (c) 2008, 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 WPS_SUPPLICANT_H
16 #define WPS_SUPPLICANT_H
17
18 #ifdef CONFIG_WPS
19
20 #include "wps/wps.h"
21 #include "wps/wps_defs.h"
22
23 int wpas_wps_init(struct wpa_supplicant *wpa_s);
24 void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
25 int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
26 enum wps_request_type wpas_wps_get_req_type(struct wpa_ssid *ssid);
27 int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid);
28 int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
29                        const char *pin);
30 int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
31                        const char *pin);
32 int wpas_wps_ssid_bss_match(struct wpa_ssid *ssid, struct wpa_scan_res *bss);
33 int wpas_wps_ssid_wildcard_ok(struct wpa_ssid *ssid, struct wpa_scan_res *bss);
34 int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
35                               struct wpa_scan_res *selected,
36                               struct wpa_ssid *ssid);
37 void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
38 int wpas_wps_searching(struct wpa_supplicant *wpa_s);
39
40 #else /* CONFIG_WPS */
41
42 static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
43 {
44         return 0;
45 }
46
47 static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
48 {
49 }
50
51 static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
52 {
53         return 0;
54 }
55
56 static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
57 {
58         return 0;
59 }
60
61 static inline int wpas_wps_ssid_bss_match(struct wpa_ssid *ssid,
62                                           struct wpa_scan_res *bss)
63 {
64         return -1;
65 }
66
67 static inline int wpas_wps_ssid_wildcard_ok(struct wpa_ssid *ssid,
68                                             struct wpa_scan_res *bss)
69 {
70         return 0;
71 }
72
73 static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
74                                             struct wpa_scan_res *selected,
75                                             struct wpa_ssid *ssid)
76 {
77         return 0;
78 }
79
80 static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
81 {
82 }
83
84 static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s)
85 {
86         return 0;
87 }
88
89 #endif /* CONFIG_WPS */
90
91 #endif /* WPS_SUPPLICANT_H */