2 * wpa_supplicant / WPS integration
3 * Copyright (c) 2008-2009, Jouni Malinen <j@w1.fi>
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.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
15 #ifndef WPS_SUPPLICANT_H
16 #define WPS_SUPPLICANT_H
23 #include "wps/wps_defs.h"
27 struct wps_new_ap_settings {
34 int wpas_wps_init(struct wpa_supplicant *wpa_s);
35 void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
36 int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
37 enum wps_request_type wpas_wps_get_req_type(struct wpa_ssid *ssid);
38 int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
40 int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
41 const char *pin, int p2p_group, u16 dev_pw_id);
42 int wpas_wps_cancel(struct wpa_supplicant *wpa_s);
43 int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
44 char *path, char *method, char *name);
45 int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
46 const char *pin, struct wps_new_ap_settings *settings);
47 int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
48 struct wpa_ssid *ssid, struct wpa_scan_res *bss);
49 int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
50 struct wpa_ssid *ssid, struct wpa_scan_res *bss);
51 int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
52 struct wpa_bss *selected, struct wpa_ssid *ssid);
53 void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
54 int wpas_wps_searching(struct wpa_supplicant *wpa_s);
55 int wpas_wps_scan_result_text(const u8 *ies, size_t ies_len, char *pos,
57 int wpas_wps_er_start(struct wpa_supplicant *wpa_s, const char *filter);
58 int wpas_wps_er_stop(struct wpa_supplicant *wpa_s);
59 int wpas_wps_er_add_pin(struct wpa_supplicant *wpa_s, const u8 *addr,
60 const char *uuid, const char *pin);
61 int wpas_wps_er_pbc(struct wpa_supplicant *wpa_s, const char *uuid);
62 int wpas_wps_er_learn(struct wpa_supplicant *wpa_s, const char *uuid,
64 int wpas_wps_er_set_config(struct wpa_supplicant *wpa_s, const char *uuid,
66 int wpas_wps_er_config(struct wpa_supplicant *wpa_s, const char *uuid,
67 const char *pin, struct wps_new_ap_settings *settings);
68 int wpas_wps_terminate_pending(struct wpa_supplicant *wpa_s);
69 int wpas_wps_in_progress(struct wpa_supplicant *wpa_s);
70 void wpas_wps_update_config(struct wpa_supplicant *wpa_s);
72 #else /* CONFIG_WPS */
74 static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
79 static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
83 static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
88 static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
93 static inline int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
94 struct wpa_ssid *ssid,
95 struct wpa_scan_res *bss)
100 static inline int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
101 struct wpa_ssid *ssid,
102 struct wpa_scan_res *bss)
107 static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
108 struct wpa_bss *selected,
109 struct wpa_ssid *ssid)
114 static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
118 static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s)
123 #endif /* CONFIG_WPS */
125 #endif /* WPS_SUPPLICANT_H */