]> git.ipfire.org Git - thirdparty/hostap.git/blob - wpa_supplicant/wps_supplicant.h
WPS: Added support for wildcard SSID matching in ap_scan=2 mode
[thirdparty/hostap.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 int wpas_wps_init(struct wpa_supplicant *wpa_s);
21 void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
22 int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
23 u8 wpas_wps_get_req_type(struct wpa_ssid *ssid);
24 int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid);
25 int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
26 const char *pin);
27 int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
28 const char *pin);
29 int wpas_wps_ssid_bss_match(struct wpa_ssid *ssid, struct wpa_scan_res *bss);
30 int wpas_wps_ssid_wildcard_ok(struct wpa_ssid *ssid, struct wpa_scan_res *bss);
31 int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
32 struct wpa_scan_res *selected,
33 struct wpa_ssid *ssid);
34 void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
35 int wpas_wps_searching(struct wpa_supplicant *wpa_s);
36
37 #else /* CONFIG_WPS */
38
39 static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
40 {
41 return 0;
42 }
43
44 static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
45 {
46 }
47
48 static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
49 {
50 return 0;
51 }
52
53 static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
54 {
55 return 0;
56 }
57
58 static inline int wpas_wps_ssid_bss_match(struct wpa_ssid *ssid,
59 struct wpa_scan_res *bss)
60 {
61 return -1;
62 }
63
64 static inline int wpas_wps_ssid_wildcard_ok(struct wpa_ssid *ssid,
65 struct wpa_scan_res *bss)
66 {
67 return 0;
68 }
69
70 static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
71 struct wpa_scan_res *selected,
72 struct wpa_ssid *ssid)
73 {
74 return 0;
75 }
76
77 static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
78 {
79 }
80
81 static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s)
82 {
83 return 0;
84 }
85
86 #endif /* CONFIG_WPS */
87
88 #endif /* WPS_SUPPLICANT_H */