1189251Ssam/*
2189251Ssam * WPA Supplicant / Configuration file structures
3252726Srpaulo * Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi>
4189251Ssam *
5252726Srpaulo * This software may be distributed under the terms of the BSD license.
6252726Srpaulo * See README for more details.
7189251Ssam */
8189251Ssam
9189251Ssam#ifndef CONFIG_H
10189251Ssam#define CONFIG_H
11189251Ssam
12189251Ssam#define DEFAULT_EAPOL_VERSION 1
13189251Ssam#ifdef CONFIG_NO_SCAN_PROCESSING
14189251Ssam#define DEFAULT_AP_SCAN 2
15189251Ssam#else /* CONFIG_NO_SCAN_PROCESSING */
16189251Ssam#define DEFAULT_AP_SCAN 1
17189251Ssam#endif /* CONFIG_NO_SCAN_PROCESSING */
18281806Srpaulo#define DEFAULT_USER_MPM 1
19281806Srpaulo#define DEFAULT_MAX_PEER_LINKS 99
20281806Srpaulo#define DEFAULT_MESH_MAX_INACTIVITY 300
21289549Srpaulo/*
22289549Srpaulo * The default dot11RSNASAERetransPeriod is defined as 40 ms in the standard,
23289549Srpaulo * but use 1000 ms in practice to avoid issues on low power CPUs.
24289549Srpaulo */
25289549Srpaulo#define DEFAULT_DOT11_RSNA_SAE_RETRANS_PERIOD 1000
26189251Ssam#define DEFAULT_FAST_REAUTH 1
27252726Srpaulo#define DEFAULT_P2P_GO_INTENT 7
28252726Srpaulo#define DEFAULT_P2P_INTRA_BSS 1
29252726Srpaulo#define DEFAULT_P2P_GO_MAX_INACTIVITY (5 * 60)
30281806Srpaulo#define DEFAULT_P2P_OPTIMIZE_LISTEN_CHAN 0
31214734Srpaulo#define DEFAULT_BSS_MAX_COUNT 200
32252726Srpaulo#define DEFAULT_BSS_EXPIRATION_AGE 180
33252726Srpaulo#define DEFAULT_BSS_EXPIRATION_SCAN_COUNT 2
34252726Srpaulo#define DEFAULT_MAX_NUM_STA 128
35346981Scy#define DEFAULT_AP_ISOLATE 0
36252726Srpaulo#define DEFAULT_ACCESS_NETWORK_TYPE 15
37281806Srpaulo#define DEFAULT_SCAN_CUR_FREQ 0
38281806Srpaulo#define DEFAULT_P2P_SEARCH_DELAY 500
39281806Srpaulo#define DEFAULT_RAND_ADDR_LIFETIME 60
40281806Srpaulo#define DEFAULT_KEY_MGMT_OFFLOAD 1
41281806Srpaulo#define DEFAULT_CERT_IN_CB 1
42281806Srpaulo#define DEFAULT_P2P_GO_CTWINDOW 0
43337817Scy#define DEFAULT_WPA_RSC_RELAXATION 1
44337817Scy#define DEFAULT_MBO_CELL_CAPA MBO_CELL_CAPA_NOT_SUPPORTED
45346981Scy#define DEFAULT_DISASSOC_IMMINENT_RSSI_THRESHOLD -75
46346981Scy#define DEFAULT_OCE_SUPPORT OCE_STA
47189251Ssam
48189251Ssam#include "config_ssid.h"
49252726Srpaulo#include "wps/wps.h"
50289549Srpaulo#include "common/ieee802_11_defs.h"
51252726Srpaulo#include "common/ieee802_11_common.h"
52189251Ssam
53189251Ssam
54346981Scy#define MAX_ROAMING_CONS 36
55346981Scy#define MAX_ROAMING_CONS_OI_LEN 15
56346981Scy
57252726Srpaulostruct wpa_cred {
58252726Srpaulo	/**
59252726Srpaulo	 * next - Next credential in the list
60252726Srpaulo	 *
61252726Srpaulo	 * This pointer can be used to iterate over all credentials. The head
62252726Srpaulo	 * of this list is stored in the cred field of struct wpa_config.
63252726Srpaulo	 */
64252726Srpaulo	struct wpa_cred *next;
65252726Srpaulo
66252726Srpaulo	/**
67252726Srpaulo	 * id - Unique id for the credential
68252726Srpaulo	 *
69252726Srpaulo	 * This identifier is used as a unique identifier for each credential
70252726Srpaulo	 * block when using the control interface. Each credential is allocated
71252726Srpaulo	 * an id when it is being created, either when reading the
72252726Srpaulo	 * configuration file or when a new credential is added through the
73252726Srpaulo	 * control interface.
74252726Srpaulo	 */
75252726Srpaulo	int id;
76252726Srpaulo
77252726Srpaulo	/**
78281806Srpaulo	 * temporary - Whether this credential is temporary and not to be saved
79281806Srpaulo	 */
80281806Srpaulo	int temporary;
81281806Srpaulo
82281806Srpaulo	/**
83252726Srpaulo	 * priority - Priority group
84252726Srpaulo	 *
85252726Srpaulo	 * By default, all networks and credentials get the same priority group
86252726Srpaulo	 * (0). This field can be used to give higher priority for credentials
87252726Srpaulo	 * (and similarly in struct wpa_ssid for network blocks) to change the
88252726Srpaulo	 * Interworking automatic networking selection behavior. The matching
89252726Srpaulo	 * network (based on either an enabled network block or a credential)
90252726Srpaulo	 * with the highest priority value will be selected.
91252726Srpaulo	 */
92252726Srpaulo	int priority;
93252726Srpaulo
94252726Srpaulo	/**
95252726Srpaulo	 * pcsc - Use PC/SC and SIM/USIM card
96252726Srpaulo	 */
97252726Srpaulo	int pcsc;
98252726Srpaulo
99252726Srpaulo	/**
100252726Srpaulo	 * realm - Home Realm for Interworking
101252726Srpaulo	 */
102252726Srpaulo	char *realm;
103252726Srpaulo
104252726Srpaulo	/**
105252726Srpaulo	 * username - Username for Interworking network selection
106252726Srpaulo	 */
107252726Srpaulo	char *username;
108252726Srpaulo
109252726Srpaulo	/**
110252726Srpaulo	 * password - Password for Interworking network selection
111252726Srpaulo	 */
112252726Srpaulo	char *password;
113252726Srpaulo
114252726Srpaulo	/**
115252726Srpaulo	 * ext_password - Whether password is a name for external storage
116252726Srpaulo	 */
117252726Srpaulo	int ext_password;
118252726Srpaulo
119252726Srpaulo	/**
120252726Srpaulo	 * ca_cert - CA certificate for Interworking network selection
121252726Srpaulo	 */
122252726Srpaulo	char *ca_cert;
123252726Srpaulo
124252726Srpaulo	/**
125252726Srpaulo	 * client_cert - File path to client certificate file (PEM/DER)
126252726Srpaulo	 *
127252726Srpaulo	 * This field is used with Interworking networking selection for a case
128252726Srpaulo	 * where client certificate/private key is used for authentication
129252726Srpaulo	 * (EAP-TLS). Full path to the file should be used since working
130252726Srpaulo	 * directory may change when wpa_supplicant is run in the background.
131252726Srpaulo	 *
132252726Srpaulo	 * Alternatively, a named configuration blob can be used by setting
133252726Srpaulo	 * this to blob://blob_name.
134252726Srpaulo	 */
135252726Srpaulo	char *client_cert;
136252726Srpaulo
137252726Srpaulo	/**
138252726Srpaulo	 * private_key - File path to client private key file (PEM/DER/PFX)
139252726Srpaulo	 *
140252726Srpaulo	 * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be
141252726Srpaulo	 * commented out. Both the private key and certificate will be read
142252726Srpaulo	 * from the PKCS#12 file in this case. Full path to the file should be
143252726Srpaulo	 * used since working directory may change when wpa_supplicant is run
144252726Srpaulo	 * in the background.
145252726Srpaulo	 *
146252726Srpaulo	 * Windows certificate store can be used by leaving client_cert out and
147252726Srpaulo	 * configuring private_key in one of the following formats:
148252726Srpaulo	 *
149252726Srpaulo	 * cert://substring_to_match
150252726Srpaulo	 *
151252726Srpaulo	 * hash://certificate_thumbprint_in_hex
152252726Srpaulo	 *
153252726Srpaulo	 * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4"
154252726Srpaulo	 *
155252726Srpaulo	 * Note that when running wpa_supplicant as an application, the user
156252726Srpaulo	 * certificate store (My user account) is used, whereas computer store
157252726Srpaulo	 * (Computer account) is used when running wpasvc as a service.
158252726Srpaulo	 *
159252726Srpaulo	 * Alternatively, a named configuration blob can be used by setting
160252726Srpaulo	 * this to blob://blob_name.
161252726Srpaulo	 */
162252726Srpaulo	char *private_key;
163252726Srpaulo
164252726Srpaulo	/**
165252726Srpaulo	 * private_key_passwd - Password for private key file
166252726Srpaulo	 */
167252726Srpaulo	char *private_key_passwd;
168252726Srpaulo
169252726Srpaulo	/**
170252726Srpaulo	 * imsi - IMSI in <MCC> | <MNC> | '-' | <MSIN> format
171252726Srpaulo	 */
172252726Srpaulo	char *imsi;
173252726Srpaulo
174252726Srpaulo	/**
175252726Srpaulo	 * milenage - Milenage parameters for SIM/USIM simulator in
176252726Srpaulo	 *	<Ki>:<OPc>:<SQN> format
177252726Srpaulo	 */
178252726Srpaulo	char *milenage;
179252726Srpaulo
180252726Srpaulo	/**
181281806Srpaulo	 * domain_suffix_match - Constraint for server domain name
182252726Srpaulo	 *
183281806Srpaulo	 * If set, this FQDN is used as a suffix match requirement for the AAA
184281806Srpaulo	 * server certificate in SubjectAltName dNSName element(s). If a
185281806Srpaulo	 * matching dNSName is found, this constraint is met. If no dNSName
186281806Srpaulo	 * values are present, this constraint is matched against SubjectName CN
187281806Srpaulo	 * using same suffix match comparison. Suffix match here means that the
188281806Srpaulo	 * host/domain name is compared one label at a time starting from the
189281806Srpaulo	 * top-level domain and all the labels in @domain_suffix_match shall be
190281806Srpaulo	 * included in the certificate. The certificate may include additional
191281806Srpaulo	 * sub-level labels in addition to the required labels.
192281806Srpaulo	 *
193281806Srpaulo	 * For example, domain_suffix_match=example.com would match
194281806Srpaulo	 * test.example.com but would not match test-example.com.
195281806Srpaulo	 */
196281806Srpaulo	char *domain_suffix_match;
197281806Srpaulo
198281806Srpaulo	/**
199281806Srpaulo	 * domain - Home service provider FQDN(s)
200281806Srpaulo	 *
201252726Srpaulo	 * This is used to compare against the Domain Name List to figure out
202281806Srpaulo	 * whether the AP is operated by the Home SP. Multiple domain entries
203281806Srpaulo	 * can be used to configure alternative FQDNs that will be considered
204281806Srpaulo	 * home networks.
205252726Srpaulo	 */
206281806Srpaulo	char **domain;
207252726Srpaulo
208252726Srpaulo	/**
209281806Srpaulo	 * num_domain - Number of FQDNs in the domain array
210281806Srpaulo	 */
211281806Srpaulo	size_t num_domain;
212281806Srpaulo
213281806Srpaulo	/**
214252726Srpaulo	 * roaming_consortium - Roaming Consortium OI
215252726Srpaulo	 *
216252726Srpaulo	 * If roaming_consortium_len is non-zero, this field contains the
217252726Srpaulo	 * Roaming Consortium OI that can be used to determine which access
218252726Srpaulo	 * points support authentication with this credential. This is an
219252726Srpaulo	 * alternative to the use of the realm parameter. When using Roaming
220252726Srpaulo	 * Consortium to match the network, the EAP parameters need to be
221252726Srpaulo	 * pre-configured with the credential since the NAI Realm information
222252726Srpaulo	 * may not be available or fetched.
223252726Srpaulo	 */
224252726Srpaulo	u8 roaming_consortium[15];
225252726Srpaulo
226252726Srpaulo	/**
227252726Srpaulo	 * roaming_consortium_len - Length of roaming_consortium
228252726Srpaulo	 */
229252726Srpaulo	size_t roaming_consortium_len;
230252726Srpaulo
231346981Scy	/**
232346981Scy	 * required_roaming_consortium - Required Roaming Consortium OI
233346981Scy	 *
234346981Scy	 * If required_roaming_consortium_len is non-zero, this field contains
235346981Scy	 * the Roaming Consortium OI that is required to be advertised by the AP
236346981Scy	 * for the credential to be considered matching.
237346981Scy	 */
238281806Srpaulo	u8 required_roaming_consortium[15];
239346981Scy
240346981Scy	/**
241346981Scy	 * required_roaming_consortium_len - Length of required_roaming_consortium
242346981Scy	 */
243281806Srpaulo	size_t required_roaming_consortium_len;
244281806Srpaulo
245252726Srpaulo	/**
246346981Scy	 * roaming_consortiums - Roaming Consortium OI(s) memberships
247346981Scy	 *
248346981Scy	 * This field contains one or more OIs identifying the roaming
249346981Scy	 * consortiums of which the provider is a member. The list is sorted
250346981Scy	 * from the most preferred one to the least preferred one. A match
251346981Scy	 * between the Roaming Consortium OIs advertised by an AP and the OIs
252346981Scy	 * in this list indicates that successful authentication is possible.
253346981Scy	 * (Hotspot 2.0 PerProviderSubscription/<X+>/HomeSP/RoamingConsortiumOI)
254346981Scy	 */
255346981Scy	u8 roaming_consortiums[MAX_ROAMING_CONS][MAX_ROAMING_CONS_OI_LEN];
256346981Scy
257346981Scy	/**
258346981Scy	 * roaming_consortiums_len - Length on roaming_consortiums[i]
259346981Scy	 */
260346981Scy	size_t roaming_consortiums_len[MAX_ROAMING_CONS];
261346981Scy
262346981Scy	/**
263346981Scy	 * num_roaming_consortiums - Number of entries in roaming_consortiums
264346981Scy	 */
265346981Scy	unsigned int num_roaming_consortiums;
266346981Scy
267346981Scy	/**
268252726Srpaulo	 * eap_method - EAP method to use
269252726Srpaulo	 *
270252726Srpaulo	 * Pre-configured EAP method to use with this credential or %NULL to
271252726Srpaulo	 * indicate no EAP method is selected, i.e., the method will be
272252726Srpaulo	 * selected automatically based on ANQP information.
273252726Srpaulo	 */
274252726Srpaulo	struct eap_method_type *eap_method;
275252726Srpaulo
276252726Srpaulo	/**
277252726Srpaulo	 * phase1 - Phase 1 (outer authentication) parameters
278252726Srpaulo	 *
279252726Srpaulo	 * Pre-configured EAP parameters or %NULL.
280252726Srpaulo	 */
281252726Srpaulo	char *phase1;
282252726Srpaulo
283252726Srpaulo	/**
284252726Srpaulo	 * phase2 - Phase 2 (inner authentication) parameters
285252726Srpaulo	 *
286252726Srpaulo	 * Pre-configured EAP parameters or %NULL.
287252726Srpaulo	 */
288252726Srpaulo	char *phase2;
289252726Srpaulo
290252726Srpaulo	struct excluded_ssid {
291289549Srpaulo		u8 ssid[SSID_MAX_LEN];
292252726Srpaulo		size_t ssid_len;
293252726Srpaulo	} *excluded_ssid;
294252726Srpaulo	size_t num_excluded_ssid;
295281806Srpaulo
296281806Srpaulo	struct roaming_partner {
297281806Srpaulo		char fqdn[128];
298281806Srpaulo		int exact_match;
299281806Srpaulo		u8 priority;
300281806Srpaulo		char country[3];
301281806Srpaulo	} *roaming_partner;
302281806Srpaulo	size_t num_roaming_partner;
303281806Srpaulo
304281806Srpaulo	int update_identifier;
305281806Srpaulo
306281806Srpaulo	/**
307281806Srpaulo	 * provisioning_sp - FQDN of the SP that provisioned the credential
308281806Srpaulo	 */
309281806Srpaulo	char *provisioning_sp;
310281806Srpaulo
311281806Srpaulo	/**
312281806Srpaulo	 * sp_priority - Credential priority within a provisioning SP
313281806Srpaulo	 *
314281806Srpaulo	 * This is the priority of the credential among all credentials
315281806Srpaulo	 * provisionined by the same SP (i.e., for entries that have identical
316281806Srpaulo	 * provisioning_sp value). The range of this priority is 0-255 with 0
317281806Srpaulo	 * being the highest and 255 the lower priority.
318281806Srpaulo	 */
319281806Srpaulo	int sp_priority;
320281806Srpaulo
321281806Srpaulo	unsigned int min_dl_bandwidth_home;
322281806Srpaulo	unsigned int min_ul_bandwidth_home;
323281806Srpaulo	unsigned int min_dl_bandwidth_roaming;
324281806Srpaulo	unsigned int min_ul_bandwidth_roaming;
325281806Srpaulo
326281806Srpaulo	/**
327281806Srpaulo	 * max_bss_load - Maximum BSS Load Channel Utilization (1..255)
328281806Srpaulo	 * This value is used as the maximum channel utilization for network
329281806Srpaulo	 * selection purposes for home networks. If the AP does not advertise
330281806Srpaulo	 * BSS Load or if the limit would prevent any connection, this
331281806Srpaulo	 * constraint will be ignored.
332281806Srpaulo	 */
333281806Srpaulo	unsigned int max_bss_load;
334281806Srpaulo
335281806Srpaulo	unsigned int num_req_conn_capab;
336281806Srpaulo	u8 *req_conn_capab_proto;
337281806Srpaulo	int **req_conn_capab_port;
338281806Srpaulo
339281806Srpaulo	/**
340281806Srpaulo	 * ocsp - Whether to use/require OCSP to check server certificate
341281806Srpaulo	 *
342281806Srpaulo	 * 0 = do not use OCSP stapling (TLS certificate status extension)
343281806Srpaulo	 * 1 = try to use OCSP stapling, but not require response
344281806Srpaulo	 * 2 = require valid OCSP stapling response
345281806Srpaulo	 */
346281806Srpaulo	int ocsp;
347281806Srpaulo
348281806Srpaulo	/**
349281806Srpaulo	 * sim_num - User selected SIM identifier
350281806Srpaulo	 *
351281806Srpaulo	 * This variable is used for identifying which SIM is used if the system
352281806Srpaulo	 * has more than one.
353281806Srpaulo	 */
354281806Srpaulo	int sim_num;
355252726Srpaulo};
356252726Srpaulo
357252726Srpaulo
358252726Srpaulo#define CFG_CHANGED_DEVICE_NAME BIT(0)
359252726Srpaulo#define CFG_CHANGED_CONFIG_METHODS BIT(1)
360252726Srpaulo#define CFG_CHANGED_DEVICE_TYPE BIT(2)
361252726Srpaulo#define CFG_CHANGED_OS_VERSION BIT(3)
362252726Srpaulo#define CFG_CHANGED_UUID BIT(4)
363252726Srpaulo#define CFG_CHANGED_COUNTRY BIT(5)
364252726Srpaulo#define CFG_CHANGED_SEC_DEVICE_TYPE BIT(6)
365252726Srpaulo#define CFG_CHANGED_P2P_SSID_POSTFIX BIT(7)
366252726Srpaulo#define CFG_CHANGED_WPS_STRING BIT(8)
367252726Srpaulo#define CFG_CHANGED_P2P_INTRA_BSS BIT(9)
368252726Srpaulo#define CFG_CHANGED_VENDOR_EXTENSION BIT(10)
369252726Srpaulo#define CFG_CHANGED_P2P_LISTEN_CHANNEL BIT(11)
370252726Srpaulo#define CFG_CHANGED_P2P_OPER_CHANNEL BIT(12)
371252726Srpaulo#define CFG_CHANGED_P2P_PREF_CHAN BIT(13)
372252726Srpaulo#define CFG_CHANGED_EXT_PW_BACKEND BIT(14)
373281806Srpaulo#define CFG_CHANGED_NFC_PASSWORD_TOKEN BIT(15)
374281806Srpaulo#define CFG_CHANGED_P2P_PASSPHRASE_LEN BIT(16)
375337817Scy#define CFG_CHANGED_SCHED_SCAN_PLANS BIT(17)
376346981Scy#define CFG_CHANGED_WOWLAN_TRIGGERS BIT(18)
377351611Scy#define CFG_CHANGED_DISABLE_BTM BIT(19)
378252726Srpaulo
379189251Ssam/**
380189251Ssam * struct wpa_config - wpa_supplicant configuration data
381189251Ssam *
382189251Ssam * This data structure is presents the per-interface (radio) configuration
383189251Ssam * data. In many cases, there is only one struct wpa_config instance, but if
384189251Ssam * more than one network interface is being controlled, one instance is used
385189251Ssam * for each.
386189251Ssam */
387189251Ssamstruct wpa_config {
388189251Ssam	/**
389189251Ssam	 * ssid - Head of the global network list
390189251Ssam	 *
391189251Ssam	 * This is the head for the list of all the configured networks.
392189251Ssam	 */
393189251Ssam	struct wpa_ssid *ssid;
394189251Ssam
395189251Ssam	/**
396189251Ssam	 * pssid - Per-priority network lists (in priority order)
397189251Ssam	 */
398189251Ssam	struct wpa_ssid **pssid;
399189251Ssam
400189251Ssam	/**
401189251Ssam	 * num_prio - Number of different priorities used in the pssid lists
402189251Ssam	 *
403189251Ssam	 * This indicates how many per-priority network lists are included in
404189251Ssam	 * pssid.
405189251Ssam	 */
406189251Ssam	int num_prio;
407189251Ssam
408189251Ssam	/**
409252726Srpaulo	 * cred - Head of the credential list
410252726Srpaulo	 *
411252726Srpaulo	 * This is the head for the list of all the configured credentials.
412252726Srpaulo	 */
413252726Srpaulo	struct wpa_cred *cred;
414252726Srpaulo
415252726Srpaulo	/**
416189251Ssam	 * eapol_version - IEEE 802.1X/EAPOL version number
417189251Ssam	 *
418189251Ssam	 * wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which
419189251Ssam	 * defines EAPOL version 2. However, there are many APs that do not
420189251Ssam	 * handle the new version number correctly (they seem to drop the
421189251Ssam	 * frames completely). In order to make wpa_supplicant interoperate
422189251Ssam	 * with these APs, the version number is set to 1 by default. This
423189251Ssam	 * configuration value can be used to set it to the new version (2).
424189251Ssam	 */
425189251Ssam	int eapol_version;
426189251Ssam
427189251Ssam	/**
428189251Ssam	 * ap_scan - AP scanning/selection
429189251Ssam	 *
430189251Ssam	 * By default, wpa_supplicant requests driver to perform AP
431189251Ssam	 * scanning and then uses the scan results to select a
432189251Ssam	 * suitable AP. Another alternative is to allow the driver to
433189251Ssam	 * take care of AP scanning and selection and use
434189251Ssam	 * wpa_supplicant just to process EAPOL frames based on IEEE
435189251Ssam	 * 802.11 association information from the driver.
436189251Ssam	 *
437189251Ssam	 * 1: wpa_supplicant initiates scanning and AP selection (default).
438189251Ssam	 *
439189251Ssam	 * 0: Driver takes care of scanning, AP selection, and IEEE 802.11
440189251Ssam	 * association parameters (e.g., WPA IE generation); this mode can
441189251Ssam	 * also be used with non-WPA drivers when using IEEE 802.1X mode;
442189251Ssam	 * do not try to associate with APs (i.e., external program needs
443189251Ssam	 * to control association). This mode must also be used when using
444189251Ssam	 * wired Ethernet drivers.
445189251Ssam	 *
446189251Ssam	 * 2: like 0, but associate with APs using security policy and SSID
447189251Ssam	 * (but not BSSID); this can be used, e.g., with ndiswrapper and NDIS
448189251Ssam	 * drivers to enable operation with hidden SSIDs and optimized roaming;
449189251Ssam	 * in this mode, the network blocks in the configuration are tried
450189251Ssam	 * one by one until the driver reports successful association; each
451189251Ssam	 * network block should have explicit security policy (i.e., only one
452189251Ssam	 * option in the lists) for key_mgmt, pairwise, group, proto variables.
453289549Srpaulo	 *
454289549Srpaulo	 * Note: ap_scan=2 should not be used with the nl80211 driver interface
455289549Srpaulo	 * (the current Linux interface). ap_scan=1 is optimized work working
456289549Srpaulo	 * with nl80211. For finding networks using hidden SSID, scan_ssid=1 in
457289549Srpaulo	 * the network block can be used with nl80211.
458189251Ssam	 */
459189251Ssam	int ap_scan;
460189251Ssam
461189251Ssam	/**
462281806Srpaulo	 * bgscan - Background scan and roaming parameters or %NULL if none
463281806Srpaulo	 *
464281806Srpaulo	 * This is an optional set of parameters for background scanning and
465281806Srpaulo	 * roaming within a network (ESS). For more detailed information see
466281806Srpaulo	 * ssid block documentation.
467281806Srpaulo	 *
468281806Srpaulo	 * The variable defines default bgscan behavior for all BSS station
469281806Srpaulo	 * networks except for those which have their own bgscan configuration.
470281806Srpaulo	 */
471281806Srpaulo	 char *bgscan;
472281806Srpaulo
473281806Srpaulo	/**
474252726Srpaulo	 * disable_scan_offload - Disable automatic offloading of scan requests
475252726Srpaulo	 *
476252726Srpaulo	 * By default, %wpa_supplicant tries to offload scanning if the driver
477252726Srpaulo	 * indicates support for this (sched_scan). This configuration
478252726Srpaulo	 * parameter can be used to disable this offloading mechanism.
479252726Srpaulo	 */
480252726Srpaulo	int disable_scan_offload;
481252726Srpaulo
482252726Srpaulo	/**
483189251Ssam	 * ctrl_interface - Parameters for the control interface
484189251Ssam	 *
485189251Ssam	 * If this is specified, %wpa_supplicant will open a control interface
486189251Ssam	 * that is available for external programs to manage %wpa_supplicant.
487189251Ssam	 * The meaning of this string depends on which control interface
488252726Srpaulo	 * mechanism is used. For all cases, the existence of this parameter
489189251Ssam	 * in configuration is used to determine whether the control interface
490189251Ssam	 * is enabled.
491189251Ssam	 *
492189251Ssam	 * For UNIX domain sockets (default on Linux and BSD): This is a
493189251Ssam	 * directory that will be created for UNIX domain sockets for listening
494189251Ssam	 * to requests from external programs (CLI/GUI, etc.) for status
495189251Ssam	 * information and configuration. The socket file will be named based
496189251Ssam	 * on the interface name, so multiple %wpa_supplicant processes can be
497189251Ssam	 * run at the same time if more than one interface is used.
498189251Ssam	 * /var/run/wpa_supplicant is the recommended directory for sockets and
499189251Ssam	 * by default, wpa_cli will use it when trying to connect with
500189251Ssam	 * %wpa_supplicant.
501189251Ssam	 *
502189251Ssam	 * Access control for the control interface can be configured
503189251Ssam	 * by setting the directory to allow only members of a group
504189251Ssam	 * to use sockets. This way, it is possible to run
505189251Ssam	 * %wpa_supplicant as root (since it needs to change network
506189251Ssam	 * configuration and open raw sockets) and still allow GUI/CLI
507189251Ssam	 * components to be run as non-root users. However, since the
508189251Ssam	 * control interface can be used to change the network
509189251Ssam	 * configuration, this access needs to be protected in many
510189251Ssam	 * cases. By default, %wpa_supplicant is configured to use gid
511189251Ssam	 * 0 (root). If you want to allow non-root users to use the
512189251Ssam	 * control interface, add a new group and change this value to
513189251Ssam	 * match with that group. Add users that should have control
514189251Ssam	 * interface access to this group.
515189251Ssam	 *
516189251Ssam	 * When configuring both the directory and group, use following format:
517189251Ssam	 * DIR=/var/run/wpa_supplicant GROUP=wheel
518189251Ssam	 * DIR=/var/run/wpa_supplicant GROUP=0
519189251Ssam	 * (group can be either group name or gid)
520189251Ssam	 *
521189251Ssam	 * For UDP connections (default on Windows): The value will be ignored.
522189251Ssam	 * This variable is just used to select that the control interface is
523189251Ssam	 * to be created. The value can be set to, e.g., udp
524189251Ssam	 * (ctrl_interface=udp).
525189251Ssam	 *
526189251Ssam	 * For Windows Named Pipe: This value can be used to set the security
527189251Ssam	 * descriptor for controlling access to the control interface. Security
528189251Ssam	 * descriptor can be set using Security Descriptor String Format (see
529189251Ssam	 * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/security_descriptor_string_format.asp).
530189251Ssam	 * The descriptor string needs to be prefixed with SDDL=. For example,
531189251Ssam	 * ctrl_interface=SDDL=D: would set an empty DACL (which will reject
532189251Ssam	 * all connections).
533189251Ssam	 */
534189251Ssam	char *ctrl_interface;
535189251Ssam
536189251Ssam	/**
537189251Ssam	 * ctrl_interface_group - Control interface group (DEPRECATED)
538189251Ssam	 *
539189251Ssam	 * This variable is only used for backwards compatibility. Group for
540189251Ssam	 * UNIX domain sockets should now be specified using GROUP=group in
541189251Ssam	 * ctrl_interface variable.
542189251Ssam	 */
543189251Ssam	char *ctrl_interface_group;
544189251Ssam
545189251Ssam	/**
546189251Ssam	 * fast_reauth - EAP fast re-authentication (session resumption)
547189251Ssam	 *
548189251Ssam	 * By default, fast re-authentication is enabled for all EAP methods
549189251Ssam	 * that support it. This variable can be used to disable fast
550189251Ssam	 * re-authentication (by setting fast_reauth=0). Normally, there is no
551189251Ssam	 * need to disable fast re-authentication.
552189251Ssam	 */
553189251Ssam	int fast_reauth;
554189251Ssam
555189251Ssam	/**
556189251Ssam	 * opensc_engine_path - Path to the OpenSSL engine for opensc
557189251Ssam	 *
558189251Ssam	 * This is an OpenSSL specific configuration option for loading OpenSC
559189251Ssam	 * engine (engine_opensc.so); if %NULL, this engine is not loaded.
560189251Ssam	 */
561189251Ssam	char *opensc_engine_path;
562189251Ssam
563189251Ssam	/**
564189251Ssam	 * pkcs11_engine_path - Path to the OpenSSL engine for PKCS#11
565189251Ssam	 *
566189251Ssam	 * This is an OpenSSL specific configuration option for loading PKCS#11
567189251Ssam	 * engine (engine_pkcs11.so); if %NULL, this engine is not loaded.
568189251Ssam	 */
569189251Ssam	char *pkcs11_engine_path;
570189251Ssam
571189251Ssam	/**
572189251Ssam	 * pkcs11_module_path - Path to the OpenSSL OpenSC/PKCS#11 module
573189251Ssam	 *
574189251Ssam	 * This is an OpenSSL specific configuration option for configuring
575189251Ssam	 * path to OpenSC/PKCS#11 engine (opensc-pkcs11.so); if %NULL, this
576189251Ssam	 * module is not loaded.
577189251Ssam	 */
578189251Ssam	char *pkcs11_module_path;
579189251Ssam
580189251Ssam	/**
581281806Srpaulo	 * openssl_ciphers - OpenSSL cipher string
582281806Srpaulo	 *
583281806Srpaulo	 * This is an OpenSSL specific configuration option for configuring the
584281806Srpaulo	 * default ciphers. If not set, "DEFAULT:!EXP:!LOW" is used as the
585281806Srpaulo	 * default.
586281806Srpaulo	 */
587281806Srpaulo	char *openssl_ciphers;
588281806Srpaulo
589281806Srpaulo	/**
590252726Srpaulo	 * pcsc_reader - PC/SC reader name prefix
591252726Srpaulo	 *
592252726Srpaulo	 * If not %NULL, PC/SC reader with a name that matches this prefix is
593252726Srpaulo	 * initialized for SIM/USIM access. Empty string can be used to match
594252726Srpaulo	 * the first available reader.
595252726Srpaulo	 */
596252726Srpaulo	char *pcsc_reader;
597252726Srpaulo
598252726Srpaulo	/**
599252726Srpaulo	 * pcsc_pin - PIN for USIM, GSM SIM, and smartcards
600252726Srpaulo	 *
601252726Srpaulo	 * This field is used to configure PIN for SIM/USIM for EAP-SIM and
602252726Srpaulo	 * EAP-AKA. If left out, this will be asked through control interface.
603252726Srpaulo	 */
604252726Srpaulo	char *pcsc_pin;
605252726Srpaulo
606252726Srpaulo	/**
607281806Srpaulo	 * external_sim - Use external processing for SIM/USIM operations
608281806Srpaulo	 */
609281806Srpaulo	int external_sim;
610281806Srpaulo
611281806Srpaulo	/**
612189251Ssam	 * driver_param - Driver interface parameters
613189251Ssam	 *
614189251Ssam	 * This text string is passed to the selected driver interface with the
615189251Ssam	 * optional struct wpa_driver_ops::set_param() handler. This can be
616189251Ssam	 * used to configure driver specific options without having to add new
617189251Ssam	 * driver interface functionality.
618189251Ssam	 */
619189251Ssam	char *driver_param;
620189251Ssam
621189251Ssam	/**
622189251Ssam	 * dot11RSNAConfigPMKLifetime - Maximum lifetime of a PMK
623189251Ssam	 *
624189251Ssam	 * dot11 MIB variable for the maximum lifetime of a PMK in the PMK
625189251Ssam	 * cache (unit: seconds).
626189251Ssam	 */
627189251Ssam	unsigned int dot11RSNAConfigPMKLifetime;
628189251Ssam
629189251Ssam	/**
630189251Ssam	 * dot11RSNAConfigPMKReauthThreshold - PMK re-authentication threshold
631189251Ssam	 *
632189251Ssam	 * dot11 MIB variable for the percentage of the PMK lifetime
633189251Ssam	 * that should expire before an IEEE 802.1X reauthentication occurs.
634189251Ssam	 */
635189251Ssam	unsigned int dot11RSNAConfigPMKReauthThreshold;
636189251Ssam
637189251Ssam	/**
638189251Ssam	 * dot11RSNAConfigSATimeout - Security association timeout
639189251Ssam	 *
640189251Ssam	 * dot11 MIB variable for the maximum time a security association
641189251Ssam	 * shall take to set up (unit: seconds).
642189251Ssam	 */
643189251Ssam	unsigned int dot11RSNAConfigSATimeout;
644189251Ssam
645189251Ssam	/**
646189251Ssam	 * update_config - Is wpa_supplicant allowed to update configuration
647189251Ssam	 *
648189251Ssam	 * This variable control whether wpa_supplicant is allow to re-write
649189251Ssam	 * its configuration with wpa_config_write(). If this is zero,
650189251Ssam	 * configuration data is only changed in memory and the external data
651189251Ssam	 * is not overriden. If this is non-zero, wpa_supplicant will update
652189251Ssam	 * the configuration data (e.g., a file) whenever configuration is
653189251Ssam	 * changed. This update may replace the old configuration which can
654189251Ssam	 * remove comments from it in case of a text file configuration.
655189251Ssam	 */
656189251Ssam	int update_config;
657189251Ssam
658189251Ssam	/**
659189251Ssam	 * blobs - Configuration blobs
660189251Ssam	 */
661189251Ssam	struct wpa_config_blob *blobs;
662189251Ssam
663189251Ssam	/**
664189251Ssam	 * uuid - Universally Unique IDentifier (UUID; see RFC 4122) for WPS
665189251Ssam	 */
666189251Ssam	u8 uuid[16];
667189251Ssam
668189251Ssam	/**
669346981Scy	 * auto_uuid - Automatic UUID behavior
670346981Scy	 * 0 = generate static value based on the local MAC address (default)
671346981Scy	 * 1 = generate a random UUID every time wpa_supplicant starts
672346981Scy	 */
673346981Scy	int auto_uuid;
674346981Scy
675346981Scy	/**
676189251Ssam	 * device_name - Device Name (WPS)
677189251Ssam	 * User-friendly description of device; up to 32 octets encoded in
678189251Ssam	 * UTF-8
679189251Ssam	 */
680189251Ssam	char *device_name;
681189251Ssam
682189251Ssam	/**
683189251Ssam	 * manufacturer - Manufacturer (WPS)
684189251Ssam	 * The manufacturer of the device (up to 64 ASCII characters)
685189251Ssam	 */
686189251Ssam	char *manufacturer;
687189251Ssam
688189251Ssam	/**
689189251Ssam	 * model_name - Model Name (WPS)
690189251Ssam	 * Model of the device (up to 32 ASCII characters)
691189251Ssam	 */
692189251Ssam	char *model_name;
693189251Ssam
694189251Ssam	/**
695189251Ssam	 * model_number - Model Number (WPS)
696189251Ssam	 * Additional device description (up to 32 ASCII characters)
697189251Ssam	 */
698189251Ssam	char *model_number;
699189251Ssam
700189251Ssam	/**
701189251Ssam	 * serial_number - Serial Number (WPS)
702189251Ssam	 * Serial number of the device (up to 32 characters)
703189251Ssam	 */
704189251Ssam	char *serial_number;
705189251Ssam
706189251Ssam	/**
707189251Ssam	 * device_type - Primary Device Type (WPS)
708189251Ssam	 */
709252726Srpaulo	u8 device_type[WPS_DEV_TYPE_LEN];
710189251Ssam
711189251Ssam	/**
712214734Srpaulo	 * config_methods - Config Methods
713214734Srpaulo	 *
714214734Srpaulo	 * This is a space-separated list of supported WPS configuration
715252726Srpaulo	 * methods. For example, "label virtual_display virtual_push_button
716252726Srpaulo	 * keypad".
717214734Srpaulo	 * Available methods: usba ethernet label display ext_nfc_token
718252726Srpaulo	 * int_nfc_token nfc_interface push_button keypad
719252726Srpaulo	 * virtual_display physical_display
720252726Srpaulo	 * virtual_push_button physical_push_button.
721214734Srpaulo	 */
722214734Srpaulo	char *config_methods;
723214734Srpaulo
724214734Srpaulo	/**
725189251Ssam	 * os_version - OS Version (WPS)
726189251Ssam	 * 4-octet operating system version number
727189251Ssam	 */
728189251Ssam	u8 os_version[4];
729189251Ssam
730189251Ssam	/**
731189251Ssam	 * country - Country code
732189251Ssam	 *
733189251Ssam	 * This is the ISO/IEC alpha2 country code for which we are operating
734189251Ssam	 * in
735189251Ssam	 */
736189251Ssam	char country[2];
737189251Ssam
738189251Ssam	/**
739189251Ssam	 * wps_cred_processing - Credential processing
740189251Ssam	 *
741189251Ssam	 *   0 = process received credentials internally
742189251Ssam	 *   1 = do not process received credentials; just pass them over
743189251Ssam	 *	ctrl_iface to external program(s)
744189251Ssam	 *   2 = process received credentials internally and pass them over
745189251Ssam	 *	ctrl_iface to external program(s)
746189251Ssam	 */
747189251Ssam	int wps_cred_processing;
748214734Srpaulo
749346981Scy	/**
750346981Scy	 * wps_cred_add_sae - Whether to enable SAE automatically for WPS
751346981Scy	 *
752346981Scy	 * 0 = only add the explicitly listed WPA2-PSK configuration
753346981Scy	 * 1 = add both the WPA2-PSK and SAE configuration and enable PMF so
754346981Scy	 *     that the station gets configured in WPA3-Personal transition mode
755346981Scy	 *     (supports both WPA2-Personal (PSK) and WPA3-Personal (SAE) APs).
756346981Scy	 */
757346981Scy	int wps_cred_add_sae;
758346981Scy
759252726Srpaulo#define MAX_SEC_DEVICE_TYPES 5
760214734Srpaulo	/**
761252726Srpaulo	 * sec_device_types - Secondary Device Types (P2P)
762252726Srpaulo	 */
763252726Srpaulo	u8 sec_device_type[MAX_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN];
764252726Srpaulo	int num_sec_device_types;
765252726Srpaulo
766252726Srpaulo	int p2p_listen_reg_class;
767252726Srpaulo	int p2p_listen_channel;
768252726Srpaulo	int p2p_oper_reg_class;
769252726Srpaulo	int p2p_oper_channel;
770252726Srpaulo	int p2p_go_intent;
771252726Srpaulo	char *p2p_ssid_postfix;
772252726Srpaulo	int persistent_reconnect;
773252726Srpaulo	int p2p_intra_bss;
774252726Srpaulo	unsigned int num_p2p_pref_chan;
775252726Srpaulo	struct p2p_channel *p2p_pref_chan;
776281806Srpaulo	struct wpa_freq_range_list p2p_no_go_freq;
777281806Srpaulo	int p2p_add_cli_chan;
778281806Srpaulo	int p2p_ignore_shared_freq;
779281806Srpaulo	int p2p_optimize_listen_chan;
780252726Srpaulo
781252726Srpaulo	struct wpabuf *wps_vendor_ext_m1;
782252726Srpaulo
783252726Srpaulo#define MAX_WPS_VENDOR_EXT 10
784252726Srpaulo	/**
785252726Srpaulo	 * wps_vendor_ext - Vendor extension attributes in WPS
786252726Srpaulo	 */
787252726Srpaulo	struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXT];
788252726Srpaulo
789252726Srpaulo	/**
790252726Srpaulo	 * p2p_group_idle - Maximum idle time in seconds for P2P group
791252726Srpaulo	 *
792252726Srpaulo	 * This value controls how long a P2P group is maintained after there
793252726Srpaulo	 * is no other members in the group. As a GO, this means no associated
794252726Srpaulo	 * stations in the group. As a P2P client, this means no GO seen in
795252726Srpaulo	 * scan results. The maximum idle time is specified in seconds with 0
796252726Srpaulo	 * indicating no time limit, i.e., the P2P group remains in active
797252726Srpaulo	 * state indefinitely until explicitly removed. As a P2P client, the
798252726Srpaulo	 * maximum idle time of P2P_MAX_CLIENT_IDLE seconds is enforced, i.e.,
799252726Srpaulo	 * this parameter is mainly meant for GO use and for P2P client, it can
800252726Srpaulo	 * only be used to reduce the default timeout to smaller value. A
801252726Srpaulo	 * special value -1 can be used to configure immediate removal of the
802252726Srpaulo	 * group for P2P client role on any disconnection after the data
803252726Srpaulo	 * connection has been established.
804252726Srpaulo	 */
805252726Srpaulo	int p2p_group_idle;
806252726Srpaulo
807252726Srpaulo	/**
808289549Srpaulo	 * p2p_go_freq_change_policy - The GO frequency change policy
809289549Srpaulo	 *
810289549Srpaulo	 * This controls the behavior of the GO when there is a change in the
811289549Srpaulo	 * map of the currently used frequencies in case more than one channel
812289549Srpaulo	 * is supported.
813289549Srpaulo	 *
814289549Srpaulo	 * @P2P_GO_FREQ_MOVE_SCM: Prefer working in a single channel mode if
815289549Srpaulo	 * possible. In case the GO is the only interface using its frequency
816289549Srpaulo	 * and there are other station interfaces on other frequencies, the GO
817289549Srpaulo	 * will migrate to one of these frequencies.
818289549Srpaulo	 *
819289549Srpaulo	 * @P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS: Same as P2P_GO_FREQ_MOVE_SCM,
820289549Srpaulo	 * but a transition is possible only in case one of the other used
821289549Srpaulo	 * frequencies is one of the frequencies in the intersection of the
822289549Srpaulo	 * frequency list of the local device and the peer device.
823289549Srpaulo	 *
824289549Srpaulo	 * @P2P_GO_FREQ_MOVE_STAY: Prefer to stay on the current frequency.
825337817Scy	 *
826337817Scy	 * @P2P_GO_FREQ_MOVE_SCM_ECSA: Same as
827337817Scy	 * P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS but a transition is possible only
828337817Scy	 * if all the group members advertise eCSA support.
829289549Srpaulo	 */
830289549Srpaulo	enum {
831289549Srpaulo		P2P_GO_FREQ_MOVE_SCM = 0,
832289549Srpaulo		P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS = 1,
833289549Srpaulo		P2P_GO_FREQ_MOVE_STAY = 2,
834337817Scy		P2P_GO_FREQ_MOVE_SCM_ECSA = 3,
835337817Scy		P2P_GO_FREQ_MOVE_MAX = P2P_GO_FREQ_MOVE_SCM_ECSA,
836289549Srpaulo	} p2p_go_freq_change_policy;
837289549Srpaulo
838289549Srpaulo#define DEFAULT_P2P_GO_FREQ_MOVE P2P_GO_FREQ_MOVE_STAY
839289549Srpaulo
840289549Srpaulo	/**
841281806Srpaulo	 * p2p_passphrase_len - Passphrase length (8..63) for P2P GO
842281806Srpaulo	 *
843281806Srpaulo	 * This parameter controls the length of the random passphrase that is
844281806Srpaulo	 * generated at the GO.
845281806Srpaulo	 */
846281806Srpaulo	unsigned int p2p_passphrase_len;
847281806Srpaulo
848281806Srpaulo	/**
849214734Srpaulo	 * bss_max_count - Maximum number of BSS entries to keep in memory
850214734Srpaulo	 */
851214734Srpaulo	unsigned int bss_max_count;
852214734Srpaulo
853214734Srpaulo	/**
854252726Srpaulo	 * bss_expiration_age - BSS entry age after which it can be expired
855252726Srpaulo	 *
856252726Srpaulo	 * This value controls the time in seconds after which a BSS entry
857252726Srpaulo	 * gets removed if it has not been updated or is not in use.
858252726Srpaulo	 */
859252726Srpaulo	unsigned int bss_expiration_age;
860252726Srpaulo
861252726Srpaulo	/**
862252726Srpaulo	 * bss_expiration_scan_count - Expire BSS after number of scans
863252726Srpaulo	 *
864252726Srpaulo	 * If the BSS entry has not been seen in this many scans, it will be
865252726Srpaulo	 * removed. A value of 1 means that entry is removed after the first
866252726Srpaulo	 * scan in which the BSSID is not seen. Larger values can be used
867252726Srpaulo	 * to avoid BSS entries disappearing if they are not visible in
868252726Srpaulo	 * every scan (e.g., low signal quality or interference).
869252726Srpaulo	 */
870252726Srpaulo	unsigned int bss_expiration_scan_count;
871252726Srpaulo
872252726Srpaulo	/**
873214734Srpaulo	 * filter_ssids - SSID-based scan result filtering
874214734Srpaulo	 *
875214734Srpaulo	 *   0 = do not filter scan results
876214734Srpaulo	 *   1 = only include configured SSIDs in scan results/BSS table
877214734Srpaulo	 */
878214734Srpaulo	int filter_ssids;
879252726Srpaulo
880252726Srpaulo	/**
881252726Srpaulo	 * filter_rssi - RSSI-based scan result filtering
882252726Srpaulo	 *
883252726Srpaulo	 * 0 = do not filter scan results
884252726Srpaulo	 * -n = filter scan results below -n dBm
885252726Srpaulo	 */
886252726Srpaulo	int filter_rssi;
887252726Srpaulo
888252726Srpaulo	/**
889252726Srpaulo	 * max_num_sta - Maximum number of STAs in an AP/P2P GO
890252726Srpaulo	 */
891252726Srpaulo	unsigned int max_num_sta;
892252726Srpaulo
893252726Srpaulo	/**
894346981Scy	 * ap_isolate - Whether to use client isolation feature
895346981Scy	 *
896346981Scy	 * Client isolation can be used to prevent low-level bridging of
897346981Scy	 * frames between associated stations in the BSS. By default,
898346981Scy	 * this bridging is allowed (ap_isolate=0); except in P2P GO case,
899346981Scy	 * where p2p_intra_bss parameter is used to determine whether to allow
900346981Scy	 * intra-BSS forwarding (ap_isolate = !p2p_intra_bss).
901346981Scy	 *
902346981Scy	 * 0 = do not enable AP isolation
903346981Scy	 * 1 = enable AP isolation
904346981Scy	 */
905346981Scy	int ap_isolate;
906346981Scy
907346981Scy	/**
908281806Srpaulo	 * freq_list - Array of allowed scan frequencies or %NULL for all
909281806Srpaulo	 *
910281806Srpaulo	 * This is an optional zero-terminated array of frequencies in
911281806Srpaulo	 * megahertz (MHz) to allow for narrowing scanning range.
912281806Srpaulo	 */
913281806Srpaulo	int *freq_list;
914281806Srpaulo
915281806Srpaulo	/**
916281806Srpaulo	 * scan_cur_freq - Whether to scan only the current channel
917281806Srpaulo	 *
918281806Srpaulo	 * If true, attempt to scan only the current channel if any other
919281806Srpaulo	 * VIFs on this radio are already associated on a particular channel.
920281806Srpaulo	 */
921281806Srpaulo	int scan_cur_freq;
922281806Srpaulo
923281806Srpaulo	/**
924252726Srpaulo	 * changed_parameters - Bitmap of changed parameters since last update
925252726Srpaulo	 */
926252726Srpaulo	unsigned int changed_parameters;
927252726Srpaulo
928252726Srpaulo	/**
929346981Scy	 * disassoc_low_ack - Disassociate stations with massive packet loss
930252726Srpaulo	 */
931252726Srpaulo	int disassoc_low_ack;
932252726Srpaulo
933252726Srpaulo	/**
934252726Srpaulo	 * interworking - Whether Interworking (IEEE 802.11u) is enabled
935252726Srpaulo	 */
936252726Srpaulo	int interworking;
937252726Srpaulo
938252726Srpaulo	/**
939252726Srpaulo	 * access_network_type - Access Network Type
940252726Srpaulo	 *
941252726Srpaulo	 * When Interworking is enabled, scans will be limited to APs that
942252726Srpaulo	 * advertise the specified Access Network Type (0..15; with 15
943252726Srpaulo	 * indicating wildcard match).
944252726Srpaulo	 */
945252726Srpaulo	int access_network_type;
946252726Srpaulo
947346981Scy	 /**
948346981Scy	  * go_interworking - Whether Interworking for P2P GO is enabled
949346981Scy	  */
950346981Scy	int go_interworking;
951346981Scy
952252726Srpaulo	/**
953346981Scy	 * go_access_network_type - P2P GO Access Network Type
954346981Scy	 *
955346981Scy	 * This indicates which access network type to advertise if Interworking
956346981Scy	 * is enabled for P2P GO.
957346981Scy	 */
958346981Scy	int go_access_network_type;
959346981Scy
960346981Scy	/**
961346981Scy	 * go_internet - Interworking: Internet connectivity (0 or 1)
962346981Scy	 */
963346981Scy	int go_internet;
964346981Scy
965346981Scy	/**
966346981Scy	 * go_venue_group - Interworking: Venue group
967346981Scy	 */
968346981Scy	int go_venue_group;
969346981Scy
970346981Scy	/**
971346981Scy	 * go_venue_type: Interworking: Venue type
972346981Scy	 */
973346981Scy	int go_venue_type;
974346981Scy
975346981Scy	/**
976252726Srpaulo	 * hessid - Homogenous ESS identifier
977252726Srpaulo	 *
978252726Srpaulo	 * If this is set (any octet is non-zero), scans will be used to
979252726Srpaulo	 * request response only from BSSes belonging to the specified
980252726Srpaulo	 * Homogeneous ESS. This is used only if interworking is enabled.
981252726Srpaulo	 */
982252726Srpaulo	u8 hessid[ETH_ALEN];
983252726Srpaulo
984252726Srpaulo	/**
985252726Srpaulo	 * hs20 - Hotspot 2.0
986252726Srpaulo	 */
987252726Srpaulo	int hs20;
988252726Srpaulo
989252726Srpaulo	/**
990252726Srpaulo	 * pbc_in_m1 - AP mode WPS probing workaround for PBC with Windows 7
991252726Srpaulo	 *
992252726Srpaulo	 * Windows 7 uses incorrect way of figuring out AP's WPS capabilities
993252726Srpaulo	 * by acting as a Registrar and using M1 from the AP. The config
994252726Srpaulo	 * methods attribute in that message is supposed to indicate only the
995252726Srpaulo	 * configuration method supported by the AP in Enrollee role, i.e., to
996252726Srpaulo	 * add an external Registrar. For that case, PBC shall not be used and
997252726Srpaulo	 * as such, the PushButton config method is removed from M1 by default.
998252726Srpaulo	 * If pbc_in_m1=1 is included in the configuration file, the PushButton
999252726Srpaulo	 * config method is left in M1 (if included in config_methods
1000252726Srpaulo	 * parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from
1001252726Srpaulo	 * a label in the AP).
1002252726Srpaulo	 */
1003252726Srpaulo	int pbc_in_m1;
1004252726Srpaulo
1005252726Srpaulo	/**
1006252726Srpaulo	 * autoscan - Automatic scan parameters or %NULL if none
1007252726Srpaulo	 *
1008252726Srpaulo	 * This is an optional set of parameters for automatic scanning
1009252726Srpaulo	 * within an interface in following format:
1010252726Srpaulo	 * <autoscan module name>:<module parameters>
1011252726Srpaulo	 */
1012252726Srpaulo	char *autoscan;
1013252726Srpaulo
1014252726Srpaulo	/**
1015281806Srpaulo	 * wps_nfc_pw_from_config - NFC Device Password was read from config
1016281806Srpaulo	 *
1017281806Srpaulo	 * This parameter can be determined whether the NFC Device Password was
1018281806Srpaulo	 * included in the configuration (1) or generated dynamically (0). Only
1019281806Srpaulo	 * the former case is re-written back to the configuration file.
1020281806Srpaulo	 */
1021281806Srpaulo	int wps_nfc_pw_from_config;
1022281806Srpaulo
1023281806Srpaulo	/**
1024252726Srpaulo	 * wps_nfc_dev_pw_id - NFC Device Password ID for password token
1025252726Srpaulo	 */
1026252726Srpaulo	int wps_nfc_dev_pw_id;
1027252726Srpaulo
1028252726Srpaulo	/**
1029252726Srpaulo	 * wps_nfc_dh_pubkey - NFC DH Public Key for password token
1030252726Srpaulo	 */
1031252726Srpaulo	struct wpabuf *wps_nfc_dh_pubkey;
1032252726Srpaulo
1033252726Srpaulo	/**
1034252726Srpaulo	 * wps_nfc_dh_privkey - NFC DH Private Key for password token
1035252726Srpaulo	 */
1036252726Srpaulo	struct wpabuf *wps_nfc_dh_privkey;
1037252726Srpaulo
1038252726Srpaulo	/**
1039252726Srpaulo	 * wps_nfc_dev_pw - NFC Device Password for password token
1040252726Srpaulo	 */
1041252726Srpaulo	struct wpabuf *wps_nfc_dev_pw;
1042252726Srpaulo
1043252726Srpaulo	/**
1044252726Srpaulo	 * ext_password_backend - External password backend or %NULL if none
1045252726Srpaulo	 *
1046252726Srpaulo	 * format: <backend name>[:<optional backend parameters>]
1047252726Srpaulo	 */
1048252726Srpaulo	char *ext_password_backend;
1049252726Srpaulo
1050252726Srpaulo	/*
1051252726Srpaulo	 * p2p_go_max_inactivity - Timeout in seconds to detect STA inactivity
1052252726Srpaulo	 *
1053252726Srpaulo	 * This timeout value is used in P2P GO mode to clean up
1054252726Srpaulo	 * inactive stations.
1055252726Srpaulo	 * By default: 300 seconds.
1056252726Srpaulo	 */
1057252726Srpaulo	int p2p_go_max_inactivity;
1058252726Srpaulo
1059252726Srpaulo	struct hostapd_wmm_ac_params wmm_ac_params[4];
1060252726Srpaulo
1061252726Srpaulo	/**
1062252726Srpaulo	 * auto_interworking - Whether to use network selection automatically
1063252726Srpaulo	 *
1064252726Srpaulo	 * 0 = do not automatically go through Interworking network selection
1065252726Srpaulo	 *     (i.e., require explicit interworking_select command for this)
1066252726Srpaulo	 * 1 = perform Interworking network selection if one or more
1067252726Srpaulo	 *     credentials have been configured and scan did not find a
1068252726Srpaulo	 *     matching network block
1069252726Srpaulo	 */
1070252726Srpaulo	int auto_interworking;
1071252726Srpaulo
1072252726Srpaulo	/**
1073252726Srpaulo	 * p2p_go_ht40 - Default mode for HT40 enable when operating as GO.
1074252726Srpaulo	 *
1075252726Srpaulo	 * This will take effect for p2p_group_add, p2p_connect, and p2p_invite.
1076252726Srpaulo	 * Note that regulatory constraints and driver capabilities are
1077252726Srpaulo	 * consulted anyway, so setting it to 1 can't do real harm.
1078252726Srpaulo	 * By default: 0 (disabled)
1079252726Srpaulo	 */
1080252726Srpaulo	int p2p_go_ht40;
1081252726Srpaulo
1082252726Srpaulo	/**
1083281806Srpaulo	 * p2p_go_vht - Default mode for VHT enable when operating as GO
1084281806Srpaulo	 *
1085281806Srpaulo	 * This will take effect for p2p_group_add, p2p_connect, and p2p_invite.
1086281806Srpaulo	 * Note that regulatory constraints and driver capabilities are
1087281806Srpaulo	 * consulted anyway, so setting it to 1 can't do real harm.
1088281806Srpaulo	 * By default: 0 (disabled)
1089281806Srpaulo	 */
1090281806Srpaulo	int p2p_go_vht;
1091281806Srpaulo
1092281806Srpaulo	/**
1093346981Scy	 * p2p_go_he - Default mode for 11ax HE enable when operating as GO
1094346981Scy	 *
1095346981Scy	 * This will take effect for p2p_group_add, p2p_connect, and p2p_invite.
1096346981Scy	 * Note that regulatory constraints and driver capabilities are
1097346981Scy	 * consulted anyway, so setting it to 1 can't do real harm.
1098346981Scy	 * By default: 0 (disabled)
1099346981Scy	 */
1100346981Scy	int p2p_go_he;
1101346981Scy
1102346981Scy	/**
1103281806Srpaulo	 * p2p_go_ctwindow - CTWindow to use when operating as GO
1104281806Srpaulo	 *
1105281806Srpaulo	 * By default: 0 (no CTWindow). Values 0-127 can be used to indicate
1106281806Srpaulo	 * the length of the CTWindow in TUs.
1107281806Srpaulo	 */
1108281806Srpaulo	int p2p_go_ctwindow;
1109281806Srpaulo
1110281806Srpaulo	/**
1111252726Srpaulo	 * p2p_disabled - Whether P2P operations are disabled for this interface
1112252726Srpaulo	 */
1113252726Srpaulo	int p2p_disabled;
1114252726Srpaulo
1115252726Srpaulo	/**
1116252726Srpaulo	 * p2p_no_group_iface - Whether group interfaces can be used
1117252726Srpaulo	 *
1118252726Srpaulo	 * By default, wpa_supplicant will create a separate interface for P2P
1119252726Srpaulo	 * group operations if the driver supports this. This functionality can
1120252726Srpaulo	 * be disabled by setting this parameter to 1. In that case, the same
1121252726Srpaulo	 * interface that was used for the P2P management operations is used
1122252726Srpaulo	 * also for the group operation.
1123252726Srpaulo	 */
1124252726Srpaulo	int p2p_no_group_iface;
1125252726Srpaulo
1126252726Srpaulo	/**
1127289549Srpaulo	 * p2p_cli_probe - Enable/disable P2P CLI probe request handling
1128289549Srpaulo	 *
1129289549Srpaulo	 * If this parameter is set to 1, a connected P2P Client will receive
1130289549Srpaulo	 * and handle Probe Request frames. Setting this parameter to 0
1131289549Srpaulo	 * disables this option. Default value: 0.
1132289549Srpaulo	 *
1133289549Srpaulo	 * Note: Setting this property at run time takes effect on the following
1134289549Srpaulo	 * interface state transition to/from the WPA_COMPLETED state.
1135289549Srpaulo	 */
1136289549Srpaulo	int p2p_cli_probe;
1137289549Srpaulo
1138289549Srpaulo	/**
1139252726Srpaulo	 * okc - Whether to enable opportunistic key caching by default
1140252726Srpaulo	 *
1141252726Srpaulo	 * By default, OKC is disabled unless enabled by the per-network
1142252726Srpaulo	 * proactive_key_caching=1 parameter. okc=1 can be used to change this
1143252726Srpaulo	 * default behavior.
1144252726Srpaulo	 */
1145252726Srpaulo	int okc;
1146252726Srpaulo
1147252726Srpaulo	/**
1148252726Srpaulo	 * pmf - Whether to enable/require PMF by default
1149252726Srpaulo	 *
1150252726Srpaulo	 * By default, PMF is disabled unless enabled by the per-network
1151252726Srpaulo	 * ieee80211w=1 or ieee80211w=2 parameter. pmf=1/2 can be used to change
1152337817Scy	 * this default behavior for RSN network (this is not applicable for
1153337817Scy	 * non-RSN cases).
1154252726Srpaulo	 */
1155252726Srpaulo	enum mfp_options pmf;
1156281806Srpaulo
1157281806Srpaulo	/**
1158281806Srpaulo	 * sae_groups - Preference list of enabled groups for SAE
1159281806Srpaulo	 *
1160281806Srpaulo	 * By default (if this parameter is not set), the mandatory group 19
1161281806Srpaulo	 * (ECC group defined over a 256-bit prime order field) is preferred,
1162281806Srpaulo	 * but other groups are also enabled. If this parameter is set, the
1163281806Srpaulo	 * groups will be tried in the indicated order.
1164281806Srpaulo	 */
1165281806Srpaulo	int *sae_groups;
1166281806Srpaulo
1167281806Srpaulo	/**
1168281806Srpaulo	 * dtim_period - Default DTIM period in Beacon intervals
1169281806Srpaulo	 *
1170281806Srpaulo	 * This parameter can be used to set the default value for network
1171281806Srpaulo	 * blocks that do not specify dtim_period.
1172281806Srpaulo	 */
1173281806Srpaulo	int dtim_period;
1174281806Srpaulo
1175281806Srpaulo	/**
1176281806Srpaulo	 * beacon_int - Default Beacon interval in TU
1177281806Srpaulo	 *
1178281806Srpaulo	 * This parameter can be used to set the default value for network
1179281806Srpaulo	 * blocks that do not specify beacon_int.
1180281806Srpaulo	 */
1181281806Srpaulo	int beacon_int;
1182281806Srpaulo
1183281806Srpaulo	/**
1184281806Srpaulo	 * ap_vendor_elements: Vendor specific elements for Beacon/ProbeResp
1185281806Srpaulo	 *
1186281806Srpaulo	 * This parameter can be used to define additional vendor specific
1187281806Srpaulo	 * elements for Beacon and Probe Response frames in AP/P2P GO mode. The
1188281806Srpaulo	 * format for these element(s) is a hexdump of the raw information
1189281806Srpaulo	 * elements (id+len+payload for one or more elements).
1190281806Srpaulo	 */
1191281806Srpaulo	struct wpabuf *ap_vendor_elements;
1192281806Srpaulo
1193281806Srpaulo	/**
1194281806Srpaulo	 * ignore_old_scan_res - Ignore scan results older than request
1195281806Srpaulo	 *
1196281806Srpaulo	 * The driver may have a cache of scan results that makes it return
1197281806Srpaulo	 * information that is older than our scan trigger. This parameter can
1198281806Srpaulo	 * be used to configure such old information to be ignored instead of
1199281806Srpaulo	 * allowing it to update the internal BSS table.
1200281806Srpaulo	 */
1201281806Srpaulo	int ignore_old_scan_res;
1202281806Srpaulo
1203281806Srpaulo	/**
1204281806Srpaulo	 * sched_scan_interval -  schedule scan interval
1205281806Srpaulo	 */
1206281806Srpaulo	unsigned int sched_scan_interval;
1207281806Srpaulo
1208281806Srpaulo	/**
1209346981Scy	 * sched_scan_start_delay - Schedule scan start delay before first scan
1210346981Scy	 *
1211346981Scy	 * Delay (in seconds) before scheduling first scan plan cycle. The
1212346981Scy	 * driver may ignore this parameter and start immediately (or at any
1213346981Scy	 * other time), if this feature is not supported.
1214346981Scy	 */
1215346981Scy	unsigned int sched_scan_start_delay;
1216346981Scy
1217346981Scy	/**
1218281806Srpaulo	 * tdls_external_control - External control for TDLS setup requests
1219281806Srpaulo	 *
1220281806Srpaulo	 * Enable TDLS mode where external programs are given the control
1221281806Srpaulo	 * to specify the TDLS link to get established to the driver. The
1222281806Srpaulo	 * driver requests the TDLS setup to the supplicant only for the
1223281806Srpaulo	 * specified TDLS peers.
1224281806Srpaulo	 */
1225281806Srpaulo	int tdls_external_control;
1226281806Srpaulo
1227281806Srpaulo	u8 ip_addr_go[4];
1228281806Srpaulo	u8 ip_addr_mask[4];
1229281806Srpaulo	u8 ip_addr_start[4];
1230281806Srpaulo	u8 ip_addr_end[4];
1231281806Srpaulo
1232281806Srpaulo	/**
1233281806Srpaulo	 * osu_dir - OSU provider information directory
1234281806Srpaulo	 *
1235281806Srpaulo	 * If set, allow FETCH_OSU control interface command to be used to fetch
1236281806Srpaulo	 * OSU provider information into all APs and store the results in this
1237281806Srpaulo	 * directory.
1238281806Srpaulo	 */
1239281806Srpaulo	char *osu_dir;
1240281806Srpaulo
1241281806Srpaulo	/**
1242281806Srpaulo	 * wowlan_triggers - Wake-on-WLAN triggers
1243281806Srpaulo	 *
1244281806Srpaulo	 * If set, these wowlan triggers will be configured.
1245281806Srpaulo	 */
1246281806Srpaulo	char *wowlan_triggers;
1247281806Srpaulo
1248281806Srpaulo	/**
1249281806Srpaulo	 * p2p_search_delay - Extra delay between concurrent search iterations
1250281806Srpaulo	 *
1251281806Srpaulo	 * Add extra delay (in milliseconds) between search iterations when
1252281806Srpaulo	 * there is a concurrent operation to make p2p_find friendlier to
1253281806Srpaulo	 * concurrent operations by avoiding it from taking 100% of radio
1254281806Srpaulo	 * resources.
1255281806Srpaulo	 */
1256281806Srpaulo	unsigned int p2p_search_delay;
1257281806Srpaulo
1258281806Srpaulo	/**
1259281806Srpaulo	 * mac_addr - MAC address policy default
1260281806Srpaulo	 *
1261281806Srpaulo	 * 0 = use permanent MAC address
1262281806Srpaulo	 * 1 = use random MAC address for each ESS connection
1263281806Srpaulo	 * 2 = like 1, but maintain OUI (with local admin bit set)
1264281806Srpaulo	 *
1265281806Srpaulo	 * By default, permanent MAC address is used unless policy is changed by
1266281806Srpaulo	 * the per-network mac_addr parameter. Global mac_addr=1 can be used to
1267281806Srpaulo	 * change this default behavior.
1268281806Srpaulo	 */
1269281806Srpaulo	int mac_addr;
1270281806Srpaulo
1271281806Srpaulo	/**
1272281806Srpaulo	 * rand_addr_lifetime - Lifetime of random MAC address in seconds
1273281806Srpaulo	 */
1274281806Srpaulo	unsigned int rand_addr_lifetime;
1275281806Srpaulo
1276281806Srpaulo	/**
1277281806Srpaulo	 * preassoc_mac_addr - Pre-association MAC address policy
1278281806Srpaulo	 *
1279281806Srpaulo	 * 0 = use permanent MAC address
1280281806Srpaulo	 * 1 = use random MAC address
1281281806Srpaulo	 * 2 = like 1, but maintain OUI (with local admin bit set)
1282281806Srpaulo	 */
1283281806Srpaulo	int preassoc_mac_addr;
1284281806Srpaulo
1285281806Srpaulo	/**
1286281806Srpaulo	 * key_mgmt_offload - Use key management offload
1287281806Srpaulo	 *
1288281806Srpaulo	 * Key management offload should be used if the device supports it.
1289281806Srpaulo	 * Key management offload is the capability of a device operating as
1290281806Srpaulo	 * a station to do the exchange necessary to establish temporal keys
1291281806Srpaulo	 * during initial RSN connection, after roaming, or during a PTK
1292281806Srpaulo	 * rekeying operation.
1293281806Srpaulo	 */
1294281806Srpaulo	int key_mgmt_offload;
1295281806Srpaulo
1296281806Srpaulo	/**
1297281806Srpaulo	 * user_mpm - MPM residency
1298281806Srpaulo	 *
1299281806Srpaulo	 * 0: MPM lives in driver.
1300281806Srpaulo	 * 1: wpa_supplicant handles peering and station allocation.
1301281806Srpaulo	 *
1302281806Srpaulo	 * If AMPE or SAE is enabled, the MPM is always in userspace.
1303281806Srpaulo	 */
1304281806Srpaulo	int user_mpm;
1305281806Srpaulo
1306281806Srpaulo	/**
1307281806Srpaulo	 * max_peer_links - Maximum number of peer links
1308281806Srpaulo	 *
1309281806Srpaulo	 * Maximum number of mesh peering currently maintained by the STA.
1310281806Srpaulo	 */
1311281806Srpaulo	int max_peer_links;
1312281806Srpaulo
1313281806Srpaulo	/**
1314281806Srpaulo	 * cert_in_cb - Whether to include a peer certificate dump in events
1315281806Srpaulo	 *
1316281806Srpaulo	 * This controls whether peer certificates for authentication server and
1317281806Srpaulo	 * its certificate chain are included in EAP peer certificate events.
1318281806Srpaulo	 */
1319281806Srpaulo	int cert_in_cb;
1320281806Srpaulo
1321281806Srpaulo	/**
1322281806Srpaulo	 * mesh_max_inactivity - Timeout in seconds to detect STA inactivity
1323281806Srpaulo	 *
1324281806Srpaulo	 * This timeout value is used in mesh STA to clean up inactive stations.
1325281806Srpaulo	 * By default: 300 seconds.
1326281806Srpaulo	 */
1327281806Srpaulo	int mesh_max_inactivity;
1328281806Srpaulo
1329281806Srpaulo	/**
1330289549Srpaulo	 * dot11RSNASAERetransPeriod - Timeout to retransmit SAE Auth frame
1331289549Srpaulo	 *
1332289549Srpaulo	 * This timeout value is used in mesh STA to retransmit
1333289549Srpaulo	 * SAE Authentication frame.
1334289549Srpaulo	 * By default: 1000 milliseconds.
1335289549Srpaulo	 */
1336289549Srpaulo	int dot11RSNASAERetransPeriod;
1337289549Srpaulo
1338289549Srpaulo	/**
1339281806Srpaulo	 * passive_scan - Whether to force passive scan for network connection
1340281806Srpaulo	 *
1341281806Srpaulo	 * This parameter can be used to force only passive scanning to be used
1342281806Srpaulo	 * for network connection cases. It should be noted that this will slow
1343281806Srpaulo	 * down scan operations and reduce likelihood of finding the AP. In
1344281806Srpaulo	 * addition, some use cases will override this due to functional
1345281806Srpaulo	 * requirements, e.g., for finding an AP that uses hidden SSID
1346281806Srpaulo	 * (scan_ssid=1) or P2P device discovery.
1347281806Srpaulo	 */
1348281806Srpaulo	int passive_scan;
1349281806Srpaulo
1350281806Srpaulo	/**
1351281806Srpaulo	 * reassoc_same_bss_optim - Whether to optimize reassoc-to-same-BSS
1352281806Srpaulo	 */
1353281806Srpaulo	int reassoc_same_bss_optim;
1354289549Srpaulo
1355289549Srpaulo	/**
1356289549Srpaulo	 * wps_priority - Priority for the networks added through WPS
1357289549Srpaulo	 *
1358289549Srpaulo	 * This priority value will be set to each network profile that is added
1359289549Srpaulo	 * by executing the WPS protocol.
1360289549Srpaulo	 */
1361289549Srpaulo	int wps_priority;
1362289549Srpaulo
1363289549Srpaulo	/**
1364289549Srpaulo	 * fst_group_id - FST group ID
1365289549Srpaulo	 */
1366289549Srpaulo	char *fst_group_id;
1367289549Srpaulo
1368289549Srpaulo	/**
1369289549Srpaulo	 * fst_priority - priority of the interface within the FST group
1370289549Srpaulo	 */
1371289549Srpaulo	int fst_priority;
1372289549Srpaulo
1373289549Srpaulo	/**
1374289549Srpaulo	 * fst_llt - default FST LLT (Link-Lost Timeout) to be used for the
1375289549Srpaulo	 * interface.
1376289549Srpaulo	 */
1377289549Srpaulo	int fst_llt;
1378337817Scy
1379337817Scy	 /**
1380337817Scy	  * wpa_rsc_relaxation - RSC relaxation on GTK installation
1381337817Scy	  *
1382337817Scy	  * Values:
1383337817Scy	  * 0 - use the EAPOL-Key RSC value on GTK installation
1384337817Scy	  * 1 - use the null RSC if a bogus RSC value is detected in message 3
1385337817Scy	  * of 4-Way Handshake or message 1 of Group Key Handshake.
1386337817Scy	  */
1387337817Scy	 int wpa_rsc_relaxation;
1388337817Scy
1389337817Scy	/**
1390337817Scy	 * sched_scan_plans - Scan plans for scheduled scan
1391337817Scy	 *
1392337817Scy	 * Each scan plan specifies the interval between scans and the number of
1393337817Scy	 * iterations. The last scan plan only specifies the scan interval and
1394337817Scy	 * will be run infinitely.
1395337817Scy	 *
1396337817Scy	 * format: <interval:iterations> <interval2:iterations2> ... <interval>
1397337817Scy	 */
1398337817Scy	 char *sched_scan_plans;
1399337817Scy
1400337817Scy#ifdef CONFIG_MBO
1401337817Scy	/**
1402337817Scy	 * non_pref_chan - Non-preferred channels list, separated by spaces.
1403337817Scy	 *
1404337817Scy	 * format: op_class:chan:preference:reason<:detail>
1405337817Scy	 * Detail is optional.
1406337817Scy	 */
1407337817Scy	char *non_pref_chan;
1408337817Scy
1409337817Scy	/**
1410337817Scy	 * mbo_cell_capa - Cellular capabilities for MBO
1411337817Scy	 */
1412337817Scy	enum mbo_cellular_capa mbo_cell_capa;
1413346981Scy
1414346981Scy	/**
1415346981Scy	 * disassoc_imminent_rssi_threshold - RSSI threshold of candidate AP
1416346981Scy	 * when disassociation imminent is set.
1417346981Scy	 */
1418346981Scy	int disassoc_imminent_rssi_threshold;
1419346981Scy
1420346981Scy	/**
1421346981Scy	 * oce - Enable OCE in STA and/or STA-CFON mode
1422346981Scy	 *  - Set BIT(0) to enable OCE in non-AP STA mode
1423346981Scy	 *  - Set BIT(1) to enable OCE in STA-CFON mode
1424346981Scy	 */
1425346981Scy	unsigned int oce;
1426337817Scy#endif /* CONFIG_MBO */
1427337817Scy
1428337817Scy	/**
1429337817Scy	 * gas_address3 - GAS Address3 field behavior
1430337817Scy	 *
1431337817Scy	 * Values:
1432337817Scy	 * 0 - P2P specification (Address3 = AP BSSID)
1433337817Scy	 * 1 = IEEE 802.11 standard compliant (Address3 = Wildcard BSSID when
1434337817Scy	 *	sent to not-associated AP; if associated, AP BSSID)
1435337817Scy	 */
1436337817Scy	int gas_address3;
1437337817Scy
1438337817Scy	/**
1439337817Scy	 * ftm_responder - Publish FTM (fine timing measurement)
1440337817Scy	 * responder functionality
1441337817Scy	 *
1442337817Scy	 * Values:
1443337817Scy	 * 0 - do not publish FTM responder functionality (Default)
1444337817Scy	 * 1 - publish FTM responder functionality in
1445337817Scy	 *	bit 70 of Extended Capabilities element
1446337817Scy	 * Note, actual FTM responder operation is managed outside
1447337817Scy	 * wpa_supplicant.
1448337817Scy	 */
1449337817Scy	int ftm_responder;
1450337817Scy
1451337817Scy	/**
1452337817Scy	 * ftm_initiator - Publish FTM (fine timing measurement)
1453337817Scy	 * initiator functionality
1454337817Scy	 *
1455337817Scy	 * Values:
1456337817Scy	 * 0 - do not publish FTM initiator functionality (Default)
1457337817Scy	 * 1 - publish FTM initiator functionality in
1458337817Scy	 *	bit 71 of Extended Capabilities element
1459337817Scy	 * Note, actual FTM initiator operation is managed outside
1460337817Scy	 * wpa_supplicant.
1461337817Scy	 */
1462337817Scy	int ftm_initiator;
1463346981Scy
1464346981Scy	/**
1465346981Scy	 * gas_rand_addr_lifetime - Lifetime of random MAC address for ANQP in
1466346981Scy	 *	seconds
1467346981Scy	 */
1468346981Scy	unsigned int gas_rand_addr_lifetime;
1469346981Scy
1470346981Scy	/**
1471346981Scy	 * gas_rand_mac_addr - GAS MAC address policy
1472346981Scy	 *
1473346981Scy	 * 0 = use permanent MAC address
1474346981Scy	 * 1 = use random MAC address
1475346981Scy	 * 2 = like 1, but maintain OUI (with local admin bit set)
1476346981Scy	 */
1477346981Scy	int gas_rand_mac_addr;
1478346981Scy
1479346981Scy	/**
1480346981Scy	 * dpp_config_processing - How to process DPP configuration
1481346981Scy	 *
1482346981Scy	 * 0 = report received configuration to an external program for
1483346981Scy	 *	processing; do not generate any network profile internally
1484346981Scy	 * 1 = report received configuration to an external program and generate
1485346981Scy	 *	a network profile internally, but do not automatically connect
1486346981Scy	 *	to the created (disabled) profile; the network profile id is
1487346981Scy	 *	reported to external programs
1488346981Scy	 * 2 = report received configuration to an external program, generate
1489346981Scy	 *	a network profile internally, try to connect to the created
1490346981Scy	 *	profile automatically
1491346981Scy	 */
1492346981Scy	int dpp_config_processing;
1493346981Scy
1494346981Scy	/**
1495346981Scy	 * coloc_intf_reporting - Colocated interference reporting
1496346981Scy	 *
1497346981Scy	 * dot11CoLocIntfReportingActivated
1498346981Scy	 * 0 = disabled (false)
1499346981Scy	 * 1 = enabled (true)
1500346981Scy	 */
1501346981Scy	int coloc_intf_reporting;
1502346981Scy
1503346981Scy	/**
1504346981Scy	 * p2p_device_random_mac_addr - P2P Device MAC address policy default
1505346981Scy	 *
1506346981Scy	 * 0 = use permanent MAC address
1507346981Scy	 * 1 = use random MAC address on creating the interface if there is no
1508346981Scy	 * persistent groups.
1509346981Scy	 *
1510346981Scy	 * By default, permanent MAC address is used.
1511346981Scy	 */
1512346981Scy	int p2p_device_random_mac_addr;
1513346981Scy
1514346981Scy	/**
1515346981Scy	 * p2p_device_persistent_mac_addr - Record last used MAC address
1516346981Scy	 *
1517346981Scy	 * If there are saved persistent groups, P2P cannot generate another
1518346981Scy	 * random MAC address, and need to restore to last used MAC address.
1519346981Scy	 */
1520346981Scy	u8 p2p_device_persistent_mac_addr[ETH_ALEN];
1521346981Scy
1522346981Scy	/**
1523346981Scy	 * p2p_interface_random_mac_addr - P2P Interface MAC address policy default
1524346981Scy	 *
1525346981Scy	 * 0 = use permanent MAC address
1526346981Scy	 * 1 = use random MAC address on creating the interface.
1527346981Scy	 *
1528346981Scy	 * By default, permanent MAC address is used.
1529346981Scy	 */
1530346981Scy	int p2p_interface_random_mac_addr;
1531351611Scy
1532351611Scy	/**
1533351611Scy	 * disable_btm - Disable BSS transition management in STA
1534351611Scy	 * - Set to 0 to enable BSS transition management
1535351611Scy	 * - Set to 1 to disable BSS transition management
1536351611Scy	 *
1537351611Scy	 * By default BSS transition management is enabled
1538351611Scy	 */
1539351611Scy	int disable_btm;
1540189251Ssam};
1541189251Ssam
1542189251Ssam
1543189251Ssam/* Prototypes for common functions from config.c */
1544189251Ssam
1545189251Ssamvoid wpa_config_free(struct wpa_config *ssid);
1546189251Ssamvoid wpa_config_free_ssid(struct wpa_ssid *ssid);
1547252726Srpaulovoid wpa_config_foreach_network(struct wpa_config *config,
1548252726Srpaulo				void (*func)(void *, struct wpa_ssid *),
1549252726Srpaulo				void *arg);
1550189251Ssamstruct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id);
1551189251Ssamstruct wpa_ssid * wpa_config_add_network(struct wpa_config *config);
1552189251Ssamint wpa_config_remove_network(struct wpa_config *config, int id);
1553189251Ssamvoid wpa_config_set_network_defaults(struct wpa_ssid *ssid);
1554189251Ssamint wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
1555189251Ssam		   int line);
1556252726Srpauloint wpa_config_set_quoted(struct wpa_ssid *ssid, const char *var,
1557252726Srpaulo			  const char *value);
1558281806Srpauloint wpa_config_dump_values(struct wpa_config *config, char *buf,
1559281806Srpaulo			   size_t buflen);
1560281806Srpauloint wpa_config_get_value(const char *name, struct wpa_config *config,
1561281806Srpaulo			 char *buf, size_t buflen);
1562281806Srpaulo
1563214734Srpaulochar ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys);
1564189251Ssamchar * wpa_config_get(struct wpa_ssid *ssid, const char *var);
1565189251Ssamchar * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var);
1566189251Ssamvoid wpa_config_update_psk(struct wpa_ssid *ssid);
1567189251Ssamint wpa_config_add_prio_network(struct wpa_config *config,
1568189251Ssam				struct wpa_ssid *ssid);
1569214734Srpauloint wpa_config_update_prio_list(struct wpa_config *config);
1570189251Ssamconst struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
1571189251Ssam						   const char *name);
1572189251Ssamvoid wpa_config_set_blob(struct wpa_config *config,
1573189251Ssam			 struct wpa_config_blob *blob);
1574189251Ssamvoid wpa_config_free_blob(struct wpa_config_blob *blob);
1575189251Ssamint wpa_config_remove_blob(struct wpa_config *config, const char *name);
1576281806Srpaulovoid wpa_config_flush_blobs(struct wpa_config *config);
1577189251Ssam
1578252726Srpaulostruct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id);
1579252726Srpaulostruct wpa_cred * wpa_config_add_cred(struct wpa_config *config);
1580252726Srpauloint wpa_config_remove_cred(struct wpa_config *config, int id);
1581252726Srpaulovoid wpa_config_free_cred(struct wpa_cred *cred);
1582252726Srpauloint wpa_config_set_cred(struct wpa_cred *cred, const char *var,
1583252726Srpaulo			const char *value, int line);
1584281806Srpaulochar * wpa_config_get_cred_no_key(struct wpa_cred *cred, const char *var);
1585252726Srpaulo
1586189251Ssamstruct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
1587189251Ssam					   const char *driver_param);
1588189251Ssam#ifndef CONFIG_NO_STDOUT_DEBUG
1589189251Ssamvoid wpa_config_debug_dump_networks(struct wpa_config *config);
1590189251Ssam#else /* CONFIG_NO_STDOUT_DEBUG */
1591189251Ssam#define wpa_config_debug_dump_networks(c) do { } while (0)
1592189251Ssam#endif /* CONFIG_NO_STDOUT_DEBUG */
1593189251Ssam
1594189251Ssam
1595252726Srpaulo/* Prototypes for common functions from config.c */
1596252726Srpauloint wpa_config_process_global(struct wpa_config *config, char *pos, int line);
1597252726Srpaulo
1598337817Scyint wpa_config_get_num_global_field_names(void);
1599252726Srpaulo
1600337817Scyconst char * wpa_config_get_global_field_name(unsigned int i, int *no_var);
1601337817Scy
1602189251Ssam/* Prototypes for backend specific functions from the selected config_*.c */
1603189251Ssam
1604189251Ssam/**
1605189251Ssam * wpa_config_read - Read and parse configuration database
1606189251Ssam * @name: Name of the configuration (e.g., path and file name for the
1607189251Ssam * configuration file)
1608281806Srpaulo * @cfgp: Pointer to previously allocated configuration data or %NULL if none
1609189251Ssam * Returns: Pointer to allocated configuration data or %NULL on failure
1610189251Ssam *
1611189251Ssam * This function reads configuration data, parses its contents, and allocates
1612189251Ssam * data structures needed for storing configuration information. The allocated
1613189251Ssam * data can be freed with wpa_config_free().
1614189251Ssam *
1615189251Ssam * Each configuration backend needs to implement this function.
1616189251Ssam */
1617281806Srpaulostruct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp);
1618189251Ssam
1619189251Ssam/**
1620189251Ssam * wpa_config_write - Write or update configuration data
1621189251Ssam * @name: Name of the configuration (e.g., path and file name for the
1622189251Ssam * configuration file)
1623189251Ssam * @config: Configuration data from wpa_config_read()
1624189251Ssam * Returns: 0 on success, -1 on failure
1625189251Ssam *
1626189251Ssam * This function write all configuration data into an external database (e.g.,
1627189251Ssam * a text file) in a format that can be read with wpa_config_read(). This can
1628189251Ssam * be used to allow wpa_supplicant to update its configuration, e.g., when a
1629189251Ssam * new network is added or a password is changed.
1630189251Ssam *
1631189251Ssam * Each configuration backend needs to implement this function.
1632189251Ssam */
1633189251Ssamint wpa_config_write(const char *name, struct wpa_config *config);
1634189251Ssam
1635189251Ssam#endif /* CONFIG_H */
1636