xref: /freebsd/contrib/wpa/wpa_supplicant/config.h (revision 4b72b91a7132df1f77bbae194e1071ac621f1edb)
139beb93cSSam Leffler /*
239beb93cSSam Leffler  * WPA Supplicant / Configuration file structures
3f05cddf9SRui Paulo  * Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi>
439beb93cSSam Leffler  *
5f05cddf9SRui Paulo  * This software may be distributed under the terms of the BSD license.
6f05cddf9SRui Paulo  * See README for more details.
739beb93cSSam Leffler  */
839beb93cSSam Leffler 
939beb93cSSam Leffler #ifndef CONFIG_H
1039beb93cSSam Leffler #define CONFIG_H
1139beb93cSSam Leffler 
1239beb93cSSam Leffler #define DEFAULT_EAPOL_VERSION 1
1339beb93cSSam Leffler #ifdef CONFIG_NO_SCAN_PROCESSING
1439beb93cSSam Leffler #define DEFAULT_AP_SCAN 2
1539beb93cSSam Leffler #else /* CONFIG_NO_SCAN_PROCESSING */
1639beb93cSSam Leffler #define DEFAULT_AP_SCAN 1
1739beb93cSSam Leffler #endif /* CONFIG_NO_SCAN_PROCESSING */
185b9c547cSRui Paulo #define DEFAULT_USER_MPM 1
195b9c547cSRui Paulo #define DEFAULT_MAX_PEER_LINKS 99
205b9c547cSRui Paulo #define DEFAULT_MESH_MAX_INACTIVITY 300
21325151a3SRui Paulo /*
22325151a3SRui Paulo  * The default dot11RSNASAERetransPeriod is defined as 40 ms in the standard,
23325151a3SRui Paulo  * but use 1000 ms in practice to avoid issues on low power CPUs.
24325151a3SRui Paulo  */
25325151a3SRui Paulo #define DEFAULT_DOT11_RSNA_SAE_RETRANS_PERIOD 1000
2639beb93cSSam Leffler #define DEFAULT_FAST_REAUTH 1
27f05cddf9SRui Paulo #define DEFAULT_P2P_GO_INTENT 7
28f05cddf9SRui Paulo #define DEFAULT_P2P_INTRA_BSS 1
29f05cddf9SRui Paulo #define DEFAULT_P2P_GO_MAX_INACTIVITY (5 * 60)
305b9c547cSRui Paulo #define DEFAULT_P2P_OPTIMIZE_LISTEN_CHAN 0
31e28a4053SRui Paulo #define DEFAULT_BSS_MAX_COUNT 200
32f05cddf9SRui Paulo #define DEFAULT_BSS_EXPIRATION_AGE 180
33f05cddf9SRui Paulo #define DEFAULT_BSS_EXPIRATION_SCAN_COUNT 2
34f05cddf9SRui Paulo #define DEFAULT_MAX_NUM_STA 128
3585732ac8SCy Schubert #define DEFAULT_AP_ISOLATE 0
36f05cddf9SRui Paulo #define DEFAULT_ACCESS_NETWORK_TYPE 15
375b9c547cSRui Paulo #define DEFAULT_SCAN_CUR_FREQ 0
385b9c547cSRui Paulo #define DEFAULT_P2P_SEARCH_DELAY 500
395b9c547cSRui Paulo #define DEFAULT_RAND_ADDR_LIFETIME 60
405b9c547cSRui Paulo #define DEFAULT_KEY_MGMT_OFFLOAD 1
415b9c547cSRui Paulo #define DEFAULT_CERT_IN_CB 1
425b9c547cSRui Paulo #define DEFAULT_P2P_GO_CTWINDOW 0
43780fb4a2SCy Schubert #define DEFAULT_WPA_RSC_RELAXATION 1
44780fb4a2SCy Schubert #define DEFAULT_MBO_CELL_CAPA MBO_CELL_CAPA_NOT_SUPPORTED
4585732ac8SCy Schubert #define DEFAULT_DISASSOC_IMMINENT_RSSI_THRESHOLD -75
4685732ac8SCy Schubert #define DEFAULT_OCE_SUPPORT OCE_STA
47c1d255d3SCy Schubert #define DEFAULT_EXTENDED_KEY_ID 0
48c1d255d3SCy Schubert #define DEFAULT_SCAN_RES_VALID_FOR_CONNECT 5
4939beb93cSSam Leffler 
5039beb93cSSam Leffler #include "config_ssid.h"
51f05cddf9SRui Paulo #include "wps/wps.h"
52325151a3SRui Paulo #include "common/ieee802_11_defs.h"
53f05cddf9SRui Paulo #include "common/ieee802_11_common.h"
5439beb93cSSam Leffler 
5539beb93cSSam Leffler 
5685732ac8SCy Schubert #define MAX_ROAMING_CONS 36
5785732ac8SCy Schubert #define MAX_ROAMING_CONS_OI_LEN 15
5885732ac8SCy Schubert 
59f05cddf9SRui Paulo struct wpa_cred {
60f05cddf9SRui Paulo 	/**
61f05cddf9SRui Paulo 	 * next - Next credential in the list
62f05cddf9SRui Paulo 	 *
63f05cddf9SRui Paulo 	 * This pointer can be used to iterate over all credentials. The head
64f05cddf9SRui Paulo 	 * of this list is stored in the cred field of struct wpa_config.
65f05cddf9SRui Paulo 	 */
66f05cddf9SRui Paulo 	struct wpa_cred *next;
67f05cddf9SRui Paulo 
68f05cddf9SRui Paulo 	/**
69f05cddf9SRui Paulo 	 * id - Unique id for the credential
70f05cddf9SRui Paulo 	 *
71f05cddf9SRui Paulo 	 * This identifier is used as a unique identifier for each credential
72f05cddf9SRui Paulo 	 * block when using the control interface. Each credential is allocated
73f05cddf9SRui Paulo 	 * an id when it is being created, either when reading the
74f05cddf9SRui Paulo 	 * configuration file or when a new credential is added through the
75f05cddf9SRui Paulo 	 * control interface.
76f05cddf9SRui Paulo 	 */
77f05cddf9SRui Paulo 	int id;
78f05cddf9SRui Paulo 
79f05cddf9SRui Paulo 	/**
805b9c547cSRui Paulo 	 * temporary - Whether this credential is temporary and not to be saved
815b9c547cSRui Paulo 	 */
825b9c547cSRui Paulo 	int temporary;
835b9c547cSRui Paulo 
845b9c547cSRui Paulo 	/**
85f05cddf9SRui Paulo 	 * priority - Priority group
86f05cddf9SRui Paulo 	 *
87f05cddf9SRui Paulo 	 * By default, all networks and credentials get the same priority group
88f05cddf9SRui Paulo 	 * (0). This field can be used to give higher priority for credentials
89f05cddf9SRui Paulo 	 * (and similarly in struct wpa_ssid for network blocks) to change the
90f05cddf9SRui Paulo 	 * Interworking automatic networking selection behavior. The matching
91f05cddf9SRui Paulo 	 * network (based on either an enabled network block or a credential)
92f05cddf9SRui Paulo 	 * with the highest priority value will be selected.
93f05cddf9SRui Paulo 	 */
94f05cddf9SRui Paulo 	int priority;
95f05cddf9SRui Paulo 
96f05cddf9SRui Paulo 	/**
97f05cddf9SRui Paulo 	 * pcsc - Use PC/SC and SIM/USIM card
98f05cddf9SRui Paulo 	 */
99f05cddf9SRui Paulo 	int pcsc;
100f05cddf9SRui Paulo 
101f05cddf9SRui Paulo 	/**
102f05cddf9SRui Paulo 	 * realm - Home Realm for Interworking
103f05cddf9SRui Paulo 	 */
104f05cddf9SRui Paulo 	char *realm;
105f05cddf9SRui Paulo 
106f05cddf9SRui Paulo 	/**
107f05cddf9SRui Paulo 	 * username - Username for Interworking network selection
108f05cddf9SRui Paulo 	 */
109f05cddf9SRui Paulo 	char *username;
110f05cddf9SRui Paulo 
111f05cddf9SRui Paulo 	/**
112f05cddf9SRui Paulo 	 * password - Password for Interworking network selection
113f05cddf9SRui Paulo 	 */
114f05cddf9SRui Paulo 	char *password;
115f05cddf9SRui Paulo 
116f05cddf9SRui Paulo 	/**
117f05cddf9SRui Paulo 	 * ext_password - Whether password is a name for external storage
118f05cddf9SRui Paulo 	 */
119f05cddf9SRui Paulo 	int ext_password;
120f05cddf9SRui Paulo 
121f05cddf9SRui Paulo 	/**
122f05cddf9SRui Paulo 	 * ca_cert - CA certificate for Interworking network selection
123f05cddf9SRui Paulo 	 */
124f05cddf9SRui Paulo 	char *ca_cert;
125f05cddf9SRui Paulo 
126f05cddf9SRui Paulo 	/**
127f05cddf9SRui Paulo 	 * client_cert - File path to client certificate file (PEM/DER)
128f05cddf9SRui Paulo 	 *
129f05cddf9SRui Paulo 	 * This field is used with Interworking networking selection for a case
130f05cddf9SRui Paulo 	 * where client certificate/private key is used for authentication
131f05cddf9SRui Paulo 	 * (EAP-TLS). Full path to the file should be used since working
132f05cddf9SRui Paulo 	 * directory may change when wpa_supplicant is run in the background.
133f05cddf9SRui Paulo 	 *
134f05cddf9SRui Paulo 	 * Alternatively, a named configuration blob can be used by setting
135f05cddf9SRui Paulo 	 * this to blob://blob_name.
136f05cddf9SRui Paulo 	 */
137f05cddf9SRui Paulo 	char *client_cert;
138f05cddf9SRui Paulo 
139f05cddf9SRui Paulo 	/**
140f05cddf9SRui Paulo 	 * private_key - File path to client private key file (PEM/DER/PFX)
141f05cddf9SRui Paulo 	 *
142f05cddf9SRui Paulo 	 * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be
143f05cddf9SRui Paulo 	 * commented out. Both the private key and certificate will be read
144f05cddf9SRui Paulo 	 * from the PKCS#12 file in this case. Full path to the file should be
145f05cddf9SRui Paulo 	 * used since working directory may change when wpa_supplicant is run
146f05cddf9SRui Paulo 	 * in the background.
147f05cddf9SRui Paulo 	 *
148f05cddf9SRui Paulo 	 * Windows certificate store can be used by leaving client_cert out and
149f05cddf9SRui Paulo 	 * configuring private_key in one of the following formats:
150f05cddf9SRui Paulo 	 *
151f05cddf9SRui Paulo 	 * cert://substring_to_match
152f05cddf9SRui Paulo 	 *
153f05cddf9SRui Paulo 	 * hash://certificate_thumbprint_in_hex
154f05cddf9SRui Paulo 	 *
155f05cddf9SRui Paulo 	 * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4"
156f05cddf9SRui Paulo 	 *
157f05cddf9SRui Paulo 	 * Note that when running wpa_supplicant as an application, the user
158f05cddf9SRui Paulo 	 * certificate store (My user account) is used, whereas computer store
159f05cddf9SRui Paulo 	 * (Computer account) is used when running wpasvc as a service.
160f05cddf9SRui Paulo 	 *
161f05cddf9SRui Paulo 	 * Alternatively, a named configuration blob can be used by setting
162f05cddf9SRui Paulo 	 * this to blob://blob_name.
163f05cddf9SRui Paulo 	 */
164f05cddf9SRui Paulo 	char *private_key;
165f05cddf9SRui Paulo 
166f05cddf9SRui Paulo 	/**
167f05cddf9SRui Paulo 	 * private_key_passwd - Password for private key file
168f05cddf9SRui Paulo 	 */
169f05cddf9SRui Paulo 	char *private_key_passwd;
170f05cddf9SRui Paulo 
171f05cddf9SRui Paulo 	/**
172f05cddf9SRui Paulo 	 * imsi - IMSI in <MCC> | <MNC> | '-' | <MSIN> format
173f05cddf9SRui Paulo 	 */
174f05cddf9SRui Paulo 	char *imsi;
175f05cddf9SRui Paulo 
176f05cddf9SRui Paulo 	/**
177f05cddf9SRui Paulo 	 * milenage - Milenage parameters for SIM/USIM simulator in
178f05cddf9SRui Paulo 	 *	<Ki>:<OPc>:<SQN> format
179f05cddf9SRui Paulo 	 */
180f05cddf9SRui Paulo 	char *milenage;
181f05cddf9SRui Paulo 
182f05cddf9SRui Paulo 	/**
1835b9c547cSRui Paulo 	 * domain_suffix_match - Constraint for server domain name
1845b9c547cSRui Paulo 	 *
1855b9c547cSRui Paulo 	 * If set, this FQDN is used as a suffix match requirement for the AAA
1865b9c547cSRui Paulo 	 * server certificate in SubjectAltName dNSName element(s). If a
1875b9c547cSRui Paulo 	 * matching dNSName is found, this constraint is met. If no dNSName
1885b9c547cSRui Paulo 	 * values are present, this constraint is matched against SubjectName CN
1895b9c547cSRui Paulo 	 * using same suffix match comparison. Suffix match here means that the
1905b9c547cSRui Paulo 	 * host/domain name is compared one label at a time starting from the
1915b9c547cSRui Paulo 	 * top-level domain and all the labels in @domain_suffix_match shall be
1925b9c547cSRui Paulo 	 * included in the certificate. The certificate may include additional
1935b9c547cSRui Paulo 	 * sub-level labels in addition to the required labels.
1945b9c547cSRui Paulo 	 *
1955b9c547cSRui Paulo 	 * For example, domain_suffix_match=example.com would match
1965b9c547cSRui Paulo 	 * test.example.com but would not match test-example.com.
1975b9c547cSRui Paulo 	 */
1985b9c547cSRui Paulo 	char *domain_suffix_match;
1995b9c547cSRui Paulo 
2005b9c547cSRui Paulo 	/**
2015b9c547cSRui Paulo 	 * domain - Home service provider FQDN(s)
202f05cddf9SRui Paulo 	 *
203f05cddf9SRui Paulo 	 * This is used to compare against the Domain Name List to figure out
2045b9c547cSRui Paulo 	 * whether the AP is operated by the Home SP. Multiple domain entries
2055b9c547cSRui Paulo 	 * can be used to configure alternative FQDNs that will be considered
2065b9c547cSRui Paulo 	 * home networks.
207f05cddf9SRui Paulo 	 */
2085b9c547cSRui Paulo 	char **domain;
2095b9c547cSRui Paulo 
2105b9c547cSRui Paulo 	/**
2115b9c547cSRui Paulo 	 * num_domain - Number of FQDNs in the domain array
2125b9c547cSRui Paulo 	 */
2135b9c547cSRui Paulo 	size_t num_domain;
214f05cddf9SRui Paulo 
215f05cddf9SRui Paulo 	/**
216f05cddf9SRui Paulo 	 * roaming_consortium - Roaming Consortium OI
217f05cddf9SRui Paulo 	 *
218f05cddf9SRui Paulo 	 * If roaming_consortium_len is non-zero, this field contains the
219f05cddf9SRui Paulo 	 * Roaming Consortium OI that can be used to determine which access
220f05cddf9SRui Paulo 	 * points support authentication with this credential. This is an
221f05cddf9SRui Paulo 	 * alternative to the use of the realm parameter. When using Roaming
222f05cddf9SRui Paulo 	 * Consortium to match the network, the EAP parameters need to be
223f05cddf9SRui Paulo 	 * pre-configured with the credential since the NAI Realm information
224f05cddf9SRui Paulo 	 * may not be available or fetched.
225f05cddf9SRui Paulo 	 */
226f05cddf9SRui Paulo 	u8 roaming_consortium[15];
227f05cddf9SRui Paulo 
228f05cddf9SRui Paulo 	/**
229f05cddf9SRui Paulo 	 * roaming_consortium_len - Length of roaming_consortium
230f05cddf9SRui Paulo 	 */
231f05cddf9SRui Paulo 	size_t roaming_consortium_len;
232f05cddf9SRui Paulo 
23385732ac8SCy Schubert 	/**
23485732ac8SCy Schubert 	 * required_roaming_consortium - Required Roaming Consortium OI
23585732ac8SCy Schubert 	 *
23685732ac8SCy Schubert 	 * If required_roaming_consortium_len is non-zero, this field contains
23785732ac8SCy Schubert 	 * the Roaming Consortium OI that is required to be advertised by the AP
23885732ac8SCy Schubert 	 * for the credential to be considered matching.
23985732ac8SCy Schubert 	 */
2405b9c547cSRui Paulo 	u8 required_roaming_consortium[15];
24185732ac8SCy Schubert 
24285732ac8SCy Schubert 	/**
24385732ac8SCy Schubert 	 * required_roaming_consortium_len - Length of required_roaming_consortium
24485732ac8SCy Schubert 	 */
2455b9c547cSRui Paulo 	size_t required_roaming_consortium_len;
2465b9c547cSRui Paulo 
247f05cddf9SRui Paulo 	/**
24885732ac8SCy Schubert 	 * roaming_consortiums - Roaming Consortium OI(s) memberships
24985732ac8SCy Schubert 	 *
25085732ac8SCy Schubert 	 * This field contains one or more OIs identifying the roaming
25185732ac8SCy Schubert 	 * consortiums of which the provider is a member. The list is sorted
25285732ac8SCy Schubert 	 * from the most preferred one to the least preferred one. A match
25385732ac8SCy Schubert 	 * between the Roaming Consortium OIs advertised by an AP and the OIs
25485732ac8SCy Schubert 	 * in this list indicates that successful authentication is possible.
25585732ac8SCy Schubert 	 * (Hotspot 2.0 PerProviderSubscription/<X+>/HomeSP/RoamingConsortiumOI)
25685732ac8SCy Schubert 	 */
25785732ac8SCy Schubert 	u8 roaming_consortiums[MAX_ROAMING_CONS][MAX_ROAMING_CONS_OI_LEN];
25885732ac8SCy Schubert 
25985732ac8SCy Schubert 	/**
26085732ac8SCy Schubert 	 * roaming_consortiums_len - Length on roaming_consortiums[i]
26185732ac8SCy Schubert 	 */
26285732ac8SCy Schubert 	size_t roaming_consortiums_len[MAX_ROAMING_CONS];
26385732ac8SCy Schubert 
26485732ac8SCy Schubert 	/**
26585732ac8SCy Schubert 	 * num_roaming_consortiums - Number of entries in roaming_consortiums
26685732ac8SCy Schubert 	 */
26785732ac8SCy Schubert 	unsigned int num_roaming_consortiums;
26885732ac8SCy Schubert 
26985732ac8SCy Schubert 	/**
270f05cddf9SRui Paulo 	 * eap_method - EAP method to use
271f05cddf9SRui Paulo 	 *
272f05cddf9SRui Paulo 	 * Pre-configured EAP method to use with this credential or %NULL to
273f05cddf9SRui Paulo 	 * indicate no EAP method is selected, i.e., the method will be
274f05cddf9SRui Paulo 	 * selected automatically based on ANQP information.
275f05cddf9SRui Paulo 	 */
276f05cddf9SRui Paulo 	struct eap_method_type *eap_method;
277f05cddf9SRui Paulo 
278f05cddf9SRui Paulo 	/**
279f05cddf9SRui Paulo 	 * phase1 - Phase 1 (outer authentication) parameters
280f05cddf9SRui Paulo 	 *
281f05cddf9SRui Paulo 	 * Pre-configured EAP parameters or %NULL.
282f05cddf9SRui Paulo 	 */
283f05cddf9SRui Paulo 	char *phase1;
284f05cddf9SRui Paulo 
285f05cddf9SRui Paulo 	/**
286f05cddf9SRui Paulo 	 * phase2 - Phase 2 (inner authentication) parameters
287f05cddf9SRui Paulo 	 *
288f05cddf9SRui Paulo 	 * Pre-configured EAP parameters or %NULL.
289f05cddf9SRui Paulo 	 */
290f05cddf9SRui Paulo 	char *phase2;
291f05cddf9SRui Paulo 
292f05cddf9SRui Paulo 	struct excluded_ssid {
293325151a3SRui Paulo 		u8 ssid[SSID_MAX_LEN];
294f05cddf9SRui Paulo 		size_t ssid_len;
295f05cddf9SRui Paulo 	} *excluded_ssid;
296f05cddf9SRui Paulo 	size_t num_excluded_ssid;
2975b9c547cSRui Paulo 
2985b9c547cSRui Paulo 	struct roaming_partner {
2995b9c547cSRui Paulo 		char fqdn[128];
3005b9c547cSRui Paulo 		int exact_match;
3015b9c547cSRui Paulo 		u8 priority;
3025b9c547cSRui Paulo 		char country[3];
3035b9c547cSRui Paulo 	} *roaming_partner;
3045b9c547cSRui Paulo 	size_t num_roaming_partner;
3055b9c547cSRui Paulo 
3065b9c547cSRui Paulo 	int update_identifier;
3075b9c547cSRui Paulo 
3085b9c547cSRui Paulo 	/**
3095b9c547cSRui Paulo 	 * provisioning_sp - FQDN of the SP that provisioned the credential
3105b9c547cSRui Paulo 	 */
3115b9c547cSRui Paulo 	char *provisioning_sp;
3125b9c547cSRui Paulo 
3135b9c547cSRui Paulo 	/**
3145b9c547cSRui Paulo 	 * sp_priority - Credential priority within a provisioning SP
3155b9c547cSRui Paulo 	 *
3165b9c547cSRui Paulo 	 * This is the priority of the credential among all credentials
3175b9c547cSRui Paulo 	 * provisionined by the same SP (i.e., for entries that have identical
3185b9c547cSRui Paulo 	 * provisioning_sp value). The range of this priority is 0-255 with 0
3195b9c547cSRui Paulo 	 * being the highest and 255 the lower priority.
3205b9c547cSRui Paulo 	 */
3215b9c547cSRui Paulo 	int sp_priority;
3225b9c547cSRui Paulo 
3235b9c547cSRui Paulo 	unsigned int min_dl_bandwidth_home;
3245b9c547cSRui Paulo 	unsigned int min_ul_bandwidth_home;
3255b9c547cSRui Paulo 	unsigned int min_dl_bandwidth_roaming;
3265b9c547cSRui Paulo 	unsigned int min_ul_bandwidth_roaming;
3275b9c547cSRui Paulo 
3285b9c547cSRui Paulo 	/**
3295b9c547cSRui Paulo 	 * max_bss_load - Maximum BSS Load Channel Utilization (1..255)
3305b9c547cSRui Paulo 	 * This value is used as the maximum channel utilization for network
3315b9c547cSRui Paulo 	 * selection purposes for home networks. If the AP does not advertise
3325b9c547cSRui Paulo 	 * BSS Load or if the limit would prevent any connection, this
3335b9c547cSRui Paulo 	 * constraint will be ignored.
3345b9c547cSRui Paulo 	 */
3355b9c547cSRui Paulo 	unsigned int max_bss_load;
3365b9c547cSRui Paulo 
337c1d255d3SCy Schubert 	size_t num_req_conn_capab;
3385b9c547cSRui Paulo 	u8 *req_conn_capab_proto;
3395b9c547cSRui Paulo 	int **req_conn_capab_port;
3405b9c547cSRui Paulo 
3415b9c547cSRui Paulo 	/**
3425b9c547cSRui Paulo 	 * ocsp - Whether to use/require OCSP to check server certificate
3435b9c547cSRui Paulo 	 *
3445b9c547cSRui Paulo 	 * 0 = do not use OCSP stapling (TLS certificate status extension)
3455b9c547cSRui Paulo 	 * 1 = try to use OCSP stapling, but not require response
3465b9c547cSRui Paulo 	 * 2 = require valid OCSP stapling response
3475b9c547cSRui Paulo 	 */
3485b9c547cSRui Paulo 	int ocsp;
3495b9c547cSRui Paulo 
3505b9c547cSRui Paulo 	/**
3515b9c547cSRui Paulo 	 * sim_num - User selected SIM identifier
3525b9c547cSRui Paulo 	 *
3535b9c547cSRui Paulo 	 * This variable is used for identifying which SIM is used if the system
3545b9c547cSRui Paulo 	 * has more than one.
3555b9c547cSRui Paulo 	 */
3565b9c547cSRui Paulo 	int sim_num;
357f05cddf9SRui Paulo };
358f05cddf9SRui Paulo 
359f05cddf9SRui Paulo 
360f05cddf9SRui Paulo #define CFG_CHANGED_DEVICE_NAME BIT(0)
361f05cddf9SRui Paulo #define CFG_CHANGED_CONFIG_METHODS BIT(1)
362f05cddf9SRui Paulo #define CFG_CHANGED_DEVICE_TYPE BIT(2)
363f05cddf9SRui Paulo #define CFG_CHANGED_OS_VERSION BIT(3)
364f05cddf9SRui Paulo #define CFG_CHANGED_UUID BIT(4)
365f05cddf9SRui Paulo #define CFG_CHANGED_COUNTRY BIT(5)
366f05cddf9SRui Paulo #define CFG_CHANGED_SEC_DEVICE_TYPE BIT(6)
367f05cddf9SRui Paulo #define CFG_CHANGED_P2P_SSID_POSTFIX BIT(7)
368f05cddf9SRui Paulo #define CFG_CHANGED_WPS_STRING BIT(8)
369f05cddf9SRui Paulo #define CFG_CHANGED_P2P_INTRA_BSS BIT(9)
370f05cddf9SRui Paulo #define CFG_CHANGED_VENDOR_EXTENSION BIT(10)
371f05cddf9SRui Paulo #define CFG_CHANGED_P2P_LISTEN_CHANNEL BIT(11)
372f05cddf9SRui Paulo #define CFG_CHANGED_P2P_OPER_CHANNEL BIT(12)
373f05cddf9SRui Paulo #define CFG_CHANGED_P2P_PREF_CHAN BIT(13)
374f05cddf9SRui Paulo #define CFG_CHANGED_EXT_PW_BACKEND BIT(14)
3755b9c547cSRui Paulo #define CFG_CHANGED_NFC_PASSWORD_TOKEN BIT(15)
3765b9c547cSRui Paulo #define CFG_CHANGED_P2P_PASSPHRASE_LEN BIT(16)
377780fb4a2SCy Schubert #define CFG_CHANGED_SCHED_SCAN_PLANS BIT(17)
37885732ac8SCy Schubert #define CFG_CHANGED_WOWLAN_TRIGGERS BIT(18)
379206b73d0SCy Schubert #define CFG_CHANGED_DISABLE_BTM BIT(19)
380c1d255d3SCy Schubert #define CFG_CHANGED_BGSCAN BIT(20)
381f05cddf9SRui Paulo 
38239beb93cSSam Leffler /**
38339beb93cSSam Leffler  * struct wpa_config - wpa_supplicant configuration data
38439beb93cSSam Leffler  *
38539beb93cSSam Leffler  * This data structure is presents the per-interface (radio) configuration
38639beb93cSSam Leffler  * data. In many cases, there is only one struct wpa_config instance, but if
38739beb93cSSam Leffler  * more than one network interface is being controlled, one instance is used
38839beb93cSSam Leffler  * for each.
38939beb93cSSam Leffler  */
39039beb93cSSam Leffler struct wpa_config {
39139beb93cSSam Leffler 	/**
39239beb93cSSam Leffler 	 * ssid - Head of the global network list
39339beb93cSSam Leffler 	 *
39439beb93cSSam Leffler 	 * This is the head for the list of all the configured networks.
39539beb93cSSam Leffler 	 */
39639beb93cSSam Leffler 	struct wpa_ssid *ssid;
39739beb93cSSam Leffler 
39839beb93cSSam Leffler 	/**
39939beb93cSSam Leffler 	 * pssid - Per-priority network lists (in priority order)
40039beb93cSSam Leffler 	 */
40139beb93cSSam Leffler 	struct wpa_ssid **pssid;
40239beb93cSSam Leffler 
40339beb93cSSam Leffler 	/**
40439beb93cSSam Leffler 	 * num_prio - Number of different priorities used in the pssid lists
40539beb93cSSam Leffler 	 *
40639beb93cSSam Leffler 	 * This indicates how many per-priority network lists are included in
40739beb93cSSam Leffler 	 * pssid.
40839beb93cSSam Leffler 	 */
409c1d255d3SCy Schubert 	size_t num_prio;
41039beb93cSSam Leffler 
41139beb93cSSam Leffler 	/**
412f05cddf9SRui Paulo 	 * cred - Head of the credential list
413f05cddf9SRui Paulo 	 *
414f05cddf9SRui Paulo 	 * This is the head for the list of all the configured credentials.
415f05cddf9SRui Paulo 	 */
416f05cddf9SRui Paulo 	struct wpa_cred *cred;
417f05cddf9SRui Paulo 
418f05cddf9SRui Paulo 	/**
41939beb93cSSam Leffler 	 * eapol_version - IEEE 802.1X/EAPOL version number
42039beb93cSSam Leffler 	 *
42139beb93cSSam Leffler 	 * wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which
42239beb93cSSam Leffler 	 * defines EAPOL version 2. However, there are many APs that do not
42339beb93cSSam Leffler 	 * handle the new version number correctly (they seem to drop the
42439beb93cSSam Leffler 	 * frames completely). In order to make wpa_supplicant interoperate
42539beb93cSSam Leffler 	 * with these APs, the version number is set to 1 by default. This
42639beb93cSSam Leffler 	 * configuration value can be used to set it to the new version (2).
42739beb93cSSam Leffler 	 */
42839beb93cSSam Leffler 	int eapol_version;
42939beb93cSSam Leffler 
43039beb93cSSam Leffler 	/**
43139beb93cSSam Leffler 	 * ap_scan - AP scanning/selection
43239beb93cSSam Leffler 	 *
43339beb93cSSam Leffler 	 * By default, wpa_supplicant requests driver to perform AP
43439beb93cSSam Leffler 	 * scanning and then uses the scan results to select a
43539beb93cSSam Leffler 	 * suitable AP. Another alternative is to allow the driver to
43639beb93cSSam Leffler 	 * take care of AP scanning and selection and use
43739beb93cSSam Leffler 	 * wpa_supplicant just to process EAPOL frames based on IEEE
43839beb93cSSam Leffler 	 * 802.11 association information from the driver.
43939beb93cSSam Leffler 	 *
44039beb93cSSam Leffler 	 * 1: wpa_supplicant initiates scanning and AP selection (default).
44139beb93cSSam Leffler 	 *
44239beb93cSSam Leffler 	 * 0: Driver takes care of scanning, AP selection, and IEEE 802.11
44339beb93cSSam Leffler 	 * association parameters (e.g., WPA IE generation); this mode can
44439beb93cSSam Leffler 	 * also be used with non-WPA drivers when using IEEE 802.1X mode;
44539beb93cSSam Leffler 	 * do not try to associate with APs (i.e., external program needs
44639beb93cSSam Leffler 	 * to control association). This mode must also be used when using
44739beb93cSSam Leffler 	 * wired Ethernet drivers.
44839beb93cSSam Leffler 	 *
44939beb93cSSam Leffler 	 * 2: like 0, but associate with APs using security policy and SSID
45039beb93cSSam Leffler 	 * (but not BSSID); this can be used, e.g., with ndiswrapper and NDIS
45139beb93cSSam Leffler 	 * drivers to enable operation with hidden SSIDs and optimized roaming;
45239beb93cSSam Leffler 	 * in this mode, the network blocks in the configuration are tried
45339beb93cSSam Leffler 	 * one by one until the driver reports successful association; each
45439beb93cSSam Leffler 	 * network block should have explicit security policy (i.e., only one
45539beb93cSSam Leffler 	 * option in the lists) for key_mgmt, pairwise, group, proto variables.
456325151a3SRui Paulo 	 *
457325151a3SRui Paulo 	 * Note: ap_scan=2 should not be used with the nl80211 driver interface
458325151a3SRui Paulo 	 * (the current Linux interface). ap_scan=1 is optimized work working
459325151a3SRui Paulo 	 * with nl80211. For finding networks using hidden SSID, scan_ssid=1 in
460325151a3SRui Paulo 	 * the network block can be used with nl80211.
46139beb93cSSam Leffler 	 */
46239beb93cSSam Leffler 	int ap_scan;
46339beb93cSSam Leffler 
46439beb93cSSam Leffler 	/**
4655b9c547cSRui Paulo 	 * bgscan - Background scan and roaming parameters or %NULL if none
4665b9c547cSRui Paulo 	 *
4675b9c547cSRui Paulo 	 * This is an optional set of parameters for background scanning and
4685b9c547cSRui Paulo 	 * roaming within a network (ESS). For more detailed information see
4695b9c547cSRui Paulo 	 * ssid block documentation.
4705b9c547cSRui Paulo 	 *
4715b9c547cSRui Paulo 	 * The variable defines default bgscan behavior for all BSS station
4725b9c547cSRui Paulo 	 * networks except for those which have their own bgscan configuration.
4735b9c547cSRui Paulo 	 */
4745b9c547cSRui Paulo 	 char *bgscan;
4755b9c547cSRui Paulo 
4765b9c547cSRui Paulo 	/**
477f05cddf9SRui Paulo 	 * disable_scan_offload - Disable automatic offloading of scan requests
478f05cddf9SRui Paulo 	 *
479f05cddf9SRui Paulo 	 * By default, %wpa_supplicant tries to offload scanning if the driver
480f05cddf9SRui Paulo 	 * indicates support for this (sched_scan). This configuration
481f05cddf9SRui Paulo 	 * parameter can be used to disable this offloading mechanism.
482f05cddf9SRui Paulo 	 */
483f05cddf9SRui Paulo 	int disable_scan_offload;
484f05cddf9SRui Paulo 
485f05cddf9SRui Paulo 	/**
48639beb93cSSam Leffler 	 * ctrl_interface - Parameters for the control interface
48739beb93cSSam Leffler 	 *
48839beb93cSSam Leffler 	 * If this is specified, %wpa_supplicant will open a control interface
48939beb93cSSam Leffler 	 * that is available for external programs to manage %wpa_supplicant.
49039beb93cSSam Leffler 	 * The meaning of this string depends on which control interface
491f05cddf9SRui Paulo 	 * mechanism is used. For all cases, the existence of this parameter
49239beb93cSSam Leffler 	 * in configuration is used to determine whether the control interface
49339beb93cSSam Leffler 	 * is enabled.
49439beb93cSSam Leffler 	 *
49539beb93cSSam Leffler 	 * For UNIX domain sockets (default on Linux and BSD): This is a
49639beb93cSSam Leffler 	 * directory that will be created for UNIX domain sockets for listening
49739beb93cSSam Leffler 	 * to requests from external programs (CLI/GUI, etc.) for status
49839beb93cSSam Leffler 	 * information and configuration. The socket file will be named based
49939beb93cSSam Leffler 	 * on the interface name, so multiple %wpa_supplicant processes can be
50039beb93cSSam Leffler 	 * run at the same time if more than one interface is used.
50139beb93cSSam Leffler 	 * /var/run/wpa_supplicant is the recommended directory for sockets and
50239beb93cSSam Leffler 	 * by default, wpa_cli will use it when trying to connect with
50339beb93cSSam Leffler 	 * %wpa_supplicant.
50439beb93cSSam Leffler 	 *
50539beb93cSSam Leffler 	 * Access control for the control interface can be configured
50639beb93cSSam Leffler 	 * by setting the directory to allow only members of a group
50739beb93cSSam Leffler 	 * to use sockets. This way, it is possible to run
50839beb93cSSam Leffler 	 * %wpa_supplicant as root (since it needs to change network
50939beb93cSSam Leffler 	 * configuration and open raw sockets) and still allow GUI/CLI
51039beb93cSSam Leffler 	 * components to be run as non-root users. However, since the
51139beb93cSSam Leffler 	 * control interface can be used to change the network
51239beb93cSSam Leffler 	 * configuration, this access needs to be protected in many
51339beb93cSSam Leffler 	 * cases. By default, %wpa_supplicant is configured to use gid
51439beb93cSSam Leffler 	 * 0 (root). If you want to allow non-root users to use the
51539beb93cSSam Leffler 	 * control interface, add a new group and change this value to
51639beb93cSSam Leffler 	 * match with that group. Add users that should have control
51739beb93cSSam Leffler 	 * interface access to this group.
51839beb93cSSam Leffler 	 *
51939beb93cSSam Leffler 	 * When configuring both the directory and group, use following format:
52039beb93cSSam Leffler 	 * DIR=/var/run/wpa_supplicant GROUP=wheel
52139beb93cSSam Leffler 	 * DIR=/var/run/wpa_supplicant GROUP=0
52239beb93cSSam Leffler 	 * (group can be either group name or gid)
52339beb93cSSam Leffler 	 *
52439beb93cSSam Leffler 	 * For UDP connections (default on Windows): The value will be ignored.
52539beb93cSSam Leffler 	 * This variable is just used to select that the control interface is
52639beb93cSSam Leffler 	 * to be created. The value can be set to, e.g., udp
52739beb93cSSam Leffler 	 * (ctrl_interface=udp).
52839beb93cSSam Leffler 	 *
52939beb93cSSam Leffler 	 * For Windows Named Pipe: This value can be used to set the security
53039beb93cSSam Leffler 	 * descriptor for controlling access to the control interface. Security
53139beb93cSSam Leffler 	 * descriptor can be set using Security Descriptor String Format (see
53239beb93cSSam Leffler 	 * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/security_descriptor_string_format.asp).
53339beb93cSSam Leffler 	 * The descriptor string needs to be prefixed with SDDL=. For example,
53439beb93cSSam Leffler 	 * ctrl_interface=SDDL=D: would set an empty DACL (which will reject
53539beb93cSSam Leffler 	 * all connections).
53639beb93cSSam Leffler 	 */
53739beb93cSSam Leffler 	char *ctrl_interface;
53839beb93cSSam Leffler 
53939beb93cSSam Leffler 	/**
54039beb93cSSam Leffler 	 * ctrl_interface_group - Control interface group (DEPRECATED)
54139beb93cSSam Leffler 	 *
54239beb93cSSam Leffler 	 * This variable is only used for backwards compatibility. Group for
54339beb93cSSam Leffler 	 * UNIX domain sockets should now be specified using GROUP=group in
54439beb93cSSam Leffler 	 * ctrl_interface variable.
54539beb93cSSam Leffler 	 */
54639beb93cSSam Leffler 	char *ctrl_interface_group;
54739beb93cSSam Leffler 
54839beb93cSSam Leffler 	/**
54939beb93cSSam Leffler 	 * fast_reauth - EAP fast re-authentication (session resumption)
55039beb93cSSam Leffler 	 *
55139beb93cSSam Leffler 	 * By default, fast re-authentication is enabled for all EAP methods
55239beb93cSSam Leffler 	 * that support it. This variable can be used to disable fast
55339beb93cSSam Leffler 	 * re-authentication (by setting fast_reauth=0). Normally, there is no
55439beb93cSSam Leffler 	 * need to disable fast re-authentication.
55539beb93cSSam Leffler 	 */
55639beb93cSSam Leffler 	int fast_reauth;
55739beb93cSSam Leffler 
55839beb93cSSam Leffler 	/**
55939beb93cSSam Leffler 	 * opensc_engine_path - Path to the OpenSSL engine for opensc
56039beb93cSSam Leffler 	 *
56139beb93cSSam Leffler 	 * This is an OpenSSL specific configuration option for loading OpenSC
56239beb93cSSam Leffler 	 * engine (engine_opensc.so); if %NULL, this engine is not loaded.
56339beb93cSSam Leffler 	 */
56439beb93cSSam Leffler 	char *opensc_engine_path;
56539beb93cSSam Leffler 
56639beb93cSSam Leffler 	/**
56739beb93cSSam Leffler 	 * pkcs11_engine_path - Path to the OpenSSL engine for PKCS#11
56839beb93cSSam Leffler 	 *
56939beb93cSSam Leffler 	 * This is an OpenSSL specific configuration option for loading PKCS#11
57039beb93cSSam Leffler 	 * engine (engine_pkcs11.so); if %NULL, this engine is not loaded.
57139beb93cSSam Leffler 	 */
57239beb93cSSam Leffler 	char *pkcs11_engine_path;
57339beb93cSSam Leffler 
57439beb93cSSam Leffler 	/**
57539beb93cSSam Leffler 	 * pkcs11_module_path - Path to the OpenSSL OpenSC/PKCS#11 module
57639beb93cSSam Leffler 	 *
57739beb93cSSam Leffler 	 * This is an OpenSSL specific configuration option for configuring
57839beb93cSSam Leffler 	 * path to OpenSC/PKCS#11 engine (opensc-pkcs11.so); if %NULL, this
57939beb93cSSam Leffler 	 * module is not loaded.
58039beb93cSSam Leffler 	 */
58139beb93cSSam Leffler 	char *pkcs11_module_path;
58239beb93cSSam Leffler 
58339beb93cSSam Leffler 	/**
5845b9c547cSRui Paulo 	 * openssl_ciphers - OpenSSL cipher string
5855b9c547cSRui Paulo 	 *
5865b9c547cSRui Paulo 	 * This is an OpenSSL specific configuration option for configuring the
5875b9c547cSRui Paulo 	 * default ciphers. If not set, "DEFAULT:!EXP:!LOW" is used as the
5885b9c547cSRui Paulo 	 * default.
5895b9c547cSRui Paulo 	 */
5905b9c547cSRui Paulo 	char *openssl_ciphers;
5915b9c547cSRui Paulo 
5925b9c547cSRui Paulo 	/**
593f05cddf9SRui Paulo 	 * pcsc_reader - PC/SC reader name prefix
594f05cddf9SRui Paulo 	 *
595f05cddf9SRui Paulo 	 * If not %NULL, PC/SC reader with a name that matches this prefix is
596f05cddf9SRui Paulo 	 * initialized for SIM/USIM access. Empty string can be used to match
597f05cddf9SRui Paulo 	 * the first available reader.
598f05cddf9SRui Paulo 	 */
599f05cddf9SRui Paulo 	char *pcsc_reader;
600f05cddf9SRui Paulo 
601f05cddf9SRui Paulo 	/**
602f05cddf9SRui Paulo 	 * pcsc_pin - PIN for USIM, GSM SIM, and smartcards
603f05cddf9SRui Paulo 	 *
604f05cddf9SRui Paulo 	 * This field is used to configure PIN for SIM/USIM for EAP-SIM and
605f05cddf9SRui Paulo 	 * EAP-AKA. If left out, this will be asked through control interface.
606f05cddf9SRui Paulo 	 */
607f05cddf9SRui Paulo 	char *pcsc_pin;
608f05cddf9SRui Paulo 
609f05cddf9SRui Paulo 	/**
6105b9c547cSRui Paulo 	 * external_sim - Use external processing for SIM/USIM operations
6115b9c547cSRui Paulo 	 */
6125b9c547cSRui Paulo 	int external_sim;
6135b9c547cSRui Paulo 
6145b9c547cSRui Paulo 	/**
61539beb93cSSam Leffler 	 * driver_param - Driver interface parameters
61639beb93cSSam Leffler 	 *
61739beb93cSSam Leffler 	 * This text string is passed to the selected driver interface with the
61839beb93cSSam Leffler 	 * optional struct wpa_driver_ops::set_param() handler. This can be
61939beb93cSSam Leffler 	 * used to configure driver specific options without having to add new
62039beb93cSSam Leffler 	 * driver interface functionality.
62139beb93cSSam Leffler 	 */
62239beb93cSSam Leffler 	char *driver_param;
62339beb93cSSam Leffler 
62439beb93cSSam Leffler 	/**
62539beb93cSSam Leffler 	 * dot11RSNAConfigPMKLifetime - Maximum lifetime of a PMK
62639beb93cSSam Leffler 	 *
62739beb93cSSam Leffler 	 * dot11 MIB variable for the maximum lifetime of a PMK in the PMK
62839beb93cSSam Leffler 	 * cache (unit: seconds).
62939beb93cSSam Leffler 	 */
63039beb93cSSam Leffler 	unsigned int dot11RSNAConfigPMKLifetime;
63139beb93cSSam Leffler 
63239beb93cSSam Leffler 	/**
63339beb93cSSam Leffler 	 * dot11RSNAConfigPMKReauthThreshold - PMK re-authentication threshold
63439beb93cSSam Leffler 	 *
63539beb93cSSam Leffler 	 * dot11 MIB variable for the percentage of the PMK lifetime
63639beb93cSSam Leffler 	 * that should expire before an IEEE 802.1X reauthentication occurs.
63739beb93cSSam Leffler 	 */
63839beb93cSSam Leffler 	unsigned int dot11RSNAConfigPMKReauthThreshold;
63939beb93cSSam Leffler 
64039beb93cSSam Leffler 	/**
64139beb93cSSam Leffler 	 * dot11RSNAConfigSATimeout - Security association timeout
64239beb93cSSam Leffler 	 *
64339beb93cSSam Leffler 	 * dot11 MIB variable for the maximum time a security association
64439beb93cSSam Leffler 	 * shall take to set up (unit: seconds).
64539beb93cSSam Leffler 	 */
64639beb93cSSam Leffler 	unsigned int dot11RSNAConfigSATimeout;
64739beb93cSSam Leffler 
64839beb93cSSam Leffler 	/**
64939beb93cSSam Leffler 	 * update_config - Is wpa_supplicant allowed to update configuration
65039beb93cSSam Leffler 	 *
65139beb93cSSam Leffler 	 * This variable control whether wpa_supplicant is allow to re-write
65239beb93cSSam Leffler 	 * its configuration with wpa_config_write(). If this is zero,
65339beb93cSSam Leffler 	 * configuration data is only changed in memory and the external data
654c1d255d3SCy Schubert 	 * is not overridden. If this is non-zero, wpa_supplicant will update
65539beb93cSSam Leffler 	 * the configuration data (e.g., a file) whenever configuration is
65639beb93cSSam Leffler 	 * changed. This update may replace the old configuration which can
65739beb93cSSam Leffler 	 * remove comments from it in case of a text file configuration.
65839beb93cSSam Leffler 	 */
65939beb93cSSam Leffler 	int update_config;
66039beb93cSSam Leffler 
66139beb93cSSam Leffler 	/**
66239beb93cSSam Leffler 	 * blobs - Configuration blobs
66339beb93cSSam Leffler 	 */
66439beb93cSSam Leffler 	struct wpa_config_blob *blobs;
66539beb93cSSam Leffler 
66639beb93cSSam Leffler 	/**
66739beb93cSSam Leffler 	 * uuid - Universally Unique IDentifier (UUID; see RFC 4122) for WPS
66839beb93cSSam Leffler 	 */
66939beb93cSSam Leffler 	u8 uuid[16];
67039beb93cSSam Leffler 
67139beb93cSSam Leffler 	/**
67285732ac8SCy Schubert 	 * auto_uuid - Automatic UUID behavior
67385732ac8SCy Schubert 	 * 0 = generate static value based on the local MAC address (default)
67485732ac8SCy Schubert 	 * 1 = generate a random UUID every time wpa_supplicant starts
67585732ac8SCy Schubert 	 */
67685732ac8SCy Schubert 	int auto_uuid;
67785732ac8SCy Schubert 
67885732ac8SCy Schubert 	/**
67939beb93cSSam Leffler 	 * device_name - Device Name (WPS)
68039beb93cSSam Leffler 	 * User-friendly description of device; up to 32 octets encoded in
68139beb93cSSam Leffler 	 * UTF-8
68239beb93cSSam Leffler 	 */
68339beb93cSSam Leffler 	char *device_name;
68439beb93cSSam Leffler 
68539beb93cSSam Leffler 	/**
68639beb93cSSam Leffler 	 * manufacturer - Manufacturer (WPS)
68739beb93cSSam Leffler 	 * The manufacturer of the device (up to 64 ASCII characters)
68839beb93cSSam Leffler 	 */
68939beb93cSSam Leffler 	char *manufacturer;
69039beb93cSSam Leffler 
69139beb93cSSam Leffler 	/**
69239beb93cSSam Leffler 	 * model_name - Model Name (WPS)
69339beb93cSSam Leffler 	 * Model of the device (up to 32 ASCII characters)
69439beb93cSSam Leffler 	 */
69539beb93cSSam Leffler 	char *model_name;
69639beb93cSSam Leffler 
69739beb93cSSam Leffler 	/**
69839beb93cSSam Leffler 	 * model_number - Model Number (WPS)
69939beb93cSSam Leffler 	 * Additional device description (up to 32 ASCII characters)
70039beb93cSSam Leffler 	 */
70139beb93cSSam Leffler 	char *model_number;
70239beb93cSSam Leffler 
70339beb93cSSam Leffler 	/**
70439beb93cSSam Leffler 	 * serial_number - Serial Number (WPS)
70539beb93cSSam Leffler 	 * Serial number of the device (up to 32 characters)
70639beb93cSSam Leffler 	 */
70739beb93cSSam Leffler 	char *serial_number;
70839beb93cSSam Leffler 
70939beb93cSSam Leffler 	/**
71039beb93cSSam Leffler 	 * device_type - Primary Device Type (WPS)
71139beb93cSSam Leffler 	 */
712f05cddf9SRui Paulo 	u8 device_type[WPS_DEV_TYPE_LEN];
71339beb93cSSam Leffler 
71439beb93cSSam Leffler 	/**
715e28a4053SRui Paulo 	 * config_methods - Config Methods
716e28a4053SRui Paulo 	 *
717e28a4053SRui Paulo 	 * This is a space-separated list of supported WPS configuration
718f05cddf9SRui Paulo 	 * methods. For example, "label virtual_display virtual_push_button
719f05cddf9SRui Paulo 	 * keypad".
720e28a4053SRui Paulo 	 * Available methods: usba ethernet label display ext_nfc_token
721f05cddf9SRui Paulo 	 * int_nfc_token nfc_interface push_button keypad
722f05cddf9SRui Paulo 	 * virtual_display physical_display
723f05cddf9SRui Paulo 	 * virtual_push_button physical_push_button.
724e28a4053SRui Paulo 	 */
725e28a4053SRui Paulo 	char *config_methods;
726e28a4053SRui Paulo 
727e28a4053SRui Paulo 	/**
72839beb93cSSam Leffler 	 * os_version - OS Version (WPS)
72939beb93cSSam Leffler 	 * 4-octet operating system version number
73039beb93cSSam Leffler 	 */
73139beb93cSSam Leffler 	u8 os_version[4];
73239beb93cSSam Leffler 
73339beb93cSSam Leffler 	/**
73439beb93cSSam Leffler 	 * country - Country code
73539beb93cSSam Leffler 	 *
73639beb93cSSam Leffler 	 * This is the ISO/IEC alpha2 country code for which we are operating
73739beb93cSSam Leffler 	 * in
73839beb93cSSam Leffler 	 */
73939beb93cSSam Leffler 	char country[2];
74039beb93cSSam Leffler 
74139beb93cSSam Leffler 	/**
74239beb93cSSam Leffler 	 * wps_cred_processing - Credential processing
74339beb93cSSam Leffler 	 *
74439beb93cSSam Leffler 	 *   0 = process received credentials internally
74539beb93cSSam Leffler 	 *   1 = do not process received credentials; just pass them over
74639beb93cSSam Leffler 	 *	ctrl_iface to external program(s)
74739beb93cSSam Leffler 	 *   2 = process received credentials internally and pass them over
74839beb93cSSam Leffler 	 *	ctrl_iface to external program(s)
74939beb93cSSam Leffler 	 */
75039beb93cSSam Leffler 	int wps_cred_processing;
751e28a4053SRui Paulo 
7524bc52338SCy Schubert 	/**
7534bc52338SCy Schubert 	 * wps_cred_add_sae - Whether to enable SAE automatically for WPS
7544bc52338SCy Schubert 	 *
7554bc52338SCy Schubert 	 * 0 = only add the explicitly listed WPA2-PSK configuration
7564bc52338SCy Schubert 	 * 1 = add both the WPA2-PSK and SAE configuration and enable PMF so
7574bc52338SCy Schubert 	 *     that the station gets configured in WPA3-Personal transition mode
7584bc52338SCy Schubert 	 *     (supports both WPA2-Personal (PSK) and WPA3-Personal (SAE) APs).
7594bc52338SCy Schubert 	 */
7604bc52338SCy Schubert 	int wps_cred_add_sae;
7614bc52338SCy Schubert 
762f05cddf9SRui Paulo #define MAX_SEC_DEVICE_TYPES 5
763f05cddf9SRui Paulo 	/**
764f05cddf9SRui Paulo 	 * sec_device_types - Secondary Device Types (P2P)
765f05cddf9SRui Paulo 	 */
766f05cddf9SRui Paulo 	u8 sec_device_type[MAX_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN];
767f05cddf9SRui Paulo 	int num_sec_device_types;
768f05cddf9SRui Paulo 
769f05cddf9SRui Paulo 	int p2p_listen_reg_class;
770f05cddf9SRui Paulo 	int p2p_listen_channel;
771f05cddf9SRui Paulo 	int p2p_oper_reg_class;
772f05cddf9SRui Paulo 	int p2p_oper_channel;
773f05cddf9SRui Paulo 	int p2p_go_intent;
774f05cddf9SRui Paulo 	char *p2p_ssid_postfix;
775f05cddf9SRui Paulo 	int persistent_reconnect;
776f05cddf9SRui Paulo 	int p2p_intra_bss;
777f05cddf9SRui Paulo 	unsigned int num_p2p_pref_chan;
778f05cddf9SRui Paulo 	struct p2p_channel *p2p_pref_chan;
7795b9c547cSRui Paulo 	struct wpa_freq_range_list p2p_no_go_freq;
7805b9c547cSRui Paulo 	int p2p_add_cli_chan;
7815b9c547cSRui Paulo 	int p2p_ignore_shared_freq;
7825b9c547cSRui Paulo 	int p2p_optimize_listen_chan;
783f05cddf9SRui Paulo 
784c1d255d3SCy Schubert 	int p2p_6ghz_disable;
785c1d255d3SCy Schubert 
786f05cddf9SRui Paulo 	struct wpabuf *wps_vendor_ext_m1;
787f05cddf9SRui Paulo 
788f05cddf9SRui Paulo #define MAX_WPS_VENDOR_EXT 10
789f05cddf9SRui Paulo 	/**
790f05cddf9SRui Paulo 	 * wps_vendor_ext - Vendor extension attributes in WPS
791f05cddf9SRui Paulo 	 */
792f05cddf9SRui Paulo 	struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXT];
793f05cddf9SRui Paulo 
794f05cddf9SRui Paulo 	/**
795f05cddf9SRui Paulo 	 * p2p_group_idle - Maximum idle time in seconds for P2P group
796f05cddf9SRui Paulo 	 *
797f05cddf9SRui Paulo 	 * This value controls how long a P2P group is maintained after there
798f05cddf9SRui Paulo 	 * is no other members in the group. As a GO, this means no associated
799f05cddf9SRui Paulo 	 * stations in the group. As a P2P client, this means no GO seen in
800f05cddf9SRui Paulo 	 * scan results. The maximum idle time is specified in seconds with 0
801f05cddf9SRui Paulo 	 * indicating no time limit, i.e., the P2P group remains in active
802f05cddf9SRui Paulo 	 * state indefinitely until explicitly removed. As a P2P client, the
803f05cddf9SRui Paulo 	 * maximum idle time of P2P_MAX_CLIENT_IDLE seconds is enforced, i.e.,
804f05cddf9SRui Paulo 	 * this parameter is mainly meant for GO use and for P2P client, it can
805f05cddf9SRui Paulo 	 * only be used to reduce the default timeout to smaller value. A
806f05cddf9SRui Paulo 	 * special value -1 can be used to configure immediate removal of the
807f05cddf9SRui Paulo 	 * group for P2P client role on any disconnection after the data
808f05cddf9SRui Paulo 	 * connection has been established.
809f05cddf9SRui Paulo 	 */
810f05cddf9SRui Paulo 	int p2p_group_idle;
811f05cddf9SRui Paulo 
812e28a4053SRui Paulo 	/**
813325151a3SRui Paulo 	 * p2p_go_freq_change_policy - The GO frequency change policy
814325151a3SRui Paulo 	 *
815325151a3SRui Paulo 	 * This controls the behavior of the GO when there is a change in the
816325151a3SRui Paulo 	 * map of the currently used frequencies in case more than one channel
817325151a3SRui Paulo 	 * is supported.
818325151a3SRui Paulo 	 *
819325151a3SRui Paulo 	 * @P2P_GO_FREQ_MOVE_SCM: Prefer working in a single channel mode if
820325151a3SRui Paulo 	 * possible. In case the GO is the only interface using its frequency
821325151a3SRui Paulo 	 * and there are other station interfaces on other frequencies, the GO
822325151a3SRui Paulo 	 * will migrate to one of these frequencies.
823325151a3SRui Paulo 	 *
824325151a3SRui Paulo 	 * @P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS: Same as P2P_GO_FREQ_MOVE_SCM,
825325151a3SRui Paulo 	 * but a transition is possible only in case one of the other used
826325151a3SRui Paulo 	 * frequencies is one of the frequencies in the intersection of the
827325151a3SRui Paulo 	 * frequency list of the local device and the peer device.
828325151a3SRui Paulo 	 *
829325151a3SRui Paulo 	 * @P2P_GO_FREQ_MOVE_STAY: Prefer to stay on the current frequency.
830780fb4a2SCy Schubert 	 *
831780fb4a2SCy Schubert 	 * @P2P_GO_FREQ_MOVE_SCM_ECSA: Same as
832780fb4a2SCy Schubert 	 * P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS but a transition is possible only
833780fb4a2SCy Schubert 	 * if all the group members advertise eCSA support.
834325151a3SRui Paulo 	 */
835325151a3SRui Paulo 	enum {
836325151a3SRui Paulo 		P2P_GO_FREQ_MOVE_SCM = 0,
837325151a3SRui Paulo 		P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS = 1,
838325151a3SRui Paulo 		P2P_GO_FREQ_MOVE_STAY = 2,
839780fb4a2SCy Schubert 		P2P_GO_FREQ_MOVE_SCM_ECSA = 3,
840780fb4a2SCy Schubert 		P2P_GO_FREQ_MOVE_MAX = P2P_GO_FREQ_MOVE_SCM_ECSA,
841325151a3SRui Paulo 	} p2p_go_freq_change_policy;
842325151a3SRui Paulo 
843325151a3SRui Paulo #define DEFAULT_P2P_GO_FREQ_MOVE P2P_GO_FREQ_MOVE_STAY
844325151a3SRui Paulo 
845325151a3SRui Paulo 	/**
8465b9c547cSRui Paulo 	 * p2p_passphrase_len - Passphrase length (8..63) for P2P GO
8475b9c547cSRui Paulo 	 *
8485b9c547cSRui Paulo 	 * This parameter controls the length of the random passphrase that is
8495b9c547cSRui Paulo 	 * generated at the GO.
8505b9c547cSRui Paulo 	 */
8515b9c547cSRui Paulo 	unsigned int p2p_passphrase_len;
8525b9c547cSRui Paulo 
8535b9c547cSRui Paulo 	/**
854e28a4053SRui Paulo 	 * bss_max_count - Maximum number of BSS entries to keep in memory
855e28a4053SRui Paulo 	 */
856e28a4053SRui Paulo 	unsigned int bss_max_count;
857e28a4053SRui Paulo 
858e28a4053SRui Paulo 	/**
859f05cddf9SRui Paulo 	 * bss_expiration_age - BSS entry age after which it can be expired
860f05cddf9SRui Paulo 	 *
861f05cddf9SRui Paulo 	 * This value controls the time in seconds after which a BSS entry
862f05cddf9SRui Paulo 	 * gets removed if it has not been updated or is not in use.
863f05cddf9SRui Paulo 	 */
864f05cddf9SRui Paulo 	unsigned int bss_expiration_age;
865f05cddf9SRui Paulo 
866f05cddf9SRui Paulo 	/**
867f05cddf9SRui Paulo 	 * bss_expiration_scan_count - Expire BSS after number of scans
868f05cddf9SRui Paulo 	 *
869f05cddf9SRui Paulo 	 * If the BSS entry has not been seen in this many scans, it will be
870f05cddf9SRui Paulo 	 * removed. A value of 1 means that entry is removed after the first
871f05cddf9SRui Paulo 	 * scan in which the BSSID is not seen. Larger values can be used
872f05cddf9SRui Paulo 	 * to avoid BSS entries disappearing if they are not visible in
873f05cddf9SRui Paulo 	 * every scan (e.g., low signal quality or interference).
874f05cddf9SRui Paulo 	 */
875f05cddf9SRui Paulo 	unsigned int bss_expiration_scan_count;
876f05cddf9SRui Paulo 
877f05cddf9SRui Paulo 	/**
878e28a4053SRui Paulo 	 * filter_ssids - SSID-based scan result filtering
879e28a4053SRui Paulo 	 *
880e28a4053SRui Paulo 	 *   0 = do not filter scan results
881e28a4053SRui Paulo 	 *   1 = only include configured SSIDs in scan results/BSS table
882e28a4053SRui Paulo 	 */
883e28a4053SRui Paulo 	int filter_ssids;
884f05cddf9SRui Paulo 
885f05cddf9SRui Paulo 	/**
886f05cddf9SRui Paulo 	 * filter_rssi - RSSI-based scan result filtering
887f05cddf9SRui Paulo 	 *
888f05cddf9SRui Paulo 	 * 0 = do not filter scan results
889f05cddf9SRui Paulo 	 * -n = filter scan results below -n dBm
890f05cddf9SRui Paulo 	 */
891f05cddf9SRui Paulo 	int filter_rssi;
892f05cddf9SRui Paulo 
893f05cddf9SRui Paulo 	/**
894f05cddf9SRui Paulo 	 * max_num_sta - Maximum number of STAs in an AP/P2P GO
895f05cddf9SRui Paulo 	 */
896f05cddf9SRui Paulo 	unsigned int max_num_sta;
897f05cddf9SRui Paulo 
898f05cddf9SRui Paulo 	/**
89985732ac8SCy Schubert 	 * ap_isolate - Whether to use client isolation feature
90085732ac8SCy Schubert 	 *
90185732ac8SCy Schubert 	 * Client isolation can be used to prevent low-level bridging of
90285732ac8SCy Schubert 	 * frames between associated stations in the BSS. By default,
90385732ac8SCy Schubert 	 * this bridging is allowed (ap_isolate=0); except in P2P GO case,
90485732ac8SCy Schubert 	 * where p2p_intra_bss parameter is used to determine whether to allow
90585732ac8SCy Schubert 	 * intra-BSS forwarding (ap_isolate = !p2p_intra_bss).
90685732ac8SCy Schubert 	 *
90785732ac8SCy Schubert 	 * 0 = do not enable AP isolation
90885732ac8SCy Schubert 	 * 1 = enable AP isolation
90985732ac8SCy Schubert 	 */
91085732ac8SCy Schubert 	int ap_isolate;
91185732ac8SCy Schubert 
91285732ac8SCy Schubert 	/**
9135b9c547cSRui Paulo 	 * freq_list - Array of allowed scan frequencies or %NULL for all
9145b9c547cSRui Paulo 	 *
9155b9c547cSRui Paulo 	 * This is an optional zero-terminated array of frequencies in
9165b9c547cSRui Paulo 	 * megahertz (MHz) to allow for narrowing scanning range.
9175b9c547cSRui Paulo 	 */
9185b9c547cSRui Paulo 	int *freq_list;
9195b9c547cSRui Paulo 
9205b9c547cSRui Paulo 	/**
921c1d255d3SCy Schubert 	 * initial_freq_list - like freq_list but for initial scan
922c1d255d3SCy Schubert 	 *
923c1d255d3SCy Schubert 	 * This is an optional zero-terminated array of frequencies in
924c1d255d3SCy Schubert 	 * megahertz (MHz) to allow for narrowing scanning range when
925c1d255d3SCy Schubert 	 * the application is started.
926c1d255d3SCy Schubert 	 *
927c1d255d3SCy Schubert 	 * This can be used to speed up initial connection time if the
928c1d255d3SCy Schubert 	 * channel is known ahead of time, without limiting the scanned
929c1d255d3SCy Schubert 	 * frequencies during normal use.
930c1d255d3SCy Schubert 	 */
931c1d255d3SCy Schubert 	int *initial_freq_list;
932c1d255d3SCy Schubert 
933c1d255d3SCy Schubert 	/**
9345b9c547cSRui Paulo 	 * scan_cur_freq - Whether to scan only the current channel
9355b9c547cSRui Paulo 	 *
9365b9c547cSRui Paulo 	 * If true, attempt to scan only the current channel if any other
9375b9c547cSRui Paulo 	 * VIFs on this radio are already associated on a particular channel.
9385b9c547cSRui Paulo 	 */
9395b9c547cSRui Paulo 	int scan_cur_freq;
9405b9c547cSRui Paulo 
9415b9c547cSRui Paulo 	/**
942c1d255d3SCy Schubert 	 * scan_res_valid_for_connect - Seconds scans are valid for association
943c1d255d3SCy Schubert 	 *
944c1d255d3SCy Schubert 	 * This configures the number of seconds old scan results are considered
945c1d255d3SCy Schubert 	 * valid for association. When scan results are older than this value
946c1d255d3SCy Schubert 	 * a new scan is triggered prior to the association.
947c1d255d3SCy Schubert 	 */
948c1d255d3SCy Schubert 	int scan_res_valid_for_connect;
949c1d255d3SCy Schubert 
950c1d255d3SCy Schubert 	/**
951f05cddf9SRui Paulo 	 * changed_parameters - Bitmap of changed parameters since last update
952f05cddf9SRui Paulo 	 */
953f05cddf9SRui Paulo 	unsigned int changed_parameters;
954f05cddf9SRui Paulo 
955f05cddf9SRui Paulo 	/**
95685732ac8SCy Schubert 	 * disassoc_low_ack - Disassociate stations with massive packet loss
957f05cddf9SRui Paulo 	 */
958f05cddf9SRui Paulo 	int disassoc_low_ack;
959f05cddf9SRui Paulo 
960f05cddf9SRui Paulo 	/**
961f05cddf9SRui Paulo 	 * interworking - Whether Interworking (IEEE 802.11u) is enabled
962f05cddf9SRui Paulo 	 */
963f05cddf9SRui Paulo 	int interworking;
964f05cddf9SRui Paulo 
965f05cddf9SRui Paulo 	/**
966f05cddf9SRui Paulo 	 * access_network_type - Access Network Type
967f05cddf9SRui Paulo 	 *
968f05cddf9SRui Paulo 	 * When Interworking is enabled, scans will be limited to APs that
969f05cddf9SRui Paulo 	 * advertise the specified Access Network Type (0..15; with 15
970f05cddf9SRui Paulo 	 * indicating wildcard match).
971f05cddf9SRui Paulo 	 */
972f05cddf9SRui Paulo 	int access_network_type;
973f05cddf9SRui Paulo 
974f05cddf9SRui Paulo 	 /**
97585732ac8SCy Schubert 	  * go_interworking - Whether Interworking for P2P GO is enabled
97685732ac8SCy Schubert 	  */
97785732ac8SCy Schubert 	int go_interworking;
97885732ac8SCy Schubert 
97985732ac8SCy Schubert 	/**
98085732ac8SCy Schubert 	 * go_access_network_type - P2P GO Access Network Type
98185732ac8SCy Schubert 	 *
98285732ac8SCy Schubert 	 * This indicates which access network type to advertise if Interworking
98385732ac8SCy Schubert 	 * is enabled for P2P GO.
98485732ac8SCy Schubert 	 */
98585732ac8SCy Schubert 	int go_access_network_type;
98685732ac8SCy Schubert 
98785732ac8SCy Schubert 	/**
98885732ac8SCy Schubert 	 * go_internet - Interworking: Internet connectivity (0 or 1)
98985732ac8SCy Schubert 	 */
99085732ac8SCy Schubert 	int go_internet;
99185732ac8SCy Schubert 
99285732ac8SCy Schubert 	/**
99385732ac8SCy Schubert 	 * go_venue_group - Interworking: Venue group
99485732ac8SCy Schubert 	 */
99585732ac8SCy Schubert 	int go_venue_group;
99685732ac8SCy Schubert 
99785732ac8SCy Schubert 	/**
99885732ac8SCy Schubert 	 * go_venue_type: Interworking: Venue type
99985732ac8SCy Schubert 	 */
100085732ac8SCy Schubert 	int go_venue_type;
100185732ac8SCy Schubert 
100285732ac8SCy Schubert 	/**
1003c1d255d3SCy Schubert 	 * hessid - Homogeneous ESS identifier
1004f05cddf9SRui Paulo 	 *
1005f05cddf9SRui Paulo 	 * If this is set (any octet is non-zero), scans will be used to
1006f05cddf9SRui Paulo 	 * request response only from BSSes belonging to the specified
1007f05cddf9SRui Paulo 	 * Homogeneous ESS. This is used only if interworking is enabled.
1008f05cddf9SRui Paulo 	 */
1009f05cddf9SRui Paulo 	u8 hessid[ETH_ALEN];
1010f05cddf9SRui Paulo 
1011f05cddf9SRui Paulo 	/**
1012f05cddf9SRui Paulo 	 * hs20 - Hotspot 2.0
1013f05cddf9SRui Paulo 	 */
1014f05cddf9SRui Paulo 	int hs20;
1015f05cddf9SRui Paulo 
1016f05cddf9SRui Paulo 	/**
1017f05cddf9SRui Paulo 	 * pbc_in_m1 - AP mode WPS probing workaround for PBC with Windows 7
1018f05cddf9SRui Paulo 	 *
1019f05cddf9SRui Paulo 	 * Windows 7 uses incorrect way of figuring out AP's WPS capabilities
1020f05cddf9SRui Paulo 	 * by acting as a Registrar and using M1 from the AP. The config
1021f05cddf9SRui Paulo 	 * methods attribute in that message is supposed to indicate only the
1022f05cddf9SRui Paulo 	 * configuration method supported by the AP in Enrollee role, i.e., to
1023f05cddf9SRui Paulo 	 * add an external Registrar. For that case, PBC shall not be used and
1024f05cddf9SRui Paulo 	 * as such, the PushButton config method is removed from M1 by default.
1025f05cddf9SRui Paulo 	 * If pbc_in_m1=1 is included in the configuration file, the PushButton
1026f05cddf9SRui Paulo 	 * config method is left in M1 (if included in config_methods
1027f05cddf9SRui Paulo 	 * parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from
1028f05cddf9SRui Paulo 	 * a label in the AP).
1029f05cddf9SRui Paulo 	 */
1030f05cddf9SRui Paulo 	int pbc_in_m1;
1031f05cddf9SRui Paulo 
1032f05cddf9SRui Paulo 	/**
1033f05cddf9SRui Paulo 	 * autoscan - Automatic scan parameters or %NULL if none
1034f05cddf9SRui Paulo 	 *
1035f05cddf9SRui Paulo 	 * This is an optional set of parameters for automatic scanning
1036f05cddf9SRui Paulo 	 * within an interface in following format:
1037f05cddf9SRui Paulo 	 * <autoscan module name>:<module parameters>
1038f05cddf9SRui Paulo 	 */
1039f05cddf9SRui Paulo 	char *autoscan;
1040f05cddf9SRui Paulo 
1041f05cddf9SRui Paulo 	/**
10425b9c547cSRui Paulo 	 * wps_nfc_pw_from_config - NFC Device Password was read from config
10435b9c547cSRui Paulo 	 *
10445b9c547cSRui Paulo 	 * This parameter can be determined whether the NFC Device Password was
10455b9c547cSRui Paulo 	 * included in the configuration (1) or generated dynamically (0). Only
10465b9c547cSRui Paulo 	 * the former case is re-written back to the configuration file.
10475b9c547cSRui Paulo 	 */
10485b9c547cSRui Paulo 	int wps_nfc_pw_from_config;
10495b9c547cSRui Paulo 
10505b9c547cSRui Paulo 	/**
1051f05cddf9SRui Paulo 	 * wps_nfc_dev_pw_id - NFC Device Password ID for password token
1052f05cddf9SRui Paulo 	 */
1053f05cddf9SRui Paulo 	int wps_nfc_dev_pw_id;
1054f05cddf9SRui Paulo 
1055f05cddf9SRui Paulo 	/**
1056f05cddf9SRui Paulo 	 * wps_nfc_dh_pubkey - NFC DH Public Key for password token
1057f05cddf9SRui Paulo 	 */
1058f05cddf9SRui Paulo 	struct wpabuf *wps_nfc_dh_pubkey;
1059f05cddf9SRui Paulo 
1060f05cddf9SRui Paulo 	/**
1061f05cddf9SRui Paulo 	 * wps_nfc_dh_privkey - NFC DH Private Key for password token
1062f05cddf9SRui Paulo 	 */
1063f05cddf9SRui Paulo 	struct wpabuf *wps_nfc_dh_privkey;
1064f05cddf9SRui Paulo 
1065f05cddf9SRui Paulo 	/**
1066f05cddf9SRui Paulo 	 * wps_nfc_dev_pw - NFC Device Password for password token
1067f05cddf9SRui Paulo 	 */
1068f05cddf9SRui Paulo 	struct wpabuf *wps_nfc_dev_pw;
1069f05cddf9SRui Paulo 
1070f05cddf9SRui Paulo 	/**
1071f05cddf9SRui Paulo 	 * ext_password_backend - External password backend or %NULL if none
1072f05cddf9SRui Paulo 	 *
1073f05cddf9SRui Paulo 	 * format: <backend name>[:<optional backend parameters>]
1074f05cddf9SRui Paulo 	 */
1075f05cddf9SRui Paulo 	char *ext_password_backend;
1076f05cddf9SRui Paulo 
1077f05cddf9SRui Paulo 	/*
1078f05cddf9SRui Paulo 	 * p2p_go_max_inactivity - Timeout in seconds to detect STA inactivity
1079f05cddf9SRui Paulo 	 *
1080f05cddf9SRui Paulo 	 * This timeout value is used in P2P GO mode to clean up
1081f05cddf9SRui Paulo 	 * inactive stations.
1082f05cddf9SRui Paulo 	 * By default: 300 seconds.
1083f05cddf9SRui Paulo 	 */
1084f05cddf9SRui Paulo 	int p2p_go_max_inactivity;
1085f05cddf9SRui Paulo 
1086f05cddf9SRui Paulo 	struct hostapd_wmm_ac_params wmm_ac_params[4];
1087c1d255d3SCy Schubert 	struct hostapd_tx_queue_params tx_queue[4];
1088f05cddf9SRui Paulo 
1089f05cddf9SRui Paulo 	/**
1090f05cddf9SRui Paulo 	 * auto_interworking - Whether to use network selection automatically
1091f05cddf9SRui Paulo 	 *
1092f05cddf9SRui Paulo 	 * 0 = do not automatically go through Interworking network selection
1093f05cddf9SRui Paulo 	 *     (i.e., require explicit interworking_select command for this)
1094f05cddf9SRui Paulo 	 * 1 = perform Interworking network selection if one or more
1095f05cddf9SRui Paulo 	 *     credentials have been configured and scan did not find a
1096f05cddf9SRui Paulo 	 *     matching network block
1097f05cddf9SRui Paulo 	 */
1098f05cddf9SRui Paulo 	int auto_interworking;
1099f05cddf9SRui Paulo 
1100f05cddf9SRui Paulo 	/**
1101f05cddf9SRui Paulo 	 * p2p_go_ht40 - Default mode for HT40 enable when operating as GO.
1102f05cddf9SRui Paulo 	 *
1103f05cddf9SRui Paulo 	 * This will take effect for p2p_group_add, p2p_connect, and p2p_invite.
1104f05cddf9SRui Paulo 	 * Note that regulatory constraints and driver capabilities are
1105f05cddf9SRui Paulo 	 * consulted anyway, so setting it to 1 can't do real harm.
1106f05cddf9SRui Paulo 	 * By default: 0 (disabled)
1107f05cddf9SRui Paulo 	 */
1108f05cddf9SRui Paulo 	int p2p_go_ht40;
1109f05cddf9SRui Paulo 
1110f05cddf9SRui Paulo 	/**
11115b9c547cSRui Paulo 	 * p2p_go_vht - Default mode for VHT enable when operating as GO
11125b9c547cSRui Paulo 	 *
11135b9c547cSRui Paulo 	 * This will take effect for p2p_group_add, p2p_connect, and p2p_invite.
11145b9c547cSRui Paulo 	 * Note that regulatory constraints and driver capabilities are
11155b9c547cSRui Paulo 	 * consulted anyway, so setting it to 1 can't do real harm.
11165b9c547cSRui Paulo 	 * By default: 0 (disabled)
11175b9c547cSRui Paulo 	 */
11185b9c547cSRui Paulo 	int p2p_go_vht;
11195b9c547cSRui Paulo 
11205b9c547cSRui Paulo 	/**
1121c1d255d3SCy Schubert 	 * p2p_go_edmg - Default mode for EDMG enable when operating as GO
1122c1d255d3SCy Schubert 	 *
1123c1d255d3SCy Schubert 	 * This will take effect for p2p_group_add, p2p_connect, and p2p_invite.
1124c1d255d3SCy Schubert 	 * Note that regulatory constraints and driver capabilities are
1125c1d255d3SCy Schubert 	 * consulted anyway, so setting it to 1 can't do real harm.
1126c1d255d3SCy Schubert 	 * By default: 0 (disabled)
1127c1d255d3SCy Schubert 	 */
1128c1d255d3SCy Schubert 	int p2p_go_edmg;
1129c1d255d3SCy Schubert 
1130c1d255d3SCy Schubert 	/**
11314bc52338SCy Schubert 	 * p2p_go_he - Default mode for 11ax HE enable when operating as GO
11324bc52338SCy Schubert 	 *
11334bc52338SCy Schubert 	 * This will take effect for p2p_group_add, p2p_connect, and p2p_invite.
11344bc52338SCy Schubert 	 * Note that regulatory constraints and driver capabilities are
11354bc52338SCy Schubert 	 * consulted anyway, so setting it to 1 can't do real harm.
11364bc52338SCy Schubert 	 * By default: 0 (disabled)
11374bc52338SCy Schubert 	 */
11384bc52338SCy Schubert 	int p2p_go_he;
11394bc52338SCy Schubert 
11404bc52338SCy Schubert 	/**
11415b9c547cSRui Paulo 	 * p2p_go_ctwindow - CTWindow to use when operating as GO
11425b9c547cSRui Paulo 	 *
11435b9c547cSRui Paulo 	 * By default: 0 (no CTWindow). Values 0-127 can be used to indicate
11445b9c547cSRui Paulo 	 * the length of the CTWindow in TUs.
11455b9c547cSRui Paulo 	 */
11465b9c547cSRui Paulo 	int p2p_go_ctwindow;
11475b9c547cSRui Paulo 
11485b9c547cSRui Paulo 	/**
1149f05cddf9SRui Paulo 	 * p2p_disabled - Whether P2P operations are disabled for this interface
1150f05cddf9SRui Paulo 	 */
1151f05cddf9SRui Paulo 	int p2p_disabled;
1152f05cddf9SRui Paulo 
1153f05cddf9SRui Paulo 	/**
1154f05cddf9SRui Paulo 	 * p2p_no_group_iface - Whether group interfaces can be used
1155f05cddf9SRui Paulo 	 *
1156f05cddf9SRui Paulo 	 * By default, wpa_supplicant will create a separate interface for P2P
1157f05cddf9SRui Paulo 	 * group operations if the driver supports this. This functionality can
1158f05cddf9SRui Paulo 	 * be disabled by setting this parameter to 1. In that case, the same
1159f05cddf9SRui Paulo 	 * interface that was used for the P2P management operations is used
1160f05cddf9SRui Paulo 	 * also for the group operation.
1161f05cddf9SRui Paulo 	 */
1162f05cddf9SRui Paulo 	int p2p_no_group_iface;
1163f05cddf9SRui Paulo 
1164f05cddf9SRui Paulo 	/**
1165325151a3SRui Paulo 	 * p2p_cli_probe - Enable/disable P2P CLI probe request handling
1166325151a3SRui Paulo 	 *
1167325151a3SRui Paulo 	 * If this parameter is set to 1, a connected P2P Client will receive
1168325151a3SRui Paulo 	 * and handle Probe Request frames. Setting this parameter to 0
1169325151a3SRui Paulo 	 * disables this option. Default value: 0.
1170325151a3SRui Paulo 	 *
1171325151a3SRui Paulo 	 * Note: Setting this property at run time takes effect on the following
1172325151a3SRui Paulo 	 * interface state transition to/from the WPA_COMPLETED state.
1173325151a3SRui Paulo 	 */
1174325151a3SRui Paulo 	int p2p_cli_probe;
1175325151a3SRui Paulo 
1176325151a3SRui Paulo 	/**
1177f05cddf9SRui Paulo 	 * okc - Whether to enable opportunistic key caching by default
1178f05cddf9SRui Paulo 	 *
1179f05cddf9SRui Paulo 	 * By default, OKC is disabled unless enabled by the per-network
1180f05cddf9SRui Paulo 	 * proactive_key_caching=1 parameter. okc=1 can be used to change this
1181f05cddf9SRui Paulo 	 * default behavior.
1182f05cddf9SRui Paulo 	 */
1183f05cddf9SRui Paulo 	int okc;
1184f05cddf9SRui Paulo 
1185f05cddf9SRui Paulo 	/**
1186f05cddf9SRui Paulo 	 * pmf - Whether to enable/require PMF by default
1187f05cddf9SRui Paulo 	 *
1188f05cddf9SRui Paulo 	 * By default, PMF is disabled unless enabled by the per-network
1189f05cddf9SRui Paulo 	 * ieee80211w=1 or ieee80211w=2 parameter. pmf=1/2 can be used to change
1190780fb4a2SCy Schubert 	 * this default behavior for RSN network (this is not applicable for
1191780fb4a2SCy Schubert 	 * non-RSN cases).
1192f05cddf9SRui Paulo 	 */
1193f05cddf9SRui Paulo 	enum mfp_options pmf;
11945b9c547cSRui Paulo 
11955b9c547cSRui Paulo 	/**
11965b9c547cSRui Paulo 	 * sae_groups - Preference list of enabled groups for SAE
11975b9c547cSRui Paulo 	 *
11985b9c547cSRui Paulo 	 * By default (if this parameter is not set), the mandatory group 19
11995b9c547cSRui Paulo 	 * (ECC group defined over a 256-bit prime order field) is preferred,
12005b9c547cSRui Paulo 	 * but other groups are also enabled. If this parameter is set, the
12015b9c547cSRui Paulo 	 * groups will be tried in the indicated order.
12025b9c547cSRui Paulo 	 */
12035b9c547cSRui Paulo 	int *sae_groups;
12045b9c547cSRui Paulo 
12055b9c547cSRui Paulo 	/**
1206c1d255d3SCy Schubert 	 * sae_pwe - SAE mechanism for PWE derivation
1207c1d255d3SCy Schubert 	 * 0 = hunting-and-pecking loop only
1208c1d255d3SCy Schubert 	 * 1 = hash-to-element only
1209c1d255d3SCy Schubert 	 * 2 = both hunting-and-pecking loop and hash-to-element enabled
1210c1d255d3SCy Schubert 	 */
1211c1d255d3SCy Schubert 	int sae_pwe;
1212c1d255d3SCy Schubert 
1213c1d255d3SCy Schubert 	/**
1214c1d255d3SCy Schubert 	 * sae_pmkid_in_assoc - Whether to include PMKID in SAE Assoc Req
1215c1d255d3SCy Schubert 	 */
1216c1d255d3SCy Schubert 	int sae_pmkid_in_assoc;
1217c1d255d3SCy Schubert 
1218c1d255d3SCy Schubert 	/**
12195b9c547cSRui Paulo 	 * dtim_period - Default DTIM period in Beacon intervals
12205b9c547cSRui Paulo 	 *
12215b9c547cSRui Paulo 	 * This parameter can be used to set the default value for network
12225b9c547cSRui Paulo 	 * blocks that do not specify dtim_period.
12235b9c547cSRui Paulo 	 */
12245b9c547cSRui Paulo 	int dtim_period;
12255b9c547cSRui Paulo 
12265b9c547cSRui Paulo 	/**
12275b9c547cSRui Paulo 	 * beacon_int - Default Beacon interval in TU
12285b9c547cSRui Paulo 	 *
12295b9c547cSRui Paulo 	 * This parameter can be used to set the default value for network
12305b9c547cSRui Paulo 	 * blocks that do not specify beacon_int.
12315b9c547cSRui Paulo 	 */
12325b9c547cSRui Paulo 	int beacon_int;
12335b9c547cSRui Paulo 
12345b9c547cSRui Paulo 	/**
12355b9c547cSRui Paulo 	 * ap_vendor_elements: Vendor specific elements for Beacon/ProbeResp
12365b9c547cSRui Paulo 	 *
12375b9c547cSRui Paulo 	 * This parameter can be used to define additional vendor specific
12385b9c547cSRui Paulo 	 * elements for Beacon and Probe Response frames in AP/P2P GO mode. The
12395b9c547cSRui Paulo 	 * format for these element(s) is a hexdump of the raw information
12405b9c547cSRui Paulo 	 * elements (id+len+payload for one or more elements).
12415b9c547cSRui Paulo 	 */
12425b9c547cSRui Paulo 	struct wpabuf *ap_vendor_elements;
12435b9c547cSRui Paulo 
12445b9c547cSRui Paulo 	/**
1245*4b72b91aSCy Schubert 	 * ap_assocresp_elements: Vendor specific elements for (Re)Association
1246*4b72b91aSCy Schubert 	 * Response frames
1247*4b72b91aSCy Schubert 	 *
1248*4b72b91aSCy Schubert 	 * This parameter can be used to define additional vendor specific
1249*4b72b91aSCy Schubert 	 * elements for (Re)Association Response frames in AP/P2P GO mode. The
1250*4b72b91aSCy Schubert 	 * format for these element(s) is a hexdump of the raw information
1251*4b72b91aSCy Schubert 	 * elements (id+len+payload for one or more elements).
1252*4b72b91aSCy Schubert 	 */
1253*4b72b91aSCy Schubert 	struct wpabuf *ap_assocresp_elements;
1254*4b72b91aSCy Schubert 
1255*4b72b91aSCy Schubert 	/**
12565b9c547cSRui Paulo 	 * ignore_old_scan_res - Ignore scan results older than request
12575b9c547cSRui Paulo 	 *
12585b9c547cSRui Paulo 	 * The driver may have a cache of scan results that makes it return
12595b9c547cSRui Paulo 	 * information that is older than our scan trigger. This parameter can
12605b9c547cSRui Paulo 	 * be used to configure such old information to be ignored instead of
12615b9c547cSRui Paulo 	 * allowing it to update the internal BSS table.
12625b9c547cSRui Paulo 	 */
12635b9c547cSRui Paulo 	int ignore_old_scan_res;
12645b9c547cSRui Paulo 
12655b9c547cSRui Paulo 	/**
12665b9c547cSRui Paulo 	 * sched_scan_interval -  schedule scan interval
12675b9c547cSRui Paulo 	 */
12685b9c547cSRui Paulo 	unsigned int sched_scan_interval;
12695b9c547cSRui Paulo 
12705b9c547cSRui Paulo 	/**
127185732ac8SCy Schubert 	 * sched_scan_start_delay - Schedule scan start delay before first scan
127285732ac8SCy Schubert 	 *
127385732ac8SCy Schubert 	 * Delay (in seconds) before scheduling first scan plan cycle. The
127485732ac8SCy Schubert 	 * driver may ignore this parameter and start immediately (or at any
127585732ac8SCy Schubert 	 * other time), if this feature is not supported.
127685732ac8SCy Schubert 	 */
127785732ac8SCy Schubert 	unsigned int sched_scan_start_delay;
127885732ac8SCy Schubert 
127985732ac8SCy Schubert 	/**
12805b9c547cSRui Paulo 	 * tdls_external_control - External control for TDLS setup requests
12815b9c547cSRui Paulo 	 *
12825b9c547cSRui Paulo 	 * Enable TDLS mode where external programs are given the control
12835b9c547cSRui Paulo 	 * to specify the TDLS link to get established to the driver. The
12845b9c547cSRui Paulo 	 * driver requests the TDLS setup to the supplicant only for the
12855b9c547cSRui Paulo 	 * specified TDLS peers.
12865b9c547cSRui Paulo 	 */
12875b9c547cSRui Paulo 	int tdls_external_control;
12885b9c547cSRui Paulo 
12895b9c547cSRui Paulo 	u8 ip_addr_go[4];
12905b9c547cSRui Paulo 	u8 ip_addr_mask[4];
12915b9c547cSRui Paulo 	u8 ip_addr_start[4];
12925b9c547cSRui Paulo 	u8 ip_addr_end[4];
12935b9c547cSRui Paulo 
12945b9c547cSRui Paulo 	/**
12955b9c547cSRui Paulo 	 * osu_dir - OSU provider information directory
12965b9c547cSRui Paulo 	 *
12975b9c547cSRui Paulo 	 * If set, allow FETCH_OSU control interface command to be used to fetch
12985b9c547cSRui Paulo 	 * OSU provider information into all APs and store the results in this
12995b9c547cSRui Paulo 	 * directory.
13005b9c547cSRui Paulo 	 */
13015b9c547cSRui Paulo 	char *osu_dir;
13025b9c547cSRui Paulo 
13035b9c547cSRui Paulo 	/**
13045b9c547cSRui Paulo 	 * wowlan_triggers - Wake-on-WLAN triggers
13055b9c547cSRui Paulo 	 *
13065b9c547cSRui Paulo 	 * If set, these wowlan triggers will be configured.
13075b9c547cSRui Paulo 	 */
13085b9c547cSRui Paulo 	char *wowlan_triggers;
13095b9c547cSRui Paulo 
13105b9c547cSRui Paulo 	/**
13115b9c547cSRui Paulo 	 * p2p_search_delay - Extra delay between concurrent search iterations
13125b9c547cSRui Paulo 	 *
13135b9c547cSRui Paulo 	 * Add extra delay (in milliseconds) between search iterations when
13145b9c547cSRui Paulo 	 * there is a concurrent operation to make p2p_find friendlier to
13155b9c547cSRui Paulo 	 * concurrent operations by avoiding it from taking 100% of radio
13165b9c547cSRui Paulo 	 * resources.
13175b9c547cSRui Paulo 	 */
13185b9c547cSRui Paulo 	unsigned int p2p_search_delay;
13195b9c547cSRui Paulo 
13205b9c547cSRui Paulo 	/**
13215b9c547cSRui Paulo 	 * mac_addr - MAC address policy default
13225b9c547cSRui Paulo 	 *
13235b9c547cSRui Paulo 	 * 0 = use permanent MAC address
13245b9c547cSRui Paulo 	 * 1 = use random MAC address for each ESS connection
13255b9c547cSRui Paulo 	 * 2 = like 1, but maintain OUI (with local admin bit set)
13265b9c547cSRui Paulo 	 *
13275b9c547cSRui Paulo 	 * By default, permanent MAC address is used unless policy is changed by
13285b9c547cSRui Paulo 	 * the per-network mac_addr parameter. Global mac_addr=1 can be used to
13295b9c547cSRui Paulo 	 * change this default behavior.
13305b9c547cSRui Paulo 	 */
13315b9c547cSRui Paulo 	int mac_addr;
13325b9c547cSRui Paulo 
13335b9c547cSRui Paulo 	/**
13345b9c547cSRui Paulo 	 * rand_addr_lifetime - Lifetime of random MAC address in seconds
13355b9c547cSRui Paulo 	 */
13365b9c547cSRui Paulo 	unsigned int rand_addr_lifetime;
13375b9c547cSRui Paulo 
13385b9c547cSRui Paulo 	/**
13395b9c547cSRui Paulo 	 * preassoc_mac_addr - Pre-association MAC address policy
13405b9c547cSRui Paulo 	 *
13415b9c547cSRui Paulo 	 * 0 = use permanent MAC address
13425b9c547cSRui Paulo 	 * 1 = use random MAC address
13435b9c547cSRui Paulo 	 * 2 = like 1, but maintain OUI (with local admin bit set)
13445b9c547cSRui Paulo 	 */
13455b9c547cSRui Paulo 	int preassoc_mac_addr;
13465b9c547cSRui Paulo 
13475b9c547cSRui Paulo 	/**
13485b9c547cSRui Paulo 	 * key_mgmt_offload - Use key management offload
13495b9c547cSRui Paulo 	 *
13505b9c547cSRui Paulo 	 * Key management offload should be used if the device supports it.
13515b9c547cSRui Paulo 	 * Key management offload is the capability of a device operating as
13525b9c547cSRui Paulo 	 * a station to do the exchange necessary to establish temporal keys
13535b9c547cSRui Paulo 	 * during initial RSN connection, after roaming, or during a PTK
13545b9c547cSRui Paulo 	 * rekeying operation.
13555b9c547cSRui Paulo 	 */
13565b9c547cSRui Paulo 	int key_mgmt_offload;
13575b9c547cSRui Paulo 
13585b9c547cSRui Paulo 	/**
13595b9c547cSRui Paulo 	 * user_mpm - MPM residency
13605b9c547cSRui Paulo 	 *
13615b9c547cSRui Paulo 	 * 0: MPM lives in driver.
13625b9c547cSRui Paulo 	 * 1: wpa_supplicant handles peering and station allocation.
13635b9c547cSRui Paulo 	 *
13645b9c547cSRui Paulo 	 * If AMPE or SAE is enabled, the MPM is always in userspace.
13655b9c547cSRui Paulo 	 */
13665b9c547cSRui Paulo 	int user_mpm;
13675b9c547cSRui Paulo 
13685b9c547cSRui Paulo 	/**
13695b9c547cSRui Paulo 	 * max_peer_links - Maximum number of peer links
13705b9c547cSRui Paulo 	 *
13715b9c547cSRui Paulo 	 * Maximum number of mesh peering currently maintained by the STA.
13725b9c547cSRui Paulo 	 */
13735b9c547cSRui Paulo 	int max_peer_links;
13745b9c547cSRui Paulo 
13755b9c547cSRui Paulo 	/**
13765b9c547cSRui Paulo 	 * cert_in_cb - Whether to include a peer certificate dump in events
13775b9c547cSRui Paulo 	 *
13785b9c547cSRui Paulo 	 * This controls whether peer certificates for authentication server and
13795b9c547cSRui Paulo 	 * its certificate chain are included in EAP peer certificate events.
13805b9c547cSRui Paulo 	 */
13815b9c547cSRui Paulo 	int cert_in_cb;
13825b9c547cSRui Paulo 
13835b9c547cSRui Paulo 	/**
13845b9c547cSRui Paulo 	 * mesh_max_inactivity - Timeout in seconds to detect STA inactivity
13855b9c547cSRui Paulo 	 *
13865b9c547cSRui Paulo 	 * This timeout value is used in mesh STA to clean up inactive stations.
13875b9c547cSRui Paulo 	 * By default: 300 seconds.
13885b9c547cSRui Paulo 	 */
13895b9c547cSRui Paulo 	int mesh_max_inactivity;
13905b9c547cSRui Paulo 
13915b9c547cSRui Paulo 	/**
1392325151a3SRui Paulo 	 * dot11RSNASAERetransPeriod - Timeout to retransmit SAE Auth frame
1393325151a3SRui Paulo 	 *
1394325151a3SRui Paulo 	 * This timeout value is used in mesh STA to retransmit
1395325151a3SRui Paulo 	 * SAE Authentication frame.
1396325151a3SRui Paulo 	 * By default: 1000 milliseconds.
1397325151a3SRui Paulo 	 */
1398325151a3SRui Paulo 	int dot11RSNASAERetransPeriod;
1399325151a3SRui Paulo 
1400325151a3SRui Paulo 	/**
14015b9c547cSRui Paulo 	 * passive_scan - Whether to force passive scan for network connection
14025b9c547cSRui Paulo 	 *
14035b9c547cSRui Paulo 	 * This parameter can be used to force only passive scanning to be used
14045b9c547cSRui Paulo 	 * for network connection cases. It should be noted that this will slow
14055b9c547cSRui Paulo 	 * down scan operations and reduce likelihood of finding the AP. In
14065b9c547cSRui Paulo 	 * addition, some use cases will override this due to functional
14075b9c547cSRui Paulo 	 * requirements, e.g., for finding an AP that uses hidden SSID
14085b9c547cSRui Paulo 	 * (scan_ssid=1) or P2P device discovery.
14095b9c547cSRui Paulo 	 */
14105b9c547cSRui Paulo 	int passive_scan;
14115b9c547cSRui Paulo 
14125b9c547cSRui Paulo 	/**
14135b9c547cSRui Paulo 	 * reassoc_same_bss_optim - Whether to optimize reassoc-to-same-BSS
14145b9c547cSRui Paulo 	 */
14155b9c547cSRui Paulo 	int reassoc_same_bss_optim;
1416325151a3SRui Paulo 
1417325151a3SRui Paulo 	/**
1418325151a3SRui Paulo 	 * wps_priority - Priority for the networks added through WPS
1419325151a3SRui Paulo 	 *
1420325151a3SRui Paulo 	 * This priority value will be set to each network profile that is added
1421325151a3SRui Paulo 	 * by executing the WPS protocol.
1422325151a3SRui Paulo 	 */
1423325151a3SRui Paulo 	int wps_priority;
1424325151a3SRui Paulo 
1425325151a3SRui Paulo 	/**
1426325151a3SRui Paulo 	 * fst_group_id - FST group ID
1427325151a3SRui Paulo 	 */
1428325151a3SRui Paulo 	char *fst_group_id;
1429325151a3SRui Paulo 
1430325151a3SRui Paulo 	/**
1431325151a3SRui Paulo 	 * fst_priority - priority of the interface within the FST group
1432325151a3SRui Paulo 	 */
1433325151a3SRui Paulo 	int fst_priority;
1434325151a3SRui Paulo 
1435325151a3SRui Paulo 	/**
1436325151a3SRui Paulo 	 * fst_llt - default FST LLT (Link-Lost Timeout) to be used for the
1437325151a3SRui Paulo 	 * interface.
1438325151a3SRui Paulo 	 */
1439325151a3SRui Paulo 	int fst_llt;
1440780fb4a2SCy Schubert 
1441780fb4a2SCy Schubert 	 /**
1442780fb4a2SCy Schubert 	  * wpa_rsc_relaxation - RSC relaxation on GTK installation
1443780fb4a2SCy Schubert 	  *
1444780fb4a2SCy Schubert 	  * Values:
1445780fb4a2SCy Schubert 	  * 0 - use the EAPOL-Key RSC value on GTK installation
1446780fb4a2SCy Schubert 	  * 1 - use the null RSC if a bogus RSC value is detected in message 3
1447780fb4a2SCy Schubert 	  * of 4-Way Handshake or message 1 of Group Key Handshake.
1448780fb4a2SCy Schubert 	  */
1449780fb4a2SCy Schubert 	 int wpa_rsc_relaxation;
1450780fb4a2SCy Schubert 
1451780fb4a2SCy Schubert 	/**
1452780fb4a2SCy Schubert 	 * sched_scan_plans - Scan plans for scheduled scan
1453780fb4a2SCy Schubert 	 *
1454780fb4a2SCy Schubert 	 * Each scan plan specifies the interval between scans and the number of
1455780fb4a2SCy Schubert 	 * iterations. The last scan plan only specifies the scan interval and
1456780fb4a2SCy Schubert 	 * will be run infinitely.
1457780fb4a2SCy Schubert 	 *
1458780fb4a2SCy Schubert 	 * format: <interval:iterations> <interval2:iterations2> ... <interval>
1459780fb4a2SCy Schubert 	 */
1460780fb4a2SCy Schubert 	 char *sched_scan_plans;
1461780fb4a2SCy Schubert 
1462780fb4a2SCy Schubert #ifdef CONFIG_MBO
1463780fb4a2SCy Schubert 	/**
1464780fb4a2SCy Schubert 	 * non_pref_chan - Non-preferred channels list, separated by spaces.
1465780fb4a2SCy Schubert 	 *
1466780fb4a2SCy Schubert 	 * format: op_class:chan:preference:reason<:detail>
1467780fb4a2SCy Schubert 	 * Detail is optional.
1468780fb4a2SCy Schubert 	 */
1469780fb4a2SCy Schubert 	char *non_pref_chan;
1470780fb4a2SCy Schubert 
1471780fb4a2SCy Schubert 	/**
1472780fb4a2SCy Schubert 	 * mbo_cell_capa - Cellular capabilities for MBO
1473780fb4a2SCy Schubert 	 */
1474780fb4a2SCy Schubert 	enum mbo_cellular_capa mbo_cell_capa;
147585732ac8SCy Schubert 
147685732ac8SCy Schubert 	/**
147785732ac8SCy Schubert 	 * disassoc_imminent_rssi_threshold - RSSI threshold of candidate AP
147885732ac8SCy Schubert 	 * when disassociation imminent is set.
147985732ac8SCy Schubert 	 */
148085732ac8SCy Schubert 	int disassoc_imminent_rssi_threshold;
148185732ac8SCy Schubert 
148285732ac8SCy Schubert 	/**
148385732ac8SCy Schubert 	 * oce - Enable OCE in STA and/or STA-CFON mode
148485732ac8SCy Schubert 	 *  - Set BIT(0) to enable OCE in non-AP STA mode
148585732ac8SCy Schubert 	 *  - Set BIT(1) to enable OCE in STA-CFON mode
148685732ac8SCy Schubert 	 */
148785732ac8SCy Schubert 	unsigned int oce;
1488780fb4a2SCy Schubert #endif /* CONFIG_MBO */
1489780fb4a2SCy Schubert 
1490780fb4a2SCy Schubert 	/**
1491780fb4a2SCy Schubert 	 * gas_address3 - GAS Address3 field behavior
1492780fb4a2SCy Schubert 	 *
1493780fb4a2SCy Schubert 	 * Values:
1494780fb4a2SCy Schubert 	 * 0 - P2P specification (Address3 = AP BSSID)
1495780fb4a2SCy Schubert 	 * 1 = IEEE 802.11 standard compliant (Address3 = Wildcard BSSID when
1496780fb4a2SCy Schubert 	 *	sent to not-associated AP; if associated, AP BSSID)
1497780fb4a2SCy Schubert 	 */
1498780fb4a2SCy Schubert 	int gas_address3;
1499780fb4a2SCy Schubert 
1500780fb4a2SCy Schubert 	/**
1501780fb4a2SCy Schubert 	 * ftm_responder - Publish FTM (fine timing measurement)
1502780fb4a2SCy Schubert 	 * responder functionality
1503780fb4a2SCy Schubert 	 *
1504780fb4a2SCy Schubert 	 * Values:
1505780fb4a2SCy Schubert 	 * 0 - do not publish FTM responder functionality (Default)
1506780fb4a2SCy Schubert 	 * 1 - publish FTM responder functionality in
1507780fb4a2SCy Schubert 	 *	bit 70 of Extended Capabilities element
1508780fb4a2SCy Schubert 	 * Note, actual FTM responder operation is managed outside
1509780fb4a2SCy Schubert 	 * wpa_supplicant.
1510780fb4a2SCy Schubert 	 */
1511780fb4a2SCy Schubert 	int ftm_responder;
1512780fb4a2SCy Schubert 
1513780fb4a2SCy Schubert 	/**
1514780fb4a2SCy Schubert 	 * ftm_initiator - Publish FTM (fine timing measurement)
1515780fb4a2SCy Schubert 	 * initiator functionality
1516780fb4a2SCy Schubert 	 *
1517780fb4a2SCy Schubert 	 * Values:
1518780fb4a2SCy Schubert 	 * 0 - do not publish FTM initiator functionality (Default)
1519780fb4a2SCy Schubert 	 * 1 - publish FTM initiator functionality in
1520780fb4a2SCy Schubert 	 *	bit 71 of Extended Capabilities element
1521780fb4a2SCy Schubert 	 * Note, actual FTM initiator operation is managed outside
1522780fb4a2SCy Schubert 	 * wpa_supplicant.
1523780fb4a2SCy Schubert 	 */
1524780fb4a2SCy Schubert 	int ftm_initiator;
152585732ac8SCy Schubert 
152685732ac8SCy Schubert 	/**
152785732ac8SCy Schubert 	 * gas_rand_addr_lifetime - Lifetime of random MAC address for ANQP in
152885732ac8SCy Schubert 	 *	seconds
152985732ac8SCy Schubert 	 */
153085732ac8SCy Schubert 	unsigned int gas_rand_addr_lifetime;
153185732ac8SCy Schubert 
153285732ac8SCy Schubert 	/**
153385732ac8SCy Schubert 	 * gas_rand_mac_addr - GAS MAC address policy
153485732ac8SCy Schubert 	 *
153585732ac8SCy Schubert 	 * 0 = use permanent MAC address
153685732ac8SCy Schubert 	 * 1 = use random MAC address
153785732ac8SCy Schubert 	 * 2 = like 1, but maintain OUI (with local admin bit set)
153885732ac8SCy Schubert 	 */
153985732ac8SCy Schubert 	int gas_rand_mac_addr;
154085732ac8SCy Schubert 
154185732ac8SCy Schubert 	/**
154285732ac8SCy Schubert 	 * dpp_config_processing - How to process DPP configuration
154385732ac8SCy Schubert 	 *
154485732ac8SCy Schubert 	 * 0 = report received configuration to an external program for
154585732ac8SCy Schubert 	 *	processing; do not generate any network profile internally
154685732ac8SCy Schubert 	 * 1 = report received configuration to an external program and generate
154785732ac8SCy Schubert 	 *	a network profile internally, but do not automatically connect
154885732ac8SCy Schubert 	 *	to the created (disabled) profile; the network profile id is
154985732ac8SCy Schubert 	 *	reported to external programs
155085732ac8SCy Schubert 	 * 2 = report received configuration to an external program, generate
155185732ac8SCy Schubert 	 *	a network profile internally, try to connect to the created
155285732ac8SCy Schubert 	 *	profile automatically
155385732ac8SCy Schubert 	 */
155485732ac8SCy Schubert 	int dpp_config_processing;
155585732ac8SCy Schubert 
155685732ac8SCy Schubert 	/**
1557c1d255d3SCy Schubert 	 * dpp_name - Name for Enrollee's DPP Configuration Request
1558c1d255d3SCy Schubert 	 */
1559c1d255d3SCy Schubert 	char *dpp_name;
1560c1d255d3SCy Schubert 
1561c1d255d3SCy Schubert 	/**
1562c1d255d3SCy Schubert 	 * dpp_mud_url - MUD URL for Enrollee's DPP Configuration Request
1563c1d255d3SCy Schubert 	 */
1564c1d255d3SCy Schubert 	char *dpp_mud_url;
1565c1d255d3SCy Schubert 
1566c1d255d3SCy Schubert 	/**
156785732ac8SCy Schubert 	 * coloc_intf_reporting - Colocated interference reporting
156885732ac8SCy Schubert 	 *
156985732ac8SCy Schubert 	 * dot11CoLocIntfReportingActivated
157085732ac8SCy Schubert 	 * 0 = disabled (false)
157185732ac8SCy Schubert 	 * 1 = enabled (true)
157285732ac8SCy Schubert 	 */
157385732ac8SCy Schubert 	int coloc_intf_reporting;
15744bc52338SCy Schubert 
15754bc52338SCy Schubert 	/**
15764bc52338SCy Schubert 	 * p2p_device_random_mac_addr - P2P Device MAC address policy default
15774bc52338SCy Schubert 	 *
1578c1d255d3SCy Schubert 	 * 0 = use permanent MAC address (the one set by default by the device
1579c1d255d3SCy Schubert 	 *     driver). Notice that, if the device driver is configured to
1580c1d255d3SCy Schubert 	 *     always use random MAC addresses, this flag breaks reinvoking a
1581c1d255d3SCy Schubert 	 *     persistent group, so flags 1 or 2 should be used instead with
1582c1d255d3SCy Schubert 	 *     such drivers if persistent groups are used.
15834bc52338SCy Schubert 	 * 1 = use random MAC address on creating the interface if there is no
1584c1d255d3SCy Schubert 	 *     persistent group. Besides, if a persistent group is created,
1585c1d255d3SCy Schubert 	 *     p2p_device_persistent_mac_addr is set to the MAC address of the
1586c1d255d3SCy Schubert 	 *     P2P Device interface, so that this address will be subsequently
1587c1d255d3SCy Schubert 	 *     used to change the MAC address of the P2P Device interface. With
1588c1d255d3SCy Schubert 	 *     no persistent group, the random MAC address is created by
1589c1d255d3SCy Schubert 	 *     wpa_supplicant, changing the one set by the device driver.
1590c1d255d3SCy Schubert 	 *     The device driver shall support SIOCGIFFLAGS/SIOCSIFFLAGS ioctl
1591c1d255d3SCy Schubert 	 *     interface control operations.
1592c1d255d3SCy Schubert 	 * 2 = this flag should be used when the device driver uses random MAC
1593c1d255d3SCy Schubert 	 *     addresses by default when a P2P Device interface is created.
1594c1d255d3SCy Schubert 	 *     If p2p_device_persistent_mac_addr is set, use this MAC address
1595c1d255d3SCy Schubert 	 *     on creating the P2P Device interface. If not set, use the
1596c1d255d3SCy Schubert 	 *     default method adopted by the device driver (e.g., random MAC
1597c1d255d3SCy Schubert 	 *     address). Besides, if a persistent group is created,
1598c1d255d3SCy Schubert 	 *     p2p_device_persistent_mac_addr is set to the MAC address of the
1599c1d255d3SCy Schubert 	 *     P2P Device interface, so that this address will be subsequently
1600c1d255d3SCy Schubert 	 *     used in place of the default address set by the device driver.
1601c1d255d3SCy Schubert 	 *     (This option does not need support of SIOCGIFFLAGS/SIOCSIFFLAGS
1602c1d255d3SCy Schubert 	 *     ioctl interface control operations and uses NL80211_ATTR_MAC).
16034bc52338SCy Schubert 	 *
16044bc52338SCy Schubert 	 * By default, permanent MAC address is used.
16054bc52338SCy Schubert 	 */
16064bc52338SCy Schubert 	int p2p_device_random_mac_addr;
16074bc52338SCy Schubert 
16084bc52338SCy Schubert 	/**
16094bc52338SCy Schubert 	 * p2p_device_persistent_mac_addr - Record last used MAC address
16104bc52338SCy Schubert 	 *
16114bc52338SCy Schubert 	 * If there are saved persistent groups, P2P cannot generate another
16124bc52338SCy Schubert 	 * random MAC address, and need to restore to last used MAC address.
16134bc52338SCy Schubert 	 */
16144bc52338SCy Schubert 	u8 p2p_device_persistent_mac_addr[ETH_ALEN];
16154bc52338SCy Schubert 
16164bc52338SCy Schubert 	/**
16174bc52338SCy Schubert 	 * p2p_interface_random_mac_addr - P2P Interface MAC address policy default
16184bc52338SCy Schubert 	 *
16194bc52338SCy Schubert 	 * 0 = use permanent MAC address
16204bc52338SCy Schubert 	 * 1 = use random MAC address on creating the interface.
16214bc52338SCy Schubert 	 *
16224bc52338SCy Schubert 	 * By default, permanent MAC address is used.
16234bc52338SCy Schubert 	 */
16244bc52338SCy Schubert 	int p2p_interface_random_mac_addr;
1625206b73d0SCy Schubert 
1626206b73d0SCy Schubert 	/**
1627206b73d0SCy Schubert 	 * disable_btm - Disable BSS transition management in STA
1628206b73d0SCy Schubert 	 * - Set to 0 to enable BSS transition management
1629206b73d0SCy Schubert 	 * - Set to 1 to disable BSS transition management
1630206b73d0SCy Schubert 	 *
1631206b73d0SCy Schubert 	 * By default BSS transition management is enabled
1632206b73d0SCy Schubert 	 */
1633206b73d0SCy Schubert 	int disable_btm;
1634c1d255d3SCy Schubert 
1635c1d255d3SCy Schubert 	/**
1636c1d255d3SCy Schubert 	 * extended_key_id - Extended Key ID support
1637c1d255d3SCy Schubert 	 *
1638c1d255d3SCy Schubert 	 * IEEE Std 802.11-2016 optionally allows to use Key ID 0 and 1 for PTK
1639c1d255d3SCy Schubert 	 * keys with Extended Key ID.
1640c1d255d3SCy Schubert 	 *
1641c1d255d3SCy Schubert 	 * 0 = don't use Extended Key ID
1642c1d255d3SCy Schubert 	 * 1 = use Extended Key ID when possible
1643c1d255d3SCy Schubert 	 */
1644c1d255d3SCy Schubert 	int extended_key_id;
1645c1d255d3SCy Schubert 
1646c1d255d3SCy Schubert 	/**
1647c1d255d3SCy Schubert 	 * wowlan_disconnect_on_deinit - Trigger disconnect on wpa_supplicant
1648c1d255d3SCy Schubert 	 * interface deinit even if the driver has enabled WoWLAN.
1649c1d255d3SCy Schubert 	 *
1650c1d255d3SCy Schubert 	 * 0 = Do not disconnect
1651c1d255d3SCy Schubert 	 * 1 = Trigger disconnection
1652c1d255d3SCy Schubert 	 */
1653c1d255d3SCy Schubert 	int wowlan_disconnect_on_deinit;
1654c1d255d3SCy Schubert 
1655c1d255d3SCy Schubert #ifdef CONFIG_PASN
1656c1d255d3SCy Schubert #ifdef CONFIG_TESTING_OPTIONS
1657c1d255d3SCy Schubert 	/*
1658c1d255d3SCy Schubert 	 * Normally, KDK should be derived if and only if both sides support
1659c1d255d3SCy Schubert 	 * secure LTF. Allow forcing KDK derivation for testing purposes.
1660c1d255d3SCy Schubert 	 */
1661c1d255d3SCy Schubert 	int force_kdk_derivation;
1662c1d255d3SCy Schubert 
1663c1d255d3SCy Schubert 	/* If set, corrupt the MIC in the 3rd Authentication frame of PASN */
1664c1d255d3SCy Schubert 	int pasn_corrupt_mic;
1665c1d255d3SCy Schubert 
1666c1d255d3SCy Schubert #endif /* CONFIG_TESTING_OPTIONS */
1667c1d255d3SCy Schubert #endif /* CONFIG_PASN*/
166839beb93cSSam Leffler };
166939beb93cSSam Leffler 
167039beb93cSSam Leffler 
167139beb93cSSam Leffler /* Prototypes for common functions from config.c */
167239beb93cSSam Leffler 
167339beb93cSSam Leffler void wpa_config_free(struct wpa_config *ssid);
167439beb93cSSam Leffler void wpa_config_free_ssid(struct wpa_ssid *ssid);
1675f05cddf9SRui Paulo void wpa_config_foreach_network(struct wpa_config *config,
1676f05cddf9SRui Paulo 				void (*func)(void *, struct wpa_ssid *),
1677f05cddf9SRui Paulo 				void *arg);
167839beb93cSSam Leffler struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id);
167939beb93cSSam Leffler struct wpa_ssid * wpa_config_add_network(struct wpa_config *config);
168039beb93cSSam Leffler int wpa_config_remove_network(struct wpa_config *config, int id);
168139beb93cSSam Leffler void wpa_config_set_network_defaults(struct wpa_ssid *ssid);
168239beb93cSSam Leffler int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
168339beb93cSSam Leffler 		   int line);
1684f05cddf9SRui Paulo int wpa_config_set_quoted(struct wpa_ssid *ssid, const char *var,
1685f05cddf9SRui Paulo 			  const char *value);
16865b9c547cSRui Paulo int wpa_config_dump_values(struct wpa_config *config, char *buf,
16875b9c547cSRui Paulo 			   size_t buflen);
16885b9c547cSRui Paulo int wpa_config_get_value(const char *name, struct wpa_config *config,
16895b9c547cSRui Paulo 			 char *buf, size_t buflen);
16905b9c547cSRui Paulo 
1691e28a4053SRui Paulo char ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys);
169239beb93cSSam Leffler char * wpa_config_get(struct wpa_ssid *ssid, const char *var);
169339beb93cSSam Leffler char * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var);
169439beb93cSSam Leffler void wpa_config_update_psk(struct wpa_ssid *ssid);
169539beb93cSSam Leffler int wpa_config_add_prio_network(struct wpa_config *config,
169639beb93cSSam Leffler 				struct wpa_ssid *ssid);
1697e28a4053SRui Paulo int wpa_config_update_prio_list(struct wpa_config *config);
169839beb93cSSam Leffler const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
169939beb93cSSam Leffler 						   const char *name);
170039beb93cSSam Leffler void wpa_config_set_blob(struct wpa_config *config,
170139beb93cSSam Leffler 			 struct wpa_config_blob *blob);
170239beb93cSSam Leffler void wpa_config_free_blob(struct wpa_config_blob *blob);
170339beb93cSSam Leffler int wpa_config_remove_blob(struct wpa_config *config, const char *name);
17045b9c547cSRui Paulo void wpa_config_flush_blobs(struct wpa_config *config);
170539beb93cSSam Leffler 
1706f05cddf9SRui Paulo struct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id);
1707f05cddf9SRui Paulo struct wpa_cred * wpa_config_add_cred(struct wpa_config *config);
1708f05cddf9SRui Paulo int wpa_config_remove_cred(struct wpa_config *config, int id);
1709f05cddf9SRui Paulo void wpa_config_free_cred(struct wpa_cred *cred);
1710f05cddf9SRui Paulo int wpa_config_set_cred(struct wpa_cred *cred, const char *var,
1711f05cddf9SRui Paulo 			const char *value, int line);
17125b9c547cSRui Paulo char * wpa_config_get_cred_no_key(struct wpa_cred *cred, const char *var);
1713f05cddf9SRui Paulo 
171439beb93cSSam Leffler struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
171539beb93cSSam Leffler 					   const char *driver_param);
171639beb93cSSam Leffler #ifndef CONFIG_NO_STDOUT_DEBUG
171739beb93cSSam Leffler void wpa_config_debug_dump_networks(struct wpa_config *config);
171839beb93cSSam Leffler #else /* CONFIG_NO_STDOUT_DEBUG */
171939beb93cSSam Leffler #define wpa_config_debug_dump_networks(c) do { } while (0)
172039beb93cSSam Leffler #endif /* CONFIG_NO_STDOUT_DEBUG */
172139beb93cSSam Leffler 
172239beb93cSSam Leffler 
1723f05cddf9SRui Paulo /* Prototypes for common functions from config.c */
1724f05cddf9SRui Paulo int wpa_config_process_global(struct wpa_config *config, char *pos, int line);
1725f05cddf9SRui Paulo 
1726780fb4a2SCy Schubert int wpa_config_get_num_global_field_names(void);
1727780fb4a2SCy Schubert 
1728780fb4a2SCy Schubert const char * wpa_config_get_global_field_name(unsigned int i, int *no_var);
1729f05cddf9SRui Paulo 
173039beb93cSSam Leffler /* Prototypes for backend specific functions from the selected config_*.c */
173139beb93cSSam Leffler 
173239beb93cSSam Leffler /**
173339beb93cSSam Leffler  * wpa_config_read - Read and parse configuration database
173439beb93cSSam Leffler  * @name: Name of the configuration (e.g., path and file name for the
173539beb93cSSam Leffler  * configuration file)
17365b9c547cSRui Paulo  * @cfgp: Pointer to previously allocated configuration data or %NULL if none
173739beb93cSSam Leffler  * Returns: Pointer to allocated configuration data or %NULL on failure
173839beb93cSSam Leffler  *
173939beb93cSSam Leffler  * This function reads configuration data, parses its contents, and allocates
174039beb93cSSam Leffler  * data structures needed for storing configuration information. The allocated
174139beb93cSSam Leffler  * data can be freed with wpa_config_free().
174239beb93cSSam Leffler  *
174339beb93cSSam Leffler  * Each configuration backend needs to implement this function.
174439beb93cSSam Leffler  */
17455b9c547cSRui Paulo struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp);
174639beb93cSSam Leffler 
174739beb93cSSam Leffler /**
174839beb93cSSam Leffler  * wpa_config_write - Write or update configuration data
174939beb93cSSam Leffler  * @name: Name of the configuration (e.g., path and file name for the
175039beb93cSSam Leffler  * configuration file)
175139beb93cSSam Leffler  * @config: Configuration data from wpa_config_read()
175239beb93cSSam Leffler  * Returns: 0 on success, -1 on failure
175339beb93cSSam Leffler  *
175439beb93cSSam Leffler  * This function write all configuration data into an external database (e.g.,
175539beb93cSSam Leffler  * a text file) in a format that can be read with wpa_config_read(). This can
175639beb93cSSam Leffler  * be used to allow wpa_supplicant to update its configuration, e.g., when a
175739beb93cSSam Leffler  * new network is added or a password is changed.
175839beb93cSSam Leffler  *
175939beb93cSSam Leffler  * Each configuration backend needs to implement this function.
176039beb93cSSam Leffler  */
176139beb93cSSam Leffler int wpa_config_write(const char *name, struct wpa_config *config);
176239beb93cSSam Leffler 
176339beb93cSSam Leffler #endif /* CONFIG_H */
1764