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