wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
wps_supplicant.h
Go to the documentation of this file.
1 
5 #ifndef WPS_SUPPLICANT_H
6 #define WPS_SUPPLICANT_H
7 
8 struct wpa_scan_results;
9 
10 #ifdef CONFIG_WPS
11 
12 #include "wps/wps.h"
13 #include "wps/wps_defs.h"
14 
15 struct wpa_bss;
16 
17 struct wps_new_ap_settings {
18  const char *ssid_hex;
19  const char *auth;
20  const char *encr;
21  const char *key_hex;
22 };
23 
24 int wpas_wps_init(struct wpa_supplicant *wpa_s);
25 void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
26 int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
27 enum wps_request_type wpas_wps_get_req_type(struct wpa_ssid *ssid);
28 int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
29  int p2p_group);
30 int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
31  const char *pin, int p2p_group, u16 dev_pw_id);
32 void wpas_wps_pbc_overlap(struct wpa_supplicant *wpa_s);
33 int wpas_wps_cancel(struct wpa_supplicant *wpa_s);
34 int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
35  const char *pin, struct wps_new_ap_settings *settings);
36 int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
37  struct wpa_ssid *ssid, struct wpa_bss *bss);
38 int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
39  struct wpa_ssid *ssid, struct wpa_bss *bss);
40 int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
41  struct wpa_bss *selected, struct wpa_ssid *ssid);
42 void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
43 int wpas_wps_searching(struct wpa_supplicant *wpa_s);
44 int wpas_wps_scan_result_text(const u8 *ies, size_t ies_len, char *pos,
45  char *end);
46 int wpas_wps_er_start(struct wpa_supplicant *wpa_s, const char *filter);
47 void wpas_wps_er_stop(struct wpa_supplicant *wpa_s);
48 int wpas_wps_er_add_pin(struct wpa_supplicant *wpa_s, const u8 *addr,
49  const char *uuid, const char *pin);
50 int wpas_wps_er_pbc(struct wpa_supplicant *wpa_s, const char *uuid);
51 int wpas_wps_er_learn(struct wpa_supplicant *wpa_s, const char *uuid,
52  const char *pin);
53 int wpas_wps_er_set_config(struct wpa_supplicant *wpa_s, const char *uuid,
54  int id);
55 int wpas_wps_er_config(struct wpa_supplicant *wpa_s, const char *uuid,
56  const char *pin, struct wps_new_ap_settings *settings);
57 struct wpabuf * wpas_wps_er_nfc_config_token(struct wpa_supplicant *wpa_s,
58  int ndef, const char *uuid);
59 int wpas_wps_terminate_pending(struct wpa_supplicant *wpa_s);
60 void wpas_wps_update_config(struct wpa_supplicant *wpa_s);
61 struct wpabuf * wpas_wps_nfc_config_token(struct wpa_supplicant *wpa_s,
62  int ndef, const char *id_str);
63 struct wpabuf * wpas_wps_nfc_token(struct wpa_supplicant *wpa_s, int ndef);
64 int wpas_wps_start_nfc(struct wpa_supplicant *wpa_s, const u8 *dev_addr,
65  const u8 *bssid,
66  const struct wpabuf *dev_pw, u16 dev_pw_id,
67  int p2p_group, const u8 *peer_pubkey_hash,
68  const u8 *ssid, size_t ssid_len, int freq);
69 int wpas_wps_nfc_tag_read(struct wpa_supplicant *wpa_s,
70  const struct wpabuf *data, int forced_freq);
71 struct wpabuf * wpas_wps_nfc_handover_req(struct wpa_supplicant *wpa_s,
72  int ndef);
73 struct wpabuf * wpas_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s,
74  int ndef, int cr, const char *uuid);
75 int wpas_wps_nfc_report_handover(struct wpa_supplicant *wpa_s,
76  const struct wpabuf *req,
77  const struct wpabuf *sel);
78 int wpas_er_wps_nfc_report_handover(struct wpa_supplicant *wpa_s,
79  const struct wpabuf *req,
80  const struct wpabuf *sel);
81 void wpas_wps_update_ap_info(struct wpa_supplicant *wpa_s,
82  struct wpa_scan_results *scan_res);
83 void wpas_wps_notify_assoc(struct wpa_supplicant *wpa_s, const u8 *bssid);
84 
85 #else /* CONFIG_WPS */
86 
87 static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
88 {
89  return 0;
90 }
91 
92 static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
93 {
94 }
95 
96 static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
97 {
98  return 0;
99 }
100 
101 static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
102 {
103  return 0;
104 }
105 
106 static inline int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
107  struct wpa_ssid *ssid,
108  struct wpa_bss *bss)
109 {
110  return -1;
111 }
112 
113 static inline int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
114  struct wpa_ssid *ssid,
115  struct wpa_bss *bss)
116 {
117  return 0;
118 }
119 
120 static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
121  struct wpa_bss *selected,
122  struct wpa_ssid *ssid)
123 {
124  return 0;
125 }
126 
127 static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
128 {
129 }
130 
131 static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s)
132 {
133  return 0;
134 }
135 
136 static inline void wpas_wps_update_ap_info(struct wpa_supplicant *wpa_s,
137  struct wpa_scan_results *scan_res)
138 {
139 }
140 
141 static inline void wpas_wps_notify_assoc(struct wpa_supplicant *wpa_s,
142  const u8 *bssid)
143 {
144 }
145 
146 #endif /* CONFIG_WPS */
147 
148 #endif /* WPS_SUPPLICANT_H */
Wi-Fi Protected Setup - message definitions.
Definition: wpabuf.h:16
BSS table.
Definition: bss.h:52
Scan results.
Definition: driver.h:277
Wi-Fi Protected Setup.
Internal data for wpa_supplicant interface.
Definition: wpa_supplicant_i.h:451
Internal P2P module per-group data.
Definition: p2p_group.c:31
Network configuration data.
Definition: config_ssid.h:52