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