wpa_supplicant_i.h 18 KB

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