1189251Ssam/*
2189251Ssam * wpa_supplicant - Internal definitions
3214734Srpaulo * Copyright (c) 2003-2010, Jouni Malinen <j@w1.fi>
4189251Ssam *
5189251Ssam * This program is free software; you can redistribute it and/or modify
6189251Ssam * it under the terms of the GNU General Public License version 2 as
7189251Ssam * published by the Free Software Foundation.
8189251Ssam *
9189251Ssam * Alternatively, this software may be distributed under the terms of BSD
10189251Ssam * license.
11189251Ssam *
12189251Ssam * See README and COPYING for more details.
13189251Ssam */
14189251Ssam
15189251Ssam#ifndef WPA_SUPPLICANT_I_H
16189251Ssam#define WPA_SUPPLICANT_I_H
17189251Ssam
18214734Srpaulo#include "utils/list.h"
19214734Srpaulo#include "common/defs.h"
20189251Ssam
21189251Ssamextern const char *wpa_supplicant_version;
22189251Ssamextern const char *wpa_supplicant_license;
23189251Ssam#ifndef CONFIG_NO_STDOUT_DEBUG
24189251Ssamextern const char *wpa_supplicant_full_license1;
25189251Ssamextern const char *wpa_supplicant_full_license2;
26189251Ssamextern const char *wpa_supplicant_full_license3;
27189251Ssamextern const char *wpa_supplicant_full_license4;
28189251Ssamextern const char *wpa_supplicant_full_license5;
29189251Ssam#endif /* CONFIG_NO_STDOUT_DEBUG */
30189251Ssam
31189251Ssamstruct wpa_sm;
32189251Ssamstruct wpa_supplicant;
33214734Srpaulostruct ibss_rsn;
34214734Srpaulostruct scan_info;
35214734Srpaulostruct wpa_bss;
36214734Srpaulostruct wpa_scan_results;
37189251Ssam
38189251Ssam/*
39189251Ssam * Forward declarations of private structures used within the ctrl_iface
40189251Ssam * backends. Other parts of wpa_supplicant do not have access to data stored in
41189251Ssam * these structures.
42189251Ssam */
43189251Ssamstruct ctrl_iface_priv;
44189251Ssamstruct ctrl_iface_global_priv;
45214734Srpaulostruct wpas_dbus_priv;
46189251Ssam
47189251Ssam/**
48189251Ssam * struct wpa_interface - Parameters for wpa_supplicant_add_iface()
49189251Ssam */
50189251Ssamstruct wpa_interface {
51189251Ssam	/**
52189251Ssam	 * confname - Configuration name (file or profile) name
53189251Ssam	 *
54189251Ssam	 * This can also be %NULL when a configuration file is not used. In
55189251Ssam	 * that case, ctrl_interface must be set to allow the interface to be
56189251Ssam	 * configured.
57189251Ssam	 */
58189251Ssam	const char *confname;
59189251Ssam
60189251Ssam	/**
61189251Ssam	 * ctrl_interface - Control interface parameter
62189251Ssam	 *
63189251Ssam	 * If a configuration file is not used, this variable can be used to
64189251Ssam	 * set the ctrl_interface parameter that would have otherwise been read
65189251Ssam	 * from the configuration file. If both confname and ctrl_interface are
66189251Ssam	 * set, ctrl_interface is used to override the value from configuration
67189251Ssam	 * file.
68189251Ssam	 */
69189251Ssam	const char *ctrl_interface;
70189251Ssam
71189251Ssam	/**
72189251Ssam	 * driver - Driver interface name, or %NULL to use the default driver
73189251Ssam	 */
74189251Ssam	const char *driver;
75189251Ssam
76189251Ssam	/**
77189251Ssam	 * driver_param - Driver interface parameters
78189251Ssam	 *
79189251Ssam	 * If a configuration file is not used, this variable can be used to
80189251Ssam	 * set the driver_param parameters that would have otherwise been read
81189251Ssam	 * from the configuration file. If both confname and driver_param are
82189251Ssam	 * set, driver_param is used to override the value from configuration
83189251Ssam	 * file.
84189251Ssam	 */
85189251Ssam	const char *driver_param;
86189251Ssam
87189251Ssam	/**
88189251Ssam	 * ifname - Interface name
89189251Ssam	 */
90189251Ssam	const char *ifname;
91189251Ssam
92189251Ssam	/**
93189251Ssam	 * bridge_ifname - Optional bridge interface name
94189251Ssam	 *
95189251Ssam	 * If the driver interface (ifname) is included in a Linux bridge
96189251Ssam	 * device, the bridge interface may need to be used for receiving EAPOL
97189251Ssam	 * frames. This can be enabled by setting this variable to enable
98189251Ssam	 * receiving of EAPOL frames from an additional interface.
99189251Ssam	 */
100189251Ssam	const char *bridge_ifname;
101189251Ssam};
102189251Ssam
103189251Ssam/**
104189251Ssam * struct wpa_params - Parameters for wpa_supplicant_init()
105189251Ssam */
106189251Ssamstruct wpa_params {
107189251Ssam	/**
108189251Ssam	 * daemonize - Run %wpa_supplicant in the background
109189251Ssam	 */
110189251Ssam	int daemonize;
111189251Ssam
112189251Ssam	/**
113189251Ssam	 * wait_for_monitor - Wait for a monitor program before starting
114189251Ssam	 */
115189251Ssam	int wait_for_monitor;
116189251Ssam
117189251Ssam	/**
118189251Ssam	 * pid_file - Path to a PID (process ID) file
119189251Ssam	 *
120189251Ssam	 * If this and daemonize are set, process ID of the background process
121189251Ssam	 * will be written to the specified file.
122189251Ssam	 */
123189251Ssam	char *pid_file;
124189251Ssam
125189251Ssam	/**
126189251Ssam	 * wpa_debug_level - Debugging verbosity level (e.g., MSG_INFO)
127189251Ssam	 */
128189251Ssam	int wpa_debug_level;
129189251Ssam
130189251Ssam	/**
131189251Ssam	 * wpa_debug_show_keys - Whether keying material is included in debug
132189251Ssam	 *
133189251Ssam	 * This parameter can be used to allow keying material to be included
134189251Ssam	 * in debug messages. This is a security risk and this option should
135189251Ssam	 * not be enabled in normal configuration. If needed during
136189251Ssam	 * development or while troubleshooting, this option can provide more
137189251Ssam	 * details for figuring out what is happening.
138189251Ssam	 */
139189251Ssam	int wpa_debug_show_keys;
140189251Ssam
141189251Ssam	/**
142189251Ssam	 * wpa_debug_timestamp - Whether to include timestamp in debug messages
143189251Ssam	 */
144189251Ssam	int wpa_debug_timestamp;
145189251Ssam
146189251Ssam	/**
147189251Ssam	 * ctrl_interface - Global ctrl_iface path/parameter
148189251Ssam	 */
149189251Ssam	char *ctrl_interface;
150189251Ssam
151189251Ssam	/**
152189251Ssam	 * dbus_ctrl_interface - Enable the DBus control interface
153189251Ssam	 */
154189251Ssam	int dbus_ctrl_interface;
155189251Ssam
156189251Ssam	/**
157189251Ssam	 * wpa_debug_file_path - Path of debug file or %NULL to use stdout
158189251Ssam	 */
159189251Ssam	const char *wpa_debug_file_path;
160189262Ssam
161189262Ssam	/**
162189262Ssam	 * wpa_debug_syslog - Enable log output through syslog
163189262Ssam	 */
164214734Srpaulo	int wpa_debug_syslog;
165214734Srpaulo
166214734Srpaulo	/**
167214734Srpaulo	 * override_driver - Optional driver parameter override
168214734Srpaulo	 *
169214734Srpaulo	 * This parameter can be used to override the driver parameter in
170214734Srpaulo	 * dynamic interface addition to force a specific driver wrapper to be
171214734Srpaulo	 * used instead.
172214734Srpaulo	 */
173214734Srpaulo	char *override_driver;
174214734Srpaulo
175214734Srpaulo	/**
176214734Srpaulo	 * override_ctrl_interface - Optional ctrl_interface override
177214734Srpaulo	 *
178214734Srpaulo	 * This parameter can be used to override the ctrl_interface parameter
179214734Srpaulo	 * in dynamic interface addition to force a control interface to be
180214734Srpaulo	 * created.
181214734Srpaulo	 */
182214734Srpaulo	char *override_ctrl_interface;
183189251Ssam};
184189251Ssam
185189251Ssam/**
186189251Ssam * struct wpa_global - Internal, global data for all %wpa_supplicant interfaces
187189251Ssam *
188189251Ssam * This structure is initialized by calling wpa_supplicant_init() when starting
189189251Ssam * %wpa_supplicant.
190189251Ssam */
191189251Ssamstruct wpa_global {
192189251Ssam	struct wpa_supplicant *ifaces;
193189251Ssam	struct wpa_params params;
194189251Ssam	struct ctrl_iface_global_priv *ctrl_iface;
195214734Srpaulo	struct wpas_dbus_priv *dbus;
196189251Ssam	void **drv_priv;
197189251Ssam	size_t drv_count;
198214734Srpaulo	struct os_time suspend_time;
199189251Ssam};
200189251Ssam
201189251Ssam
202189251Ssamstruct wpa_client_mlme {
203189251Ssam#ifdef CONFIG_CLIENT_MLME
204189251Ssam	enum {
205189251Ssam		IEEE80211_DISABLED, IEEE80211_AUTHENTICATE,
206189251Ssam		IEEE80211_ASSOCIATE, IEEE80211_ASSOCIATED,
207189251Ssam		IEEE80211_IBSS_SEARCH, IEEE80211_IBSS_JOINED
208189251Ssam	} state;
209189251Ssam	u8 prev_bssid[ETH_ALEN];
210189251Ssam	u8 ssid[32];
211189251Ssam	size_t ssid_len;
212189251Ssam	u16 aid;
213189251Ssam	u16 ap_capab, capab;
214189251Ssam	u8 *extra_ie; /* to be added to the end of AssocReq */
215189251Ssam	size_t extra_ie_len;
216189251Ssam	u8 *extra_probe_ie; /* to be added to the end of ProbeReq */
217189251Ssam	size_t extra_probe_ie_len;
218214734Srpaulo	enum wpa_key_mgmt key_mgmt;
219189251Ssam
220189251Ssam	/* The last AssocReq/Resp IEs */
221189251Ssam	u8 *assocreq_ies, *assocresp_ies;
222189251Ssam	size_t assocreq_ies_len, assocresp_ies_len;
223189251Ssam
224189251Ssam	int auth_tries, assoc_tries;
225189251Ssam
226189251Ssam	unsigned int ssid_set:1;
227189251Ssam	unsigned int bssid_set:1;
228189251Ssam	unsigned int prev_bssid_set:1;
229189251Ssam	unsigned int authenticated:1;
230189251Ssam	unsigned int associated:1;
231189251Ssam	unsigned int probereq_poll:1;
232189251Ssam	unsigned int use_protection:1;
233189251Ssam	unsigned int create_ibss:1;
234189251Ssam	unsigned int mixed_cell:1;
235189251Ssam	unsigned int wmm_enabled:1;
236189251Ssam
237189251Ssam	struct os_time last_probe;
238189251Ssam
239214734Srpaulo	unsigned int auth_algs; /* bitfield of allowed auth algs
240214734Srpaulo				 * (WPA_AUTH_ALG_*) */
241189251Ssam	int auth_alg; /* currently used IEEE 802.11 authentication algorithm */
242189251Ssam	int auth_transaction;
243189251Ssam
244189251Ssam	struct os_time ibss_join_req;
245189251Ssam	u8 *probe_resp; /* ProbeResp template for IBSS */
246189251Ssam	size_t probe_resp_len;
247189251Ssam	u32 supp_rates_bits;
248189251Ssam
249189251Ssam	int wmm_last_param_set;
250189251Ssam
251189251Ssam	int sta_scanning;
252189251Ssam	int scan_hw_mode_idx;
253189251Ssam	int scan_channel_idx;
254189251Ssam	enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state;
255189251Ssam	struct os_time last_scan_completed;
256189251Ssam	int scan_oper_channel;
257189251Ssam	int scan_oper_freq;
258189251Ssam	int scan_oper_phymode;
259189251Ssam	u8 scan_ssid[32];
260189251Ssam	size_t scan_ssid_len;
261189251Ssam	int scan_skip_11b;
262214734Srpaulo	int *scan_freqs;
263189251Ssam
264189251Ssam	struct ieee80211_sta_bss *sta_bss_list;
265189251Ssam#define STA_HASH_SIZE 256
266189251Ssam#define STA_HASH(sta) (sta[5])
267189251Ssam	struct ieee80211_sta_bss *sta_bss_hash[STA_HASH_SIZE];
268189251Ssam
269189251Ssam	int cts_protect_erp_frames;
270189251Ssam
271214734Srpaulo	enum hostapd_hw_mode phymode; /* current mode */
272214734Srpaulo	struct hostapd_hw_modes *modes;
273189251Ssam	size_t num_modes;
274189251Ssam	unsigned int hw_modes; /* bitfield of allowed hardware modes;
275214734Srpaulo				* (1 << HOSTAPD_MODE_*) */
276189251Ssam	int num_curr_rates;
277214734Srpaulo	int *curr_rates;
278189251Ssam	int freq; /* The current frequency in MHz */
279189251Ssam	int channel; /* The current IEEE 802.11 channel number */
280189251Ssam
281189251Ssam#ifdef CONFIG_IEEE80211R
282189251Ssam	u8 current_md[6];
283189251Ssam	u8 *ft_ies;
284189251Ssam	size_t ft_ies_len;
285189251Ssam#endif /* CONFIG_IEEE80211R */
286189251Ssam
287214734Srpaulo	void (*public_action_cb)(void *ctx, const u8 *buf, size_t len,
288214734Srpaulo				 int freq);
289214734Srpaulo	void *public_action_cb_ctx;
290214734Srpaulo
291189251Ssam#else /* CONFIG_CLIENT_MLME */
292189251Ssam	int dummy; /* to keep MSVC happy */
293189251Ssam#endif /* CONFIG_CLIENT_MLME */
294189251Ssam};
295189251Ssam
296189251Ssam/**
297189251Ssam * struct wpa_supplicant - Internal data for wpa_supplicant interface
298189251Ssam *
299189251Ssam * This structure contains the internal data for core wpa_supplicant code. This
300189251Ssam * should be only used directly from the core code. However, a pointer to this
301189251Ssam * data is used from other files as an arbitrary context pointer in calls to
302189251Ssam * core functions.
303189251Ssam */
304189251Ssamstruct wpa_supplicant {
305189251Ssam	struct wpa_global *global;
306189251Ssam	struct wpa_supplicant *next;
307189251Ssam	struct l2_packet_data *l2;
308189251Ssam	struct l2_packet_data *l2_br;
309189251Ssam	unsigned char own_addr[ETH_ALEN];
310189251Ssam	char ifname[100];
311189251Ssam#ifdef CONFIG_CTRL_IFACE_DBUS
312189251Ssam	char *dbus_path;
313189251Ssam#endif /* CONFIG_CTRL_IFACE_DBUS */
314214734Srpaulo#ifdef CONFIG_CTRL_IFACE_DBUS_NEW
315214734Srpaulo	char *dbus_new_path;
316214734Srpaulo#endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
317189251Ssam	char bridge_ifname[16];
318189251Ssam
319189251Ssam	char *confname;
320189251Ssam	struct wpa_config *conf;
321189251Ssam	int countermeasures;
322189251Ssam	os_time_t last_michael_mic_error;
323189251Ssam	u8 bssid[ETH_ALEN];
324189251Ssam	u8 pending_bssid[ETH_ALEN]; /* If wpa_state == WPA_ASSOCIATING, this
325189251Ssam				     * field contains the targer BSSID. */
326189251Ssam	int reassociate; /* reassociation requested */
327189251Ssam	int disconnected; /* all connections disabled; i.e., do no reassociate
328189251Ssam			   * before this has been cleared */
329189251Ssam	struct wpa_ssid *current_ssid;
330214734Srpaulo	struct wpa_bss *current_bss;
331189251Ssam	int ap_ies_from_associnfo;
332214734Srpaulo	unsigned int assoc_freq;
333189251Ssam
334189251Ssam	/* Selected configuration (based on Beacon/ProbeResp WPA IE) */
335189251Ssam	int pairwise_cipher;
336189251Ssam	int group_cipher;
337189251Ssam	int key_mgmt;
338189251Ssam	int mgmt_group_cipher;
339189251Ssam
340189251Ssam	void *drv_priv; /* private data used by driver_ops */
341209158Srpaulo	void *global_drv_priv;
342189251Ssam
343189251Ssam	struct wpa_ssid *prev_scan_ssid; /* previously scanned SSID;
344189251Ssam					  * NULL = not yet initialized (start
345214734Srpaulo					  * with wildcard SSID)
346214734Srpaulo					  * WILDCARD_SSID_SCAN = wildcard
347189251Ssam					  * SSID was used in the previous scan
348189251Ssam					  */
349214734Srpaulo#define WILDCARD_SSID_SCAN ((struct wpa_ssid *) 1)
350189251Ssam
351214734Srpaulo	void (*scan_res_handler)(struct wpa_supplicant *wpa_s,
352214734Srpaulo				 struct wpa_scan_results *scan_res);
353214734Srpaulo	struct dl_list bss; /* struct wpa_bss::list */
354214734Srpaulo	struct dl_list bss_id; /* struct wpa_bss::list_id */
355214734Srpaulo	size_t num_bss;
356214734Srpaulo	unsigned int bss_update_idx;
357214734Srpaulo	unsigned int bss_next_id;
358189251Ssam
359189251Ssam	struct wpa_driver_ops *driver;
360189251Ssam	int interface_removed; /* whether the network interface has been
361189251Ssam				* removed */
362189251Ssam	struct wpa_sm *wpa;
363189251Ssam	struct eapol_sm *eapol;
364189251Ssam
365189251Ssam	struct ctrl_iface_priv *ctrl_iface;
366189251Ssam
367214734Srpaulo	enum wpa_states wpa_state;
368209158Srpaulo	int scanning;
369189251Ssam	int new_connection;
370189251Ssam	int reassociated_connection;
371189251Ssam
372189251Ssam	int eapol_received; /* number of EAPOL packets received after the
373189251Ssam			     * previous association event */
374189251Ssam
375189251Ssam	struct scard_data *scard;
376189251Ssam
377189251Ssam	unsigned char last_eapol_src[ETH_ALEN];
378189251Ssam
379189251Ssam	int keys_cleared;
380189251Ssam
381189251Ssam	struct wpa_blacklist *blacklist;
382189251Ssam
383189251Ssam	int scan_req; /* manual scan request; this forces a scan even if there
384189251Ssam		       * are no enabled networks in the configuration */
385189251Ssam	int scan_runs; /* number of scan runs since WPS was started */
386189251Ssam
387189251Ssam	struct wpa_client_mlme mlme;
388214734Srpaulo	unsigned int drv_flags;
389214734Srpaulo	int max_scan_ssids;
390214734Srpaulo	unsigned int max_remain_on_chan;
391189251Ssam
392189251Ssam	int pending_mic_error_report;
393189251Ssam	int pending_mic_error_pairwise;
394189251Ssam	int mic_errors_seen; /* Michael MIC errors with the current PTK */
395189251Ssam
396189251Ssam	struct wps_context *wps;
397189251Ssam	int wps_success; /* WPS success event received */
398214734Srpaulo	struct wps_er *wps_er;
399189251Ssam	int blacklist_cleared;
400209158Srpaulo
401209158Srpaulo	struct wpabuf *pending_eapol_rx;
402209158Srpaulo	struct os_time pending_eapol_rx_time;
403209158Srpaulo	u8 pending_eapol_rx_src[ETH_ALEN];
404214734Srpaulo
405214734Srpaulo	struct ibss_rsn *ibss_rsn;
406214734Srpaulo
407214734Srpaulo#ifdef CONFIG_SME
408214734Srpaulo	struct {
409214734Srpaulo		u8 ssid[32];
410214734Srpaulo		size_t ssid_len;
411214734Srpaulo		int freq;
412214734Srpaulo		u8 assoc_req_ie[80];
413214734Srpaulo		size_t assoc_req_ie_len;
414214734Srpaulo		int mfp;
415214734Srpaulo		int ft_used;
416214734Srpaulo		u8 mobility_domain[2];
417214734Srpaulo		u8 *ft_ies;
418214734Srpaulo		size_t ft_ies_len;
419214734Srpaulo		u8 prev_bssid[ETH_ALEN];
420214734Srpaulo		int prev_bssid_set;
421214734Srpaulo		int auth_alg;
422214734Srpaulo	} sme;
423214734Srpaulo#endif /* CONFIG_SME */
424214734Srpaulo
425214734Srpaulo#ifdef CONFIG_AP
426214734Srpaulo	struct hostapd_iface *ap_iface;
427214734Srpaulo	void (*ap_configured_cb)(void *ctx, void *data);
428214734Srpaulo	void *ap_configured_cb_ctx;
429214734Srpaulo	void *ap_configured_cb_data;
430214734Srpaulo#endif /* CONFIG_AP */
431214734Srpaulo
432214734Srpaulo	struct wpa_ssid *bgscan_ssid;
433214734Srpaulo	const struct bgscan_ops *bgscan;
434214734Srpaulo	void *bgscan_priv;
435214734Srpaulo
436214734Srpaulo	int connect_without_scan;
437214734Srpaulo
438214734Srpaulo	int after_wps;
439214734Srpaulo	unsigned int wps_freq;
440189251Ssam};
441189251Ssam
442189251Ssam
443189251Ssam/* wpa_supplicant.c */
444214734Srpauloint wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
445214734Srpaulo
446189251Ssamint wpa_supplicant_reload_configuration(struct wpa_supplicant *wpa_s);
447189251Ssam
448214734Srpauloconst char * wpa_supplicant_state_txt(enum wpa_states state);
449189251Ssamint wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s);
450189251Ssamint wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
451214734Srpaulo			      struct wpa_bss *bss, struct wpa_ssid *ssid,
452189251Ssam			      u8 *wpa_ie, size_t *wpa_ie_len);
453189251Ssamvoid wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
454214734Srpaulo			      struct wpa_bss *bss,
455189251Ssam			      struct wpa_ssid *ssid);
456189251Ssamvoid wpa_supplicant_set_non_wpa_policy(struct wpa_supplicant *wpa_s,
457189251Ssam				       struct wpa_ssid *ssid);
458189251Ssamvoid wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s);
459189251Ssamvoid wpa_clear_keys(struct wpa_supplicant *wpa_s, const u8 *addr);
460189251Ssamvoid wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s,
461189251Ssam				     int sec, int usec);
462214734Srpaulovoid wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
463214734Srpaulo			      enum wpa_states state);
464189251Ssamstruct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s);
465189251Ssamvoid wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s);
466189251Ssamvoid wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
467189251Ssam				   int reason_code);
468189251Ssamvoid wpa_supplicant_disassociate(struct wpa_supplicant *wpa_s,
469189251Ssam				 int reason_code);
470189251Ssam
471214734Srpaulovoid wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s,
472214734Srpaulo				   struct wpa_ssid *ssid);
473214734Srpaulovoid wpa_supplicant_disable_network(struct wpa_supplicant *wpa_s,
474214734Srpaulo				    struct wpa_ssid *ssid);
475214734Srpaulovoid wpa_supplicant_select_network(struct wpa_supplicant *wpa_s,
476214734Srpaulo				   struct wpa_ssid *ssid);
477214734Srpauloint wpa_supplicant_set_ap_scan(struct wpa_supplicant *wpa_s,
478214734Srpaulo			       int ap_scan);
479214734Srpauloint wpa_supplicant_set_debug_params(struct wpa_global *global,
480214734Srpaulo				    int debug_level, int debug_timestamp,
481214734Srpaulo				    int debug_show_keys);
482214734Srpaulo
483189251Ssamvoid wpa_show_license(void);
484189251Ssam
485189251Ssamstruct wpa_supplicant * wpa_supplicant_add_iface(struct wpa_global *global,
486189251Ssam						 struct wpa_interface *iface);
487189251Ssamint wpa_supplicant_remove_iface(struct wpa_global *global,
488189251Ssam				struct wpa_supplicant *wpa_s);
489189251Ssamstruct wpa_supplicant * wpa_supplicant_get_iface(struct wpa_global *global,
490189251Ssam						 const char *ifname);
491189251Ssamstruct wpa_global * wpa_supplicant_init(struct wpa_params *params);
492189251Ssamint wpa_supplicant_run(struct wpa_global *global);
493189251Ssamvoid wpa_supplicant_deinit(struct wpa_global *global);
494189251Ssam
495189251Ssamint wpa_supplicant_scard_init(struct wpa_supplicant *wpa_s,
496189251Ssam			      struct wpa_ssid *ssid);
497214734Srpaulovoid wpa_supplicant_terminate_proc(struct wpa_global *global);
498214734Srpaulovoid wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
499214734Srpaulo			     const u8 *buf, size_t len);
500214734Srpauloenum wpa_key_mgmt key_mgmt2driver(int key_mgmt);
501214734Srpauloenum wpa_cipher cipher_suite2driver(int cipher);
502189251Ssam
503189251Ssam/* events.c */
504189251Ssamvoid wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s);
505214734Srpaulovoid wpa_supplicant_connect(struct wpa_supplicant *wpa_s,
506214734Srpaulo			    struct wpa_bss *selected,
507214734Srpaulo			    struct wpa_ssid *ssid);
508189251Ssam
509214734Srpaulo/* eap_register.c */
510214734Srpauloint eap_register_methods(void);
511189251Ssam
512189251Ssam#endif /* WPA_SUPPLICANT_I_H */
513