hostapd: Fix endian bugs in STA HT capability handling
[libeap.git] / wpa_supplicant / wps_supplicant.h
1 /*
2  * wpa_supplicant / WPS integration
3  * Copyright (c) 2008-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 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 struct wps_new_ap_settings {
24         const char *ssid_hex;
25         const char *auth;
26         const char *encr;
27         const char *key_hex;
28 };
29
30 int wpas_wps_init(struct wpa_supplicant *wpa_s);
31 void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
32 int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
33 enum wps_request_type wpas_wps_get_req_type(struct wpa_ssid *ssid);
34 int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid);
35 int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
36                        const char *pin);
37 int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
38                        char *path, char *method, char *name);
39 int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
40                        const char *pin, struct wps_new_ap_settings *settings);
41 int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
42                             struct wpa_ssid *ssid, struct wpa_scan_res *bss);
43 int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
44                               struct wpa_ssid *ssid, struct wpa_scan_res *bss);
45 int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
46                               struct wpa_scan_res *selected,
47                               struct wpa_ssid *ssid);
48 void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
49 int wpas_wps_searching(struct wpa_supplicant *wpa_s);
50 int wpas_wps_scan_result_text(const u8 *ies, size_t ies_len, char *pos,
51                               char *end);
52 int wpas_wps_er_start(struct wpa_supplicant *wpa_s);
53 int wpas_wps_er_stop(struct wpa_supplicant *wpa_s);
54 int wpas_wps_er_add_pin(struct wpa_supplicant *wpa_s, const char *uuid,
55                         const char *pin);
56 int wpas_wps_er_pbc(struct wpa_supplicant *wpa_s, const char *uuid);
57 int wpas_wps_er_learn(struct wpa_supplicant *wpa_s, const char *uuid,
58                       const char *pin);
59
60 #else /* CONFIG_WPS */
61
62 static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
63 {
64         return 0;
65 }
66
67 static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
68 {
69 }
70
71 static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
72 {
73         return 0;
74 }
75
76 static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
77 {
78         return 0;
79 }
80
81 static inline int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
82                                           struct wpa_ssid *ssid,
83                                           struct wpa_scan_res *bss)
84 {
85         return -1;
86 }
87
88 static inline int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
89                                             struct wpa_ssid *ssid,
90                                             struct wpa_scan_res *bss)
91 {
92         return 0;
93 }
94
95 static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
96                                             struct wpa_scan_res *selected,
97                                             struct wpa_ssid *ssid)
98 {
99         return 0;
100 }
101
102 static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
103 {
104 }
105
106 static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s)
107 {
108         return 0;
109 }
110
111 #endif /* CONFIG_WPS */
112
113 #endif /* WPS_SUPPLICANT_H */