You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wpa_supplicant_i.h 18KB

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