/src/hostap/wpa_supplicant/wps_supplicant.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * wpa_supplicant / WPS integration |
3 | | * Copyright (c) 2008-2012, Jouni Malinen <j@w1.fi> |
4 | | * |
5 | | * This software may be distributed under the terms of the BSD license. |
6 | | * See README for more details. |
7 | | */ |
8 | | |
9 | | #ifndef WPS_SUPPLICANT_H |
10 | | #define WPS_SUPPLICANT_H |
11 | | |
12 | | struct wpa_scan_results; |
13 | | |
14 | | #ifdef CONFIG_WPS |
15 | | |
16 | | #include "wps/wps.h" |
17 | | #include "wps/wps_defs.h" |
18 | | |
19 | | struct wpa_bss; |
20 | | |
21 | | struct wps_new_ap_settings { |
22 | | const char *ssid_hex; |
23 | | const char *auth; |
24 | | const char *encr; |
25 | | const char *key_hex; |
26 | | }; |
27 | | |
28 | | int wpas_wps_init(struct wpa_supplicant *wpa_s); |
29 | | void wpas_wps_deinit(struct wpa_supplicant *wpa_s); |
30 | | int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s); |
31 | | enum wps_request_type wpas_wps_get_req_type(struct wpa_ssid *ssid); |
32 | | int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid, |
33 | | int p2p_group, int multi_ap_backhaul_sta); |
34 | | int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid, |
35 | | const char *pin, int p2p_group, u16 dev_pw_id); |
36 | | void wpas_wps_pbc_overlap(struct wpa_supplicant *wpa_s); |
37 | | int wpas_wps_cancel(struct wpa_supplicant *wpa_s); |
38 | | int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid, |
39 | | const char *pin, struct wps_new_ap_settings *settings); |
40 | | int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s, |
41 | | struct wpa_ssid *ssid, struct wpa_bss *bss); |
42 | | int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s, |
43 | | struct wpa_ssid *ssid, struct wpa_bss *bss); |
44 | | int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s, |
45 | | struct wpa_bss *selected, struct wpa_ssid *ssid); |
46 | | void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s); |
47 | | int wpas_wps_searching(struct wpa_supplicant *wpa_s); |
48 | | int wpas_wps_scan_result_text(const u8 *ies, size_t ies_len, char *pos, |
49 | | char *end); |
50 | | int wpas_wps_er_start(struct wpa_supplicant *wpa_s, const char *filter); |
51 | | void wpas_wps_er_stop(struct wpa_supplicant *wpa_s); |
52 | | int wpas_wps_er_add_pin(struct wpa_supplicant *wpa_s, const u8 *addr, |
53 | | const char *uuid, const char *pin); |
54 | | int wpas_wps_er_pbc(struct wpa_supplicant *wpa_s, const char *uuid); |
55 | | int wpas_wps_er_learn(struct wpa_supplicant *wpa_s, const char *uuid, |
56 | | const char *pin); |
57 | | int wpas_wps_er_set_config(struct wpa_supplicant *wpa_s, const char *uuid, |
58 | | int id); |
59 | | int wpas_wps_er_config(struct wpa_supplicant *wpa_s, const char *uuid, |
60 | | const char *pin, struct wps_new_ap_settings *settings); |
61 | | struct wpabuf * wpas_wps_er_nfc_config_token(struct wpa_supplicant *wpa_s, |
62 | | int ndef, const char *uuid); |
63 | | int wpas_wps_terminate_pending(struct wpa_supplicant *wpa_s); |
64 | | void wpas_wps_update_config(struct wpa_supplicant *wpa_s); |
65 | | void wpas_wps_update_mac_addr(struct wpa_supplicant *wpa_s); |
66 | | struct wpabuf * wpas_wps_nfc_config_token(struct wpa_supplicant *wpa_s, |
67 | | int ndef, const char *id_str); |
68 | | struct wpabuf * wpas_wps_nfc_token(struct wpa_supplicant *wpa_s, int ndef); |
69 | | int wpas_wps_start_nfc(struct wpa_supplicant *wpa_s, const u8 *dev_addr, |
70 | | const u8 *bssid, |
71 | | const struct wpabuf *dev_pw, u16 dev_pw_id, |
72 | | int p2p_group, const u8 *peer_pubkey_hash, |
73 | | const u8 *ssid, size_t ssid_len, int freq); |
74 | | int wpas_wps_nfc_tag_read(struct wpa_supplicant *wpa_s, |
75 | | const struct wpabuf *data, int forced_freq); |
76 | | struct wpabuf * wpas_wps_nfc_handover_req(struct wpa_supplicant *wpa_s, |
77 | | int ndef); |
78 | | struct wpabuf * wpas_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s, |
79 | | int ndef, int cr, const char *uuid); |
80 | | int wpas_wps_nfc_report_handover(struct wpa_supplicant *wpa_s, |
81 | | const struct wpabuf *req, |
82 | | const struct wpabuf *sel); |
83 | | int wpas_er_wps_nfc_report_handover(struct wpa_supplicant *wpa_s, |
84 | | const struct wpabuf *req, |
85 | | const struct wpabuf *sel); |
86 | | void wpas_wps_update_ap_info(struct wpa_supplicant *wpa_s, |
87 | | struct wpa_scan_results *scan_res); |
88 | | bool wpas_wps_partner_link_scan_done(struct wpa_supplicant *wpa_s); |
89 | | bool wpas_wps_partner_link_overlap_detect(struct wpa_supplicant *wpa_s); |
90 | | void wpas_wps_notify_assoc(struct wpa_supplicant *wpa_s, const u8 *bssid); |
91 | | int wpas_wps_reenable_networks_pending(struct wpa_supplicant *wpa_s); |
92 | | |
93 | | #else /* CONFIG_WPS */ |
94 | | |
95 | | static inline int wpas_wps_init(struct wpa_supplicant *wpa_s) |
96 | 0 | { |
97 | 0 | return 0; |
98 | 0 | } Unexecuted instantiation: events.c:wpas_wps_init Unexecuted instantiation: notify.c:wpas_wps_init Unexecuted instantiation: scan.c:wpas_wps_init Unexecuted instantiation: wpa_supplicant.c:wpas_wps_init Unexecuted instantiation: wpas_glue.c:wpas_wps_init |
99 | | |
100 | | static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s) |
101 | 0 | { |
102 | 0 | } Unexecuted instantiation: events.c:wpas_wps_deinit Unexecuted instantiation: notify.c:wpas_wps_deinit Unexecuted instantiation: scan.c:wpas_wps_deinit Unexecuted instantiation: wpa_supplicant.c:wpas_wps_deinit Unexecuted instantiation: wpas_glue.c:wpas_wps_deinit |
103 | | |
104 | | static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s) |
105 | 0 | { |
106 | 0 | return 0; |
107 | 0 | } Unexecuted instantiation: events.c:wpas_wps_eapol_cb Unexecuted instantiation: notify.c:wpas_wps_eapol_cb Unexecuted instantiation: scan.c:wpas_wps_eapol_cb Unexecuted instantiation: wpa_supplicant.c:wpas_wps_eapol_cb Unexecuted instantiation: wpas_glue.c:wpas_wps_eapol_cb |
108 | | |
109 | | static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid) |
110 | 0 | { |
111 | 0 | return 0; |
112 | 0 | } Unexecuted instantiation: events.c:wpas_wps_get_req_type Unexecuted instantiation: notify.c:wpas_wps_get_req_type Unexecuted instantiation: scan.c:wpas_wps_get_req_type Unexecuted instantiation: wpa_supplicant.c:wpas_wps_get_req_type Unexecuted instantiation: wpas_glue.c:wpas_wps_get_req_type |
113 | | |
114 | | static inline int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s, |
115 | | struct wpa_ssid *ssid, |
116 | | struct wpa_bss *bss) |
117 | 0 | { |
118 | 0 | return -1; |
119 | 0 | } Unexecuted instantiation: events.c:wpas_wps_ssid_bss_match Unexecuted instantiation: notify.c:wpas_wps_ssid_bss_match Unexecuted instantiation: scan.c:wpas_wps_ssid_bss_match Unexecuted instantiation: wpa_supplicant.c:wpas_wps_ssid_bss_match Unexecuted instantiation: wpas_glue.c:wpas_wps_ssid_bss_match |
120 | | |
121 | | static inline int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s, |
122 | | struct wpa_ssid *ssid, |
123 | | struct wpa_bss *bss) |
124 | 0 | { |
125 | 0 | return 0; |
126 | 0 | } Unexecuted instantiation: events.c:wpas_wps_ssid_wildcard_ok Unexecuted instantiation: notify.c:wpas_wps_ssid_wildcard_ok Unexecuted instantiation: scan.c:wpas_wps_ssid_wildcard_ok Unexecuted instantiation: wpa_supplicant.c:wpas_wps_ssid_wildcard_ok Unexecuted instantiation: wpas_glue.c:wpas_wps_ssid_wildcard_ok |
127 | | |
128 | | static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s, |
129 | | struct wpa_bss *selected, |
130 | | struct wpa_ssid *ssid) |
131 | 0 | { |
132 | 0 | return 0; |
133 | 0 | } Unexecuted instantiation: events.c:wpas_wps_scan_pbc_overlap Unexecuted instantiation: notify.c:wpas_wps_scan_pbc_overlap Unexecuted instantiation: scan.c:wpas_wps_scan_pbc_overlap Unexecuted instantiation: wpa_supplicant.c:wpas_wps_scan_pbc_overlap Unexecuted instantiation: wpas_glue.c:wpas_wps_scan_pbc_overlap |
134 | | |
135 | | static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s) |
136 | 0 | { |
137 | 0 | } Unexecuted instantiation: events.c:wpas_wps_notify_scan_results Unexecuted instantiation: notify.c:wpas_wps_notify_scan_results Unexecuted instantiation: scan.c:wpas_wps_notify_scan_results Unexecuted instantiation: wpa_supplicant.c:wpas_wps_notify_scan_results Unexecuted instantiation: wpas_glue.c:wpas_wps_notify_scan_results |
138 | | |
139 | | static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s) |
140 | 0 | { |
141 | 0 | return 0; |
142 | 0 | } Unexecuted instantiation: events.c:wpas_wps_searching Unexecuted instantiation: notify.c:wpas_wps_searching Unexecuted instantiation: scan.c:wpas_wps_searching Unexecuted instantiation: wpa_supplicant.c:wpas_wps_searching Unexecuted instantiation: wpas_glue.c:wpas_wps_searching |
143 | | |
144 | | static inline void wpas_wps_update_ap_info(struct wpa_supplicant *wpa_s, |
145 | | struct wpa_scan_results *scan_res) |
146 | 0 | { |
147 | 0 | } Unexecuted instantiation: events.c:wpas_wps_update_ap_info Unexecuted instantiation: notify.c:wpas_wps_update_ap_info Unexecuted instantiation: scan.c:wpas_wps_update_ap_info Unexecuted instantiation: wpa_supplicant.c:wpas_wps_update_ap_info Unexecuted instantiation: wpas_glue.c:wpas_wps_update_ap_info |
148 | | |
149 | | static inline bool wpas_wps_partner_link_scan_done(struct wpa_supplicant *wpa_s) |
150 | 0 | { |
151 | 0 | return true; |
152 | 0 | } Unexecuted instantiation: events.c:wpas_wps_partner_link_scan_done Unexecuted instantiation: notify.c:wpas_wps_partner_link_scan_done Unexecuted instantiation: scan.c:wpas_wps_partner_link_scan_done Unexecuted instantiation: wpa_supplicant.c:wpas_wps_partner_link_scan_done Unexecuted instantiation: wpas_glue.c:wpas_wps_partner_link_scan_done |
153 | | |
154 | | static inline bool |
155 | | wpas_wps_partner_link_overlap_detect(struct wpa_supplicant *wpa_s) |
156 | 0 | { |
157 | 0 | return false; |
158 | 0 | } Unexecuted instantiation: events.c:wpas_wps_partner_link_overlap_detect Unexecuted instantiation: notify.c:wpas_wps_partner_link_overlap_detect Unexecuted instantiation: scan.c:wpas_wps_partner_link_overlap_detect Unexecuted instantiation: wpa_supplicant.c:wpas_wps_partner_link_overlap_detect Unexecuted instantiation: wpas_glue.c:wpas_wps_partner_link_overlap_detect |
159 | | |
160 | | static inline void wpas_wps_notify_assoc(struct wpa_supplicant *wpa_s, |
161 | | const u8 *bssid) |
162 | 0 | { |
163 | 0 | } Unexecuted instantiation: events.c:wpas_wps_notify_assoc Unexecuted instantiation: notify.c:wpas_wps_notify_assoc Unexecuted instantiation: scan.c:wpas_wps_notify_assoc Unexecuted instantiation: wpa_supplicant.c:wpas_wps_notify_assoc Unexecuted instantiation: wpas_glue.c:wpas_wps_notify_assoc |
164 | | |
165 | | static inline int |
166 | | wpas_wps_reenable_networks_pending(struct wpa_supplicant *wpa_s) |
167 | 0 | { |
168 | 0 | return 0; |
169 | 0 | } Unexecuted instantiation: events.c:wpas_wps_reenable_networks_pending Unexecuted instantiation: notify.c:wpas_wps_reenable_networks_pending Unexecuted instantiation: scan.c:wpas_wps_reenable_networks_pending Unexecuted instantiation: wpa_supplicant.c:wpas_wps_reenable_networks_pending Unexecuted instantiation: wpas_glue.c:wpas_wps_reenable_networks_pending |
170 | | |
171 | | static inline void wpas_wps_update_mac_addr(struct wpa_supplicant *wpa_s) |
172 | 0 | { |
173 | 0 | } Unexecuted instantiation: events.c:wpas_wps_update_mac_addr Unexecuted instantiation: notify.c:wpas_wps_update_mac_addr Unexecuted instantiation: scan.c:wpas_wps_update_mac_addr Unexecuted instantiation: wpa_supplicant.c:wpas_wps_update_mac_addr Unexecuted instantiation: wpas_glue.c:wpas_wps_update_mac_addr |
174 | | |
175 | | #endif /* CONFIG_WPS */ |
176 | | |
177 | | #endif /* WPS_SUPPLICANT_H */ |