]>
Commit | Line | Data |
---|---|---|
6fc6879b JM |
1 | /* |
2 | * wpa_supplicant - Internal definitions | |
207ef3fb | 3 | * Copyright (c) 2003-2010, Jouni Malinen <j@w1.fi> |
6fc6879b JM |
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 WPA_SUPPLICANT_I_H | |
16 | #define WPA_SUPPLICANT_I_H | |
17 | ||
83922c2d | 18 | #include "utils/list.h" |
2d5b792d | 19 | #include "common/defs.h" |
6fc6879b | 20 | |
7e5ba1b9 JM |
21 | extern const char *wpa_supplicant_version; |
22 | extern const char *wpa_supplicant_license; | |
23 | #ifndef CONFIG_NO_STDOUT_DEBUG | |
24 | extern const char *wpa_supplicant_full_license1; | |
25 | extern const char *wpa_supplicant_full_license2; | |
26 | extern const char *wpa_supplicant_full_license3; | |
27 | extern const char *wpa_supplicant_full_license4; | |
28 | extern const char *wpa_supplicant_full_license5; | |
29 | #endif /* CONFIG_NO_STDOUT_DEBUG */ | |
30 | ||
6fc6879b JM |
31 | struct wpa_sm; |
32 | struct wpa_supplicant; | |
11ef8d35 | 33 | struct ibss_rsn; |
8d923a4a | 34 | struct scan_info; |
6fa81a3b | 35 | struct wpa_bss; |
64e58f51 | 36 | struct wpa_scan_results; |
0ae2aa14 | 37 | struct hostapd_hw_modes; |
6fc6879b JM |
38 | |
39 | /* | |
40 | * Forward declarations of private structures used within the ctrl_iface | |
41 | * backends. Other parts of wpa_supplicant do not have access to data stored in | |
42 | * these structures. | |
43 | */ | |
44 | struct ctrl_iface_priv; | |
45 | struct ctrl_iface_global_priv; | |
8ddef94b | 46 | struct wpas_dbus_priv; |
6fc6879b JM |
47 | |
48 | /** | |
49 | * struct wpa_interface - Parameters for wpa_supplicant_add_iface() | |
50 | */ | |
51 | struct wpa_interface { | |
52 | /** | |
53 | * confname - Configuration name (file or profile) name | |
54 | * | |
55 | * This can also be %NULL when a configuration file is not used. In | |
56 | * that case, ctrl_interface must be set to allow the interface to be | |
57 | * configured. | |
58 | */ | |
59 | const char *confname; | |
60 | ||
61 | /** | |
62 | * ctrl_interface - Control interface parameter | |
63 | * | |
64 | * If a configuration file is not used, this variable can be used to | |
65 | * set the ctrl_interface parameter that would have otherwise been read | |
66 | * from the configuration file. If both confname and ctrl_interface are | |
67 | * set, ctrl_interface is used to override the value from configuration | |
68 | * file. | |
69 | */ | |
70 | const char *ctrl_interface; | |
71 | ||
72 | /** | |
73 | * driver - Driver interface name, or %NULL to use the default driver | |
74 | */ | |
75 | const char *driver; | |
76 | ||
77 | /** | |
78 | * driver_param - Driver interface parameters | |
79 | * | |
80 | * If a configuration file is not used, this variable can be used to | |
81 | * set the driver_param parameters that would have otherwise been read | |
82 | * from the configuration file. If both confname and driver_param are | |
83 | * set, driver_param is used to override the value from configuration | |
84 | * file. | |
85 | */ | |
86 | const char *driver_param; | |
87 | ||
88 | /** | |
89 | * ifname - Interface name | |
90 | */ | |
91 | const char *ifname; | |
92 | ||
93 | /** | |
94 | * bridge_ifname - Optional bridge interface name | |
95 | * | |
96 | * If the driver interface (ifname) is included in a Linux bridge | |
97 | * device, the bridge interface may need to be used for receiving EAPOL | |
98 | * frames. This can be enabled by setting this variable to enable | |
99 | * receiving of EAPOL frames from an additional interface. | |
100 | */ | |
101 | const char *bridge_ifname; | |
102 | }; | |
103 | ||
104 | /** | |
105 | * struct wpa_params - Parameters for wpa_supplicant_init() | |
106 | */ | |
107 | struct wpa_params { | |
108 | /** | |
109 | * daemonize - Run %wpa_supplicant in the background | |
110 | */ | |
111 | int daemonize; | |
112 | ||
113 | /** | |
114 | * wait_for_monitor - Wait for a monitor program before starting | |
115 | */ | |
116 | int wait_for_monitor; | |
117 | ||
118 | /** | |
119 | * pid_file - Path to a PID (process ID) file | |
120 | * | |
121 | * If this and daemonize are set, process ID of the background process | |
122 | * will be written to the specified file. | |
123 | */ | |
124 | char *pid_file; | |
125 | ||
126 | /** | |
127 | * wpa_debug_level - Debugging verbosity level (e.g., MSG_INFO) | |
128 | */ | |
129 | int wpa_debug_level; | |
130 | ||
131 | /** | |
132 | * wpa_debug_show_keys - Whether keying material is included in debug | |
133 | * | |
134 | * This parameter can be used to allow keying material to be included | |
135 | * in debug messages. This is a security risk and this option should | |
136 | * not be enabled in normal configuration. If needed during | |
137 | * development or while troubleshooting, this option can provide more | |
138 | * details for figuring out what is happening. | |
139 | */ | |
140 | int wpa_debug_show_keys; | |
141 | ||
142 | /** | |
143 | * wpa_debug_timestamp - Whether to include timestamp in debug messages | |
144 | */ | |
145 | int wpa_debug_timestamp; | |
146 | ||
147 | /** | |
148 | * ctrl_interface - Global ctrl_iface path/parameter | |
149 | */ | |
150 | char *ctrl_interface; | |
151 | ||
152 | /** | |
153 | * dbus_ctrl_interface - Enable the DBus control interface | |
154 | */ | |
155 | int dbus_ctrl_interface; | |
156 | ||
157 | /** | |
158 | * wpa_debug_file_path - Path of debug file or %NULL to use stdout | |
159 | */ | |
160 | const char *wpa_debug_file_path; | |
daa70d49 SL |
161 | |
162 | /** | |
163 | * wpa_debug_syslog - Enable log output through syslog | |
164 | */ | |
165 | int wpa_debug_syslog; | |
d27df100 JM |
166 | |
167 | /** | |
168 | * override_driver - Optional driver parameter override | |
169 | * | |
170 | * This parameter can be used to override the driver parameter in | |
171 | * dynamic interface addition to force a specific driver wrapper to be | |
172 | * used instead. | |
173 | */ | |
174 | char *override_driver; | |
175 | ||
176 | /** | |
177 | * override_ctrl_interface - Optional ctrl_interface override | |
178 | * | |
179 | * This parameter can be used to override the ctrl_interface parameter | |
180 | * in dynamic interface addition to force a control interface to be | |
181 | * created. | |
182 | */ | |
183 | char *override_ctrl_interface; | |
38e24575 JM |
184 | |
185 | /** | |
186 | * entropy_file - Optional entropy file | |
187 | * | |
188 | * This parameter can be used to configure wpa_supplicant to maintain | |
189 | * its internal entropy store over restarts. | |
190 | */ | |
191 | char *entropy_file; | |
6fc6879b JM |
192 | }; |
193 | ||
b22128ef JM |
194 | struct p2p_srv_bonjour { |
195 | struct dl_list list; | |
196 | struct wpabuf *query; | |
197 | struct wpabuf *resp; | |
198 | }; | |
199 | ||
200 | struct p2p_srv_upnp { | |
201 | struct dl_list list; | |
202 | u8 version; | |
203 | char *service; | |
204 | }; | |
205 | ||
6fc6879b JM |
206 | /** |
207 | * struct wpa_global - Internal, global data for all %wpa_supplicant interfaces | |
208 | * | |
209 | * This structure is initialized by calling wpa_supplicant_init() when starting | |
210 | * %wpa_supplicant. | |
211 | */ | |
212 | struct wpa_global { | |
213 | struct wpa_supplicant *ifaces; | |
214 | struct wpa_params params; | |
215 | struct ctrl_iface_global_priv *ctrl_iface; | |
8ddef94b | 216 | struct wpas_dbus_priv *dbus; |
ac305589 JM |
217 | void **drv_priv; |
218 | size_t drv_count; | |
207ef3fb | 219 | struct os_time suspend_time; |
b22128ef JM |
220 | struct p2p_data *p2p; |
221 | struct wpa_supplicant *p2p_group_formation; | |
222 | u8 p2p_dev_addr[ETH_ALEN]; | |
223 | struct dl_list p2p_srv_bonjour; /* struct p2p_srv_bonjour */ | |
224 | struct dl_list p2p_srv_upnp; /* struct p2p_srv_upnp */ | |
225 | int p2p_disabled; | |
72044390 | 226 | int cross_connection; |
6fc6879b JM |
227 | }; |
228 | ||
229 | ||
230 | struct wpa_client_mlme { | |
231 | #ifdef CONFIG_CLIENT_MLME | |
232 | enum { | |
233 | IEEE80211_DISABLED, IEEE80211_AUTHENTICATE, | |
234 | IEEE80211_ASSOCIATE, IEEE80211_ASSOCIATED, | |
235 | IEEE80211_IBSS_SEARCH, IEEE80211_IBSS_JOINED | |
236 | } state; | |
237 | u8 prev_bssid[ETH_ALEN]; | |
238 | u8 ssid[32]; | |
239 | size_t ssid_len; | |
240 | u16 aid; | |
241 | u16 ap_capab, capab; | |
242 | u8 *extra_ie; /* to be added to the end of AssocReq */ | |
243 | size_t extra_ie_len; | |
244 | u8 *extra_probe_ie; /* to be added to the end of ProbeReq */ | |
245 | size_t extra_probe_ie_len; | |
71934751 | 246 | enum wpa_key_mgmt key_mgmt; |
6fc6879b JM |
247 | |
248 | /* The last AssocReq/Resp IEs */ | |
249 | u8 *assocreq_ies, *assocresp_ies; | |
250 | size_t assocreq_ies_len, assocresp_ies_len; | |
251 | ||
252 | int auth_tries, assoc_tries; | |
253 | ||
254 | unsigned int ssid_set:1; | |
255 | unsigned int bssid_set:1; | |
256 | unsigned int prev_bssid_set:1; | |
257 | unsigned int authenticated:1; | |
258 | unsigned int associated:1; | |
259 | unsigned int probereq_poll:1; | |
260 | unsigned int use_protection:1; | |
261 | unsigned int create_ibss:1; | |
262 | unsigned int mixed_cell:1; | |
263 | unsigned int wmm_enabled:1; | |
264 | ||
265 | struct os_time last_probe; | |
266 | ||
abd9fafa JM |
267 | unsigned int auth_algs; /* bitfield of allowed auth algs |
268 | * (WPA_AUTH_ALG_*) */ | |
6fc6879b JM |
269 | int auth_alg; /* currently used IEEE 802.11 authentication algorithm */ |
270 | int auth_transaction; | |
271 | ||
272 | struct os_time ibss_join_req; | |
273 | u8 *probe_resp; /* ProbeResp template for IBSS */ | |
274 | size_t probe_resp_len; | |
275 | u32 supp_rates_bits; | |
276 | ||
277 | int wmm_last_param_set; | |
278 | ||
279 | int sta_scanning; | |
280 | int scan_hw_mode_idx; | |
281 | int scan_channel_idx; | |
282 | enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state; | |
283 | struct os_time last_scan_completed; | |
284 | int scan_oper_channel; | |
285 | int scan_oper_freq; | |
286 | int scan_oper_phymode; | |
287 | u8 scan_ssid[32]; | |
288 | size_t scan_ssid_len; | |
289 | int scan_skip_11b; | |
d009a9da | 290 | int *scan_freqs; |
6fc6879b JM |
291 | |
292 | struct ieee80211_sta_bss *sta_bss_list; | |
293 | #define STA_HASH_SIZE 256 | |
294 | #define STA_HASH(sta) (sta[5]) | |
295 | struct ieee80211_sta_bss *sta_bss_hash[STA_HASH_SIZE]; | |
296 | ||
297 | int cts_protect_erp_frames; | |
298 | ||
71934751 | 299 | enum hostapd_hw_mode phymode; /* current mode */ |
6caf9ca6 | 300 | struct hostapd_hw_modes *modes; |
6fc6879b JM |
301 | size_t num_modes; |
302 | unsigned int hw_modes; /* bitfield of allowed hardware modes; | |
6caf9ca6 | 303 | * (1 << HOSTAPD_MODE_*) */ |
6fc6879b | 304 | int num_curr_rates; |
fb7842aa | 305 | int *curr_rates; |
6fc6879b JM |
306 | int freq; /* The current frequency in MHz */ |
307 | int channel; /* The current IEEE 802.11 channel number */ | |
308 | ||
309 | #ifdef CONFIG_IEEE80211R | |
310 | u8 current_md[6]; | |
311 | u8 *ft_ies; | |
312 | size_t ft_ies_len; | |
313 | #endif /* CONFIG_IEEE80211R */ | |
314 | ||
c706d5aa JM |
315 | void (*public_action_cb)(void *ctx, const u8 *buf, size_t len, |
316 | int freq); | |
317 | void *public_action_cb_ctx; | |
318 | ||
6fc6879b JM |
319 | #else /* CONFIG_CLIENT_MLME */ |
320 | int dummy; /* to keep MSVC happy */ | |
321 | #endif /* CONFIG_CLIENT_MLME */ | |
322 | }; | |
323 | ||
324 | /** | |
325 | * struct wpa_supplicant - Internal data for wpa_supplicant interface | |
326 | * | |
327 | * This structure contains the internal data for core wpa_supplicant code. This | |
328 | * should be only used directly from the core code. However, a pointer to this | |
329 | * data is used from other files as an arbitrary context pointer in calls to | |
330 | * core functions. | |
331 | */ | |
332 | struct wpa_supplicant { | |
333 | struct wpa_global *global; | |
b22128ef | 334 | struct wpa_supplicant *parent; |
6fc6879b JM |
335 | struct wpa_supplicant *next; |
336 | struct l2_packet_data *l2; | |
337 | struct l2_packet_data *l2_br; | |
338 | unsigned char own_addr[ETH_ALEN]; | |
339 | char ifname[100]; | |
340 | #ifdef CONFIG_CTRL_IFACE_DBUS | |
341 | char *dbus_path; | |
342 | #endif /* CONFIG_CTRL_IFACE_DBUS */ | |
8fc2fb56 WS |
343 | #ifdef CONFIG_CTRL_IFACE_DBUS_NEW |
344 | char *dbus_new_path; | |
9abafccc | 345 | char *dbus_groupobj_path; |
8fc2fb56 | 346 | #endif /* CONFIG_CTRL_IFACE_DBUS_NEW */ |
6fc6879b JM |
347 | char bridge_ifname[16]; |
348 | ||
349 | char *confname; | |
350 | struct wpa_config *conf; | |
351 | int countermeasures; | |
352 | os_time_t last_michael_mic_error; | |
353 | u8 bssid[ETH_ALEN]; | |
354 | u8 pending_bssid[ETH_ALEN]; /* If wpa_state == WPA_ASSOCIATING, this | |
355 | * field contains the targer BSSID. */ | |
356 | int reassociate; /* reassociation requested */ | |
357 | int disconnected; /* all connections disabled; i.e., do no reassociate | |
358 | * before this has been cleared */ | |
359 | struct wpa_ssid *current_ssid; | |
8f770587 | 360 | struct wpa_bss *current_bss; |
6fc6879b | 361 | int ap_ies_from_associnfo; |
4832ecd7 | 362 | unsigned int assoc_freq; |
6fc6879b JM |
363 | |
364 | /* Selected configuration (based on Beacon/ProbeResp WPA IE) */ | |
365 | int pairwise_cipher; | |
366 | int group_cipher; | |
367 | int key_mgmt; | |
368 | int mgmt_group_cipher; | |
369 | ||
370 | void *drv_priv; /* private data used by driver_ops */ | |
8a5ab9f5 | 371 | void *global_drv_priv; |
6fc6879b JM |
372 | |
373 | struct wpa_ssid *prev_scan_ssid; /* previously scanned SSID; | |
374 | * NULL = not yet initialized (start | |
ba2a573c JM |
375 | * with wildcard SSID) |
376 | * WILDCARD_SSID_SCAN = wildcard | |
6fc6879b JM |
377 | * SSID was used in the previous scan |
378 | */ | |
ba2a573c | 379 | #define WILDCARD_SSID_SCAN ((struct wpa_ssid *) 1) |
6fc6879b | 380 | |
64e58f51 JM |
381 | void (*scan_res_handler)(struct wpa_supplicant *wpa_s, |
382 | struct wpa_scan_results *scan_res); | |
83922c2d | 383 | struct dl_list bss; /* struct wpa_bss::list */ |
d4bf8f13 | 384 | struct dl_list bss_id; /* struct wpa_bss::list_id */ |
83922c2d JM |
385 | size_t num_bss; |
386 | unsigned int bss_update_idx; | |
387 | unsigned int bss_next_id; | |
6fc6879b JM |
388 | |
389 | struct wpa_driver_ops *driver; | |
390 | int interface_removed; /* whether the network interface has been | |
391 | * removed */ | |
392 | struct wpa_sm *wpa; | |
393 | struct eapol_sm *eapol; | |
394 | ||
395 | struct ctrl_iface_priv *ctrl_iface; | |
396 | ||
71934751 | 397 | enum wpa_states wpa_state; |
cb8564b1 | 398 | int scanning; |
6fc6879b JM |
399 | int new_connection; |
400 | int reassociated_connection; | |
401 | ||
402 | int eapol_received; /* number of EAPOL packets received after the | |
403 | * previous association event */ | |
404 | ||
405 | struct scard_data *scard; | |
406 | ||
407 | unsigned char last_eapol_src[ETH_ALEN]; | |
408 | ||
409 | int keys_cleared; | |
410 | ||
411 | struct wpa_blacklist *blacklist; | |
412 | ||
413 | int scan_req; /* manual scan request; this forces a scan even if there | |
414 | * are no enabled networks in the configuration */ | |
a6099152 | 415 | int scan_runs; /* number of scan runs since WPS was started */ |
f47d639d | 416 | int *next_scan_freqs; |
67b9bd08 | 417 | int scan_interval; /* time in sec between scans to find suitable AP */ |
6fc6879b JM |
418 | |
419 | struct wpa_client_mlme mlme; | |
c2a04078 | 420 | unsigned int drv_flags; |
80bc75f1 | 421 | int max_scan_ssids; |
814782b9 | 422 | unsigned int max_remain_on_chan; |
c4ea4c5c | 423 | unsigned int max_stations; |
46690a3b JM |
424 | |
425 | int pending_mic_error_report; | |
426 | int pending_mic_error_pairwise; | |
427 | int mic_errors_seen; /* Michael MIC errors with the current PTK */ | |
116654ce JM |
428 | |
429 | struct wps_context *wps; | |
a6099152 | 430 | int wps_success; /* WPS success event received */ |
e9bcfebf | 431 | struct wps_er *wps_er; |
a6099152 | 432 | int blacklist_cleared; |
11ef8d35 | 433 | |
1ff73338 JM |
434 | struct wpabuf *pending_eapol_rx; |
435 | struct os_time pending_eapol_rx_time; | |
436 | u8 pending_eapol_rx_src[ETH_ALEN]; | |
437 | ||
11ef8d35 | 438 | struct ibss_rsn *ibss_rsn; |
c2a04078 | 439 | |
eea2fd9e JM |
440 | int set_sta_uapsd; |
441 | int sta_uapsd; | |
442 | int set_ap_uapsd; | |
443 | int ap_uapsd; | |
444 | ||
c2a04078 JM |
445 | #ifdef CONFIG_SME |
446 | struct { | |
447 | u8 ssid[32]; | |
448 | size_t ssid_len; | |
449 | int freq; | |
b22128ef | 450 | u8 assoc_req_ie[200]; |
c2a04078 JM |
451 | size_t assoc_req_ie_len; |
452 | int mfp; | |
453 | int ft_used; | |
454 | u8 mobility_domain[2]; | |
455 | u8 *ft_ies; | |
456 | size_t ft_ies_len; | |
62fa124c JM |
457 | u8 prev_bssid[ETH_ALEN]; |
458 | int prev_bssid_set; | |
62c72d72 | 459 | int auth_alg; |
7d878ca7 JM |
460 | |
461 | int sa_query_count; /* number of pending SA Query requests; | |
462 | * 0 = no SA Query in progress */ | |
463 | int sa_query_timed_out; | |
464 | u8 *sa_query_trans_id; /* buffer of WLAN_SA_QUERY_TR_ID_LEN * | |
465 | * sa_query_count octets of pending | |
466 | * SA Query transaction identifiers */ | |
467 | struct os_time sa_query_start; | |
c2a04078 JM |
468 | } sme; |
469 | #endif /* CONFIG_SME */ | |
2d5b792d JM |
470 | |
471 | #ifdef CONFIG_AP | |
472 | struct hostapd_iface *ap_iface; | |
4b768ed0 JM |
473 | void (*ap_configured_cb)(void *ctx, void *data); |
474 | void *ap_configured_cb_ctx; | |
475 | void *ap_configured_cb_data; | |
2d5b792d | 476 | #endif /* CONFIG_AP */ |
60b94c98 | 477 | |
b22128ef JM |
478 | #ifdef CONFIG_P2P |
479 | struct p2p_go_neg_results *go_params; | |
480 | int create_p2p_iface; | |
481 | u8 pending_interface_addr[ETH_ALEN]; | |
0f85ef5c | 482 | char pending_interface_name[100]; |
b22128ef JM |
483 | int pending_interface_type; |
484 | int p2p_group_idx; | |
485 | unsigned int off_channel_freq; | |
486 | struct wpabuf *pending_action_tx; | |
487 | u8 pending_action_src[ETH_ALEN]; | |
488 | u8 pending_action_dst[ETH_ALEN]; | |
489 | u8 pending_action_bssid[ETH_ALEN]; | |
490 | unsigned int pending_action_freq; | |
491 | int pending_action_without_roc; | |
492 | unsigned int pending_listen_freq; | |
493 | unsigned int pending_listen_duration; | |
494 | enum { | |
495 | NOT_P2P_GROUP_INTERFACE, | |
496 | P2P_GROUP_INTERFACE_PENDING, | |
497 | P2P_GROUP_INTERFACE_GO, | |
498 | P2P_GROUP_INTERFACE_CLIENT | |
499 | } p2p_group_interface; | |
500 | struct p2p_group *p2p_group; | |
11fb02be | 501 | int p2p_long_listen; /* remaining time in long Listen state in ms */ |
b22128ef | 502 | char p2p_pin[10]; |
3c5126a4 | 503 | int p2p_wps_method; |
108def93 | 504 | u8 p2p_auth_invite[ETH_ALEN]; |
b22128ef JM |
505 | int p2p_sd_over_ctrl_iface; |
506 | int p2p_in_provisioning; | |
507 | int pending_invite_ssid_id; | |
508 | int show_group_started; | |
509 | u8 go_dev_addr[ETH_ALEN]; | |
510 | int pending_pd_before_join; | |
511 | u8 pending_join_iface_addr[ETH_ALEN]; | |
512 | u8 pending_join_dev_addr[ETH_ALEN]; | |
513 | int pending_join_wps_method; | |
9b1ab931 | 514 | int p2p_join_scan_count; |
07a30a66 | 515 | unsigned int roc_waiting_drv_freq; |
190b9062 | 516 | int action_tx_wait_time; |
6e6963ea | 517 | int force_long_sd; |
72044390 JM |
518 | |
519 | /* | |
520 | * Whether cross connection is disallowed by the AP to which this | |
521 | * interface is associated (only valid if there is an association). | |
522 | */ | |
523 | int cross_connect_disallowed; | |
524 | ||
525 | /* | |
526 | * Whether this P2P group is configured to use cross connection (only | |
527 | * valid if this is P2P GO interface). The actual cross connect packet | |
528 | * forwarding may not be configured depending on the uplink status. | |
529 | */ | |
530 | int cross_connect_enabled; | |
531 | ||
532 | /* Whether cross connection forwarding is in use at the moment. */ | |
533 | int cross_connect_in_use; | |
534 | ||
535 | /* | |
536 | * Uplink interface name for cross connection | |
537 | */ | |
538 | char cross_connect_uplink[100]; | |
3071e181 JM |
539 | |
540 | enum { | |
541 | P2P_GROUP_REMOVAL_UNKNOWN, | |
542 | P2P_GROUP_REMOVAL_REQUESTED, | |
c973f386 JM |
543 | P2P_GROUP_REMOVAL_IDLE_TIMEOUT, |
544 | P2P_GROUP_REMOVAL_UNAVAILABLE | |
3071e181 | 545 | } removal_reason; |
b22128ef JM |
546 | #endif /* CONFIG_P2P */ |
547 | ||
60b94c98 JM |
548 | struct wpa_ssid *bgscan_ssid; |
549 | const struct bgscan_ops *bgscan; | |
550 | void *bgscan_priv; | |
17a4734d | 551 | |
8cd82735 JM |
552 | int connect_without_scan; |
553 | ||
17a4734d JM |
554 | int after_wps; |
555 | unsigned int wps_freq; | |
42f50264 | 556 | int wps_fragment_size; |
0d0a8ca1 | 557 | int auto_reconnect_disabled; |
7cfc4ac3 AGS |
558 | |
559 | /* Channel preferences for AP/P2P GO use */ | |
560 | int best_24_freq; | |
561 | int best_5_freq; | |
562 | int best_overall_freq; | |
6fc6879b JM |
563 | }; |
564 | ||
565 | ||
566 | /* wpa_supplicant.c */ | |
0194fedb JB |
567 | int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid); |
568 | ||
6fc6879b JM |
569 | int wpa_supplicant_reload_configuration(struct wpa_supplicant *wpa_s); |
570 | ||
71934751 | 571 | const char * wpa_supplicant_state_txt(enum wpa_states state); |
6fc6879b JM |
572 | int wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s); |
573 | int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s, | |
6fa81a3b | 574 | struct wpa_bss *bss, struct wpa_ssid *ssid, |
6fc6879b JM |
575 | u8 *wpa_ie, size_t *wpa_ie_len); |
576 | void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, | |
6fa81a3b | 577 | struct wpa_bss *bss, |
6fc6879b JM |
578 | struct wpa_ssid *ssid); |
579 | void wpa_supplicant_set_non_wpa_policy(struct wpa_supplicant *wpa_s, | |
580 | struct wpa_ssid *ssid); | |
581 | void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s); | |
6fc6879b JM |
582 | void wpa_clear_keys(struct wpa_supplicant *wpa_s, const u8 *addr); |
583 | void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s, | |
584 | int sec, int usec); | |
71934751 JM |
585 | void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s, |
586 | enum wpa_states state); | |
6fc6879b | 587 | struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s); |
cf83fb0b | 588 | const char * wpa_supplicant_get_eap_mode(struct wpa_supplicant *wpa_s); |
6fc6879b JM |
589 | void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s); |
590 | void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s, | |
591 | int reason_code); | |
592 | void wpa_supplicant_disassociate(struct wpa_supplicant *wpa_s, | |
593 | int reason_code); | |
594 | ||
86b89452 WS |
595 | void wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s, |
596 | struct wpa_ssid *ssid); | |
597 | void wpa_supplicant_disable_network(struct wpa_supplicant *wpa_s, | |
598 | struct wpa_ssid *ssid); | |
599 | void wpa_supplicant_select_network(struct wpa_supplicant *wpa_s, | |
600 | struct wpa_ssid *ssid); | |
601 | int wpa_supplicant_set_ap_scan(struct wpa_supplicant *wpa_s, | |
602 | int ap_scan); | |
78633c37 SL |
603 | int wpa_supplicant_set_bss_expiration_age(struct wpa_supplicant *wpa_s, |
604 | unsigned int expire_age); | |
605 | int wpa_supplicant_set_bss_expiration_count(struct wpa_supplicant *wpa_s, | |
606 | unsigned int expire_count); | |
86b89452 WS |
607 | int wpa_supplicant_set_debug_params(struct wpa_global *global, |
608 | int debug_level, int debug_timestamp, | |
609 | int debug_show_keys); | |
610 | ||
6fc6879b JM |
611 | void wpa_show_license(void); |
612 | ||
613 | struct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global, | |
614 | struct wpa_interface *iface); | |
615 | int wpa_supplicant_remove_iface(struct wpa_global *global, | |
616 | struct wpa_supplicant *wpa_s); | |
617 | struct wpa_supplicant * wpa_supplicant_get_iface(struct wpa_global *global, | |
618 | const char *ifname); | |
619 | struct wpa_global * wpa_supplicant_init(struct wpa_params *params); | |
620 | int wpa_supplicant_run(struct wpa_global *global); | |
621 | void wpa_supplicant_deinit(struct wpa_global *global); | |
622 | ||
623 | int wpa_supplicant_scard_init(struct wpa_supplicant *wpa_s, | |
624 | struct wpa_ssid *ssid); | |
1a1bf008 | 625 | void wpa_supplicant_terminate_proc(struct wpa_global *global); |
a8e0505b JM |
626 | void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr, |
627 | const u8 *buf, size_t len); | |
508545f3 JM |
628 | enum wpa_key_mgmt key_mgmt2driver(int key_mgmt); |
629 | enum wpa_cipher cipher_suite2driver(int cipher); | |
611aea7d | 630 | void wpa_supplicant_update_config(struct wpa_supplicant *wpa_s); |
b22128ef | 631 | void wpa_supplicant_clear_status(struct wpa_supplicant *wpa_s); |
2f9c6aa6 JM |
632 | void ieee80211_sta_free_hw_features(struct hostapd_hw_modes *hw_features, |
633 | size_t num_hw_features); | |
0fb337c1 | 634 | void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid); |
6fc6879b | 635 | |
6fc6879b JM |
636 | /* events.c */ |
637 | void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s); | |
86d4f806 JM |
638 | void wpa_supplicant_connect(struct wpa_supplicant *wpa_s, |
639 | struct wpa_bss *selected, | |
640 | struct wpa_ssid *ssid); | |
6fc6879b | 641 | |
12760815 JM |
642 | /* eap_register.c */ |
643 | int eap_register_methods(void); | |
644 | ||
6fc6879b | 645 | #endif /* WPA_SUPPLICANT_I_H */ |