xref: /freebsd/contrib/wpa/wpa_supplicant/config.h (revision 85732ac8bccbc0adcf5a261ea1ffec8ca7b3a92d)
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
35*85732ac8SCy 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
45*85732ac8SCy Schubert #define DEFAULT_DISASSOC_IMMINENT_RSSI_THRESHOLD -75
46*85732ac8SCy Schubert #define DEFAULT_OCE_SUPPORT OCE_STA
4739beb93cSSam Leffler 
4839beb93cSSam Leffler #include "config_ssid.h"
49f05cddf9SRui Paulo #include "wps/wps.h"
50325151a3SRui Paulo #include "common/ieee802_11_defs.h"
51f05cddf9SRui Paulo #include "common/ieee802_11_common.h"
5239beb93cSSam Leffler 
5339beb93cSSam Leffler 
54*85732ac8SCy Schubert #define MAX_ROAMING_CONS 36
55*85732ac8SCy Schubert #define MAX_ROAMING_CONS_OI_LEN 15
56*85732ac8SCy Schubert 
57f05cddf9SRui Paulo struct wpa_cred {
58f05cddf9SRui Paulo 	/**
59f05cddf9SRui Paulo 	 * next - Next credential in the list
60f05cddf9SRui Paulo 	 *
61f05cddf9SRui Paulo 	 * This pointer can be used to iterate over all credentials. The head
62f05cddf9SRui Paulo 	 * of this list is stored in the cred field of struct wpa_config.
63f05cddf9SRui Paulo 	 */
64f05cddf9SRui Paulo 	struct wpa_cred *next;
65f05cddf9SRui Paulo 
66f05cddf9SRui Paulo 	/**
67f05cddf9SRui Paulo 	 * id - Unique id for the credential
68f05cddf9SRui Paulo 	 *
69f05cddf9SRui Paulo 	 * This identifier is used as a unique identifier for each credential
70f05cddf9SRui Paulo 	 * block when using the control interface. Each credential is allocated
71f05cddf9SRui Paulo 	 * an id when it is being created, either when reading the
72f05cddf9SRui Paulo 	 * configuration file or when a new credential is added through the
73f05cddf9SRui Paulo 	 * control interface.
74f05cddf9SRui Paulo 	 */
75f05cddf9SRui Paulo 	int id;
76f05cddf9SRui Paulo 
77f05cddf9SRui Paulo 	/**
785b9c547cSRui Paulo 	 * temporary - Whether this credential is temporary and not to be saved
795b9c547cSRui Paulo 	 */
805b9c547cSRui Paulo 	int temporary;
815b9c547cSRui Paulo 
825b9c547cSRui Paulo 	/**
83f05cddf9SRui Paulo 	 * priority - Priority group
84f05cddf9SRui Paulo 	 *
85f05cddf9SRui Paulo 	 * By default, all networks and credentials get the same priority group
86f05cddf9SRui Paulo 	 * (0). This field can be used to give higher priority for credentials
87f05cddf9SRui Paulo 	 * (and similarly in struct wpa_ssid for network blocks) to change the
88f05cddf9SRui Paulo 	 * Interworking automatic networking selection behavior. The matching
89f05cddf9SRui Paulo 	 * network (based on either an enabled network block or a credential)
90f05cddf9SRui Paulo 	 * with the highest priority value will be selected.
91f05cddf9SRui Paulo 	 */
92f05cddf9SRui Paulo 	int priority;
93f05cddf9SRui Paulo 
94f05cddf9SRui Paulo 	/**
95f05cddf9SRui Paulo 	 * pcsc - Use PC/SC and SIM/USIM card
96f05cddf9SRui Paulo 	 */
97f05cddf9SRui Paulo 	int pcsc;
98f05cddf9SRui Paulo 
99f05cddf9SRui Paulo 	/**
100f05cddf9SRui Paulo 	 * realm - Home Realm for Interworking
101f05cddf9SRui Paulo 	 */
102f05cddf9SRui Paulo 	char *realm;
103f05cddf9SRui Paulo 
104f05cddf9SRui Paulo 	/**
105f05cddf9SRui Paulo 	 * username - Username for Interworking network selection
106f05cddf9SRui Paulo 	 */
107f05cddf9SRui Paulo 	char *username;
108f05cddf9SRui Paulo 
109f05cddf9SRui Paulo 	/**
110f05cddf9SRui Paulo 	 * password - Password for Interworking network selection
111f05cddf9SRui Paulo 	 */
112f05cddf9SRui Paulo 	char *password;
113f05cddf9SRui Paulo 
114f05cddf9SRui Paulo 	/**
115f05cddf9SRui Paulo 	 * ext_password - Whether password is a name for external storage
116f05cddf9SRui Paulo 	 */
117f05cddf9SRui Paulo 	int ext_password;
118f05cddf9SRui Paulo 
119f05cddf9SRui Paulo 	/**
120f05cddf9SRui Paulo 	 * ca_cert - CA certificate for Interworking network selection
121f05cddf9SRui Paulo 	 */
122f05cddf9SRui Paulo 	char *ca_cert;
123f05cddf9SRui Paulo 
124f05cddf9SRui Paulo 	/**
125f05cddf9SRui Paulo 	 * client_cert - File path to client certificate file (PEM/DER)
126f05cddf9SRui Paulo 	 *
127f05cddf9SRui Paulo 	 * This field is used with Interworking networking selection for a case
128f05cddf9SRui Paulo 	 * where client certificate/private key is used for authentication
129f05cddf9SRui Paulo 	 * (EAP-TLS). Full path to the file should be used since working
130f05cddf9SRui Paulo 	 * directory may change when wpa_supplicant is run in the background.
131f05cddf9SRui Paulo 	 *
132f05cddf9SRui Paulo 	 * Alternatively, a named configuration blob can be used by setting
133f05cddf9SRui Paulo 	 * this to blob://blob_name.
134f05cddf9SRui Paulo 	 */
135f05cddf9SRui Paulo 	char *client_cert;
136f05cddf9SRui Paulo 
137f05cddf9SRui Paulo 	/**
138f05cddf9SRui Paulo 	 * private_key - File path to client private key file (PEM/DER/PFX)
139f05cddf9SRui Paulo 	 *
140f05cddf9SRui Paulo 	 * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be
141f05cddf9SRui Paulo 	 * commented out. Both the private key and certificate will be read
142f05cddf9SRui Paulo 	 * from the PKCS#12 file in this case. Full path to the file should be
143f05cddf9SRui Paulo 	 * used since working directory may change when wpa_supplicant is run
144f05cddf9SRui Paulo 	 * in the background.
145f05cddf9SRui Paulo 	 *
146f05cddf9SRui Paulo 	 * Windows certificate store can be used by leaving client_cert out and
147f05cddf9SRui Paulo 	 * configuring private_key in one of the following formats:
148f05cddf9SRui Paulo 	 *
149f05cddf9SRui Paulo 	 * cert://substring_to_match
150f05cddf9SRui Paulo 	 *
151f05cddf9SRui Paulo 	 * hash://certificate_thumbprint_in_hex
152f05cddf9SRui Paulo 	 *
153f05cddf9SRui Paulo 	 * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4"
154f05cddf9SRui Paulo 	 *
155f05cddf9SRui Paulo 	 * Note that when running wpa_supplicant as an application, the user
156f05cddf9SRui Paulo 	 * certificate store (My user account) is used, whereas computer store
157f05cddf9SRui Paulo 	 * (Computer account) is used when running wpasvc as a service.
158f05cddf9SRui Paulo 	 *
159f05cddf9SRui Paulo 	 * Alternatively, a named configuration blob can be used by setting
160f05cddf9SRui Paulo 	 * this to blob://blob_name.
161f05cddf9SRui Paulo 	 */
162f05cddf9SRui Paulo 	char *private_key;
163f05cddf9SRui Paulo 
164f05cddf9SRui Paulo 	/**
165f05cddf9SRui Paulo 	 * private_key_passwd - Password for private key file
166f05cddf9SRui Paulo 	 */
167f05cddf9SRui Paulo 	char *private_key_passwd;
168f05cddf9SRui Paulo 
169f05cddf9SRui Paulo 	/**
170f05cddf9SRui Paulo 	 * imsi - IMSI in <MCC> | <MNC> | '-' | <MSIN> format
171f05cddf9SRui Paulo 	 */
172f05cddf9SRui Paulo 	char *imsi;
173f05cddf9SRui Paulo 
174f05cddf9SRui Paulo 	/**
175f05cddf9SRui Paulo 	 * milenage - Milenage parameters for SIM/USIM simulator in
176f05cddf9SRui Paulo 	 *	<Ki>:<OPc>:<SQN> format
177f05cddf9SRui Paulo 	 */
178f05cddf9SRui Paulo 	char *milenage;
179f05cddf9SRui Paulo 
180f05cddf9SRui Paulo 	/**
1815b9c547cSRui Paulo 	 * domain_suffix_match - Constraint for server domain name
1825b9c547cSRui Paulo 	 *
1835b9c547cSRui Paulo 	 * If set, this FQDN is used as a suffix match requirement for the AAA
1845b9c547cSRui Paulo 	 * server certificate in SubjectAltName dNSName element(s). If a
1855b9c547cSRui Paulo 	 * matching dNSName is found, this constraint is met. If no dNSName
1865b9c547cSRui Paulo 	 * values are present, this constraint is matched against SubjectName CN
1875b9c547cSRui Paulo 	 * using same suffix match comparison. Suffix match here means that the
1885b9c547cSRui Paulo 	 * host/domain name is compared one label at a time starting from the
1895b9c547cSRui Paulo 	 * top-level domain and all the labels in @domain_suffix_match shall be
1905b9c547cSRui Paulo 	 * included in the certificate. The certificate may include additional
1915b9c547cSRui Paulo 	 * sub-level labels in addition to the required labels.
1925b9c547cSRui Paulo 	 *
1935b9c547cSRui Paulo 	 * For example, domain_suffix_match=example.com would match
1945b9c547cSRui Paulo 	 * test.example.com but would not match test-example.com.
1955b9c547cSRui Paulo 	 */
1965b9c547cSRui Paulo 	char *domain_suffix_match;
1975b9c547cSRui Paulo 
1985b9c547cSRui Paulo 	/**
1995b9c547cSRui Paulo 	 * domain - Home service provider FQDN(s)
200f05cddf9SRui Paulo 	 *
201f05cddf9SRui Paulo 	 * This is used to compare against the Domain Name List to figure out
2025b9c547cSRui Paulo 	 * whether the AP is operated by the Home SP. Multiple domain entries
2035b9c547cSRui Paulo 	 * can be used to configure alternative FQDNs that will be considered
2045b9c547cSRui Paulo 	 * home networks.
205f05cddf9SRui Paulo 	 */
2065b9c547cSRui Paulo 	char **domain;
2075b9c547cSRui Paulo 
2085b9c547cSRui Paulo 	/**
2095b9c547cSRui Paulo 	 * num_domain - Number of FQDNs in the domain array
2105b9c547cSRui Paulo 	 */
2115b9c547cSRui Paulo 	size_t num_domain;
212f05cddf9SRui Paulo 
213f05cddf9SRui Paulo 	/**
214f05cddf9SRui Paulo 	 * roaming_consortium - Roaming Consortium OI
215f05cddf9SRui Paulo 	 *
216f05cddf9SRui Paulo 	 * If roaming_consortium_len is non-zero, this field contains the
217f05cddf9SRui Paulo 	 * Roaming Consortium OI that can be used to determine which access
218f05cddf9SRui Paulo 	 * points support authentication with this credential. This is an
219f05cddf9SRui Paulo 	 * alternative to the use of the realm parameter. When using Roaming
220f05cddf9SRui Paulo 	 * Consortium to match the network, the EAP parameters need to be
221f05cddf9SRui Paulo 	 * pre-configured with the credential since the NAI Realm information
222f05cddf9SRui Paulo 	 * may not be available or fetched.
223f05cddf9SRui Paulo 	 */
224f05cddf9SRui Paulo 	u8 roaming_consortium[15];
225f05cddf9SRui Paulo 
226f05cddf9SRui Paulo 	/**
227f05cddf9SRui Paulo 	 * roaming_consortium_len - Length of roaming_consortium
228f05cddf9SRui Paulo 	 */
229f05cddf9SRui Paulo 	size_t roaming_consortium_len;
230f05cddf9SRui Paulo 
231*85732ac8SCy Schubert 	/**
232*85732ac8SCy Schubert 	 * required_roaming_consortium - Required Roaming Consortium OI
233*85732ac8SCy Schubert 	 *
234*85732ac8SCy Schubert 	 * If required_roaming_consortium_len is non-zero, this field contains
235*85732ac8SCy Schubert 	 * the Roaming Consortium OI that is required to be advertised by the AP
236*85732ac8SCy Schubert 	 * for the credential to be considered matching.
237*85732ac8SCy Schubert 	 */
2385b9c547cSRui Paulo 	u8 required_roaming_consortium[15];
239*85732ac8SCy Schubert 
240*85732ac8SCy Schubert 	/**
241*85732ac8SCy Schubert 	 * required_roaming_consortium_len - Length of required_roaming_consortium
242*85732ac8SCy Schubert 	 */
2435b9c547cSRui Paulo 	size_t required_roaming_consortium_len;
2445b9c547cSRui Paulo 
245f05cddf9SRui Paulo 	/**
246*85732ac8SCy Schubert 	 * roaming_consortiums - Roaming Consortium OI(s) memberships
247*85732ac8SCy Schubert 	 *
248*85732ac8SCy Schubert 	 * This field contains one or more OIs identifying the roaming
249*85732ac8SCy Schubert 	 * consortiums of which the provider is a member. The list is sorted
250*85732ac8SCy Schubert 	 * from the most preferred one to the least preferred one. A match
251*85732ac8SCy Schubert 	 * between the Roaming Consortium OIs advertised by an AP and the OIs
252*85732ac8SCy Schubert 	 * in this list indicates that successful authentication is possible.
253*85732ac8SCy Schubert 	 * (Hotspot 2.0 PerProviderSubscription/<X+>/HomeSP/RoamingConsortiumOI)
254*85732ac8SCy Schubert 	 */
255*85732ac8SCy Schubert 	u8 roaming_consortiums[MAX_ROAMING_CONS][MAX_ROAMING_CONS_OI_LEN];
256*85732ac8SCy Schubert 
257*85732ac8SCy Schubert 	/**
258*85732ac8SCy Schubert 	 * roaming_consortiums_len - Length on roaming_consortiums[i]
259*85732ac8SCy Schubert 	 */
260*85732ac8SCy Schubert 	size_t roaming_consortiums_len[MAX_ROAMING_CONS];
261*85732ac8SCy Schubert 
262*85732ac8SCy Schubert 	/**
263*85732ac8SCy Schubert 	 * num_roaming_consortiums - Number of entries in roaming_consortiums
264*85732ac8SCy Schubert 	 */
265*85732ac8SCy Schubert 	unsigned int num_roaming_consortiums;
266*85732ac8SCy Schubert 
267*85732ac8SCy Schubert 	/**
268f05cddf9SRui Paulo 	 * eap_method - EAP method to use
269f05cddf9SRui Paulo 	 *
270f05cddf9SRui Paulo 	 * Pre-configured EAP method to use with this credential or %NULL to
271f05cddf9SRui Paulo 	 * indicate no EAP method is selected, i.e., the method will be
272f05cddf9SRui Paulo 	 * selected automatically based on ANQP information.
273f05cddf9SRui Paulo 	 */
274f05cddf9SRui Paulo 	struct eap_method_type *eap_method;
275f05cddf9SRui Paulo 
276f05cddf9SRui Paulo 	/**
277f05cddf9SRui Paulo 	 * phase1 - Phase 1 (outer authentication) parameters
278f05cddf9SRui Paulo 	 *
279f05cddf9SRui Paulo 	 * Pre-configured EAP parameters or %NULL.
280f05cddf9SRui Paulo 	 */
281f05cddf9SRui Paulo 	char *phase1;
282f05cddf9SRui Paulo 
283f05cddf9SRui Paulo 	/**
284f05cddf9SRui Paulo 	 * phase2 - Phase 2 (inner authentication) parameters
285f05cddf9SRui Paulo 	 *
286f05cddf9SRui Paulo 	 * Pre-configured EAP parameters or %NULL.
287f05cddf9SRui Paulo 	 */
288f05cddf9SRui Paulo 	char *phase2;
289f05cddf9SRui Paulo 
290f05cddf9SRui Paulo 	struct excluded_ssid {
291325151a3SRui Paulo 		u8 ssid[SSID_MAX_LEN];
292f05cddf9SRui Paulo 		size_t ssid_len;
293f05cddf9SRui Paulo 	} *excluded_ssid;
294f05cddf9SRui Paulo 	size_t num_excluded_ssid;
2955b9c547cSRui Paulo 
2965b9c547cSRui Paulo 	struct roaming_partner {
2975b9c547cSRui Paulo 		char fqdn[128];
2985b9c547cSRui Paulo 		int exact_match;
2995b9c547cSRui Paulo 		u8 priority;
3005b9c547cSRui Paulo 		char country[3];
3015b9c547cSRui Paulo 	} *roaming_partner;
3025b9c547cSRui Paulo 	size_t num_roaming_partner;
3035b9c547cSRui Paulo 
3045b9c547cSRui Paulo 	int update_identifier;
3055b9c547cSRui Paulo 
3065b9c547cSRui Paulo 	/**
3075b9c547cSRui Paulo 	 * provisioning_sp - FQDN of the SP that provisioned the credential
3085b9c547cSRui Paulo 	 */
3095b9c547cSRui Paulo 	char *provisioning_sp;
3105b9c547cSRui Paulo 
3115b9c547cSRui Paulo 	/**
3125b9c547cSRui Paulo 	 * sp_priority - Credential priority within a provisioning SP
3135b9c547cSRui Paulo 	 *
3145b9c547cSRui Paulo 	 * This is the priority of the credential among all credentials
3155b9c547cSRui Paulo 	 * provisionined by the same SP (i.e., for entries that have identical
3165b9c547cSRui Paulo 	 * provisioning_sp value). The range of this priority is 0-255 with 0
3175b9c547cSRui Paulo 	 * being the highest and 255 the lower priority.
3185b9c547cSRui Paulo 	 */
3195b9c547cSRui Paulo 	int sp_priority;
3205b9c547cSRui Paulo 
3215b9c547cSRui Paulo 	unsigned int min_dl_bandwidth_home;
3225b9c547cSRui Paulo 	unsigned int min_ul_bandwidth_home;
3235b9c547cSRui Paulo 	unsigned int min_dl_bandwidth_roaming;
3245b9c547cSRui Paulo 	unsigned int min_ul_bandwidth_roaming;
3255b9c547cSRui Paulo 
3265b9c547cSRui Paulo 	/**
3275b9c547cSRui Paulo 	 * max_bss_load - Maximum BSS Load Channel Utilization (1..255)
3285b9c547cSRui Paulo 	 * This value is used as the maximum channel utilization for network
3295b9c547cSRui Paulo 	 * selection purposes for home networks. If the AP does not advertise
3305b9c547cSRui Paulo 	 * BSS Load or if the limit would prevent any connection, this
3315b9c547cSRui Paulo 	 * constraint will be ignored.
3325b9c547cSRui Paulo 	 */
3335b9c547cSRui Paulo 	unsigned int max_bss_load;
3345b9c547cSRui Paulo 
3355b9c547cSRui Paulo 	unsigned int num_req_conn_capab;
3365b9c547cSRui Paulo 	u8 *req_conn_capab_proto;
3375b9c547cSRui Paulo 	int **req_conn_capab_port;
3385b9c547cSRui Paulo 
3395b9c547cSRui Paulo 	/**
3405b9c547cSRui Paulo 	 * ocsp - Whether to use/require OCSP to check server certificate
3415b9c547cSRui Paulo 	 *
3425b9c547cSRui Paulo 	 * 0 = do not use OCSP stapling (TLS certificate status extension)
3435b9c547cSRui Paulo 	 * 1 = try to use OCSP stapling, but not require response
3445b9c547cSRui Paulo 	 * 2 = require valid OCSP stapling response
3455b9c547cSRui Paulo 	 */
3465b9c547cSRui Paulo 	int ocsp;
3475b9c547cSRui Paulo 
3485b9c547cSRui Paulo 	/**
3495b9c547cSRui Paulo 	 * sim_num - User selected SIM identifier
3505b9c547cSRui Paulo 	 *
3515b9c547cSRui Paulo 	 * This variable is used for identifying which SIM is used if the system
3525b9c547cSRui Paulo 	 * has more than one.
3535b9c547cSRui Paulo 	 */
3545b9c547cSRui Paulo 	int sim_num;
355f05cddf9SRui Paulo };
356f05cddf9SRui Paulo 
357f05cddf9SRui Paulo 
358f05cddf9SRui Paulo #define CFG_CHANGED_DEVICE_NAME BIT(0)
359f05cddf9SRui Paulo #define CFG_CHANGED_CONFIG_METHODS BIT(1)
360f05cddf9SRui Paulo #define CFG_CHANGED_DEVICE_TYPE BIT(2)
361f05cddf9SRui Paulo #define CFG_CHANGED_OS_VERSION BIT(3)
362f05cddf9SRui Paulo #define CFG_CHANGED_UUID BIT(4)
363f05cddf9SRui Paulo #define CFG_CHANGED_COUNTRY BIT(5)
364f05cddf9SRui Paulo #define CFG_CHANGED_SEC_DEVICE_TYPE BIT(6)
365f05cddf9SRui Paulo #define CFG_CHANGED_P2P_SSID_POSTFIX BIT(7)
366f05cddf9SRui Paulo #define CFG_CHANGED_WPS_STRING BIT(8)
367f05cddf9SRui Paulo #define CFG_CHANGED_P2P_INTRA_BSS BIT(9)
368f05cddf9SRui Paulo #define CFG_CHANGED_VENDOR_EXTENSION BIT(10)
369f05cddf9SRui Paulo #define CFG_CHANGED_P2P_LISTEN_CHANNEL BIT(11)
370f05cddf9SRui Paulo #define CFG_CHANGED_P2P_OPER_CHANNEL BIT(12)
371f05cddf9SRui Paulo #define CFG_CHANGED_P2P_PREF_CHAN BIT(13)
372f05cddf9SRui Paulo #define CFG_CHANGED_EXT_PW_BACKEND BIT(14)
3735b9c547cSRui Paulo #define CFG_CHANGED_NFC_PASSWORD_TOKEN BIT(15)
3745b9c547cSRui Paulo #define CFG_CHANGED_P2P_PASSPHRASE_LEN BIT(16)
375780fb4a2SCy Schubert #define CFG_CHANGED_SCHED_SCAN_PLANS BIT(17)
376*85732ac8SCy Schubert #define CFG_CHANGED_WOWLAN_TRIGGERS BIT(18)
377f05cddf9SRui Paulo 
37839beb93cSSam Leffler /**
37939beb93cSSam Leffler  * struct wpa_config - wpa_supplicant configuration data
38039beb93cSSam Leffler  *
38139beb93cSSam Leffler  * This data structure is presents the per-interface (radio) configuration
38239beb93cSSam Leffler  * data. In many cases, there is only one struct wpa_config instance, but if
38339beb93cSSam Leffler  * more than one network interface is being controlled, one instance is used
38439beb93cSSam Leffler  * for each.
38539beb93cSSam Leffler  */
38639beb93cSSam Leffler struct wpa_config {
38739beb93cSSam Leffler 	/**
38839beb93cSSam Leffler 	 * ssid - Head of the global network list
38939beb93cSSam Leffler 	 *
39039beb93cSSam Leffler 	 * This is the head for the list of all the configured networks.
39139beb93cSSam Leffler 	 */
39239beb93cSSam Leffler 	struct wpa_ssid *ssid;
39339beb93cSSam Leffler 
39439beb93cSSam Leffler 	/**
39539beb93cSSam Leffler 	 * pssid - Per-priority network lists (in priority order)
39639beb93cSSam Leffler 	 */
39739beb93cSSam Leffler 	struct wpa_ssid **pssid;
39839beb93cSSam Leffler 
39939beb93cSSam Leffler 	/**
40039beb93cSSam Leffler 	 * num_prio - Number of different priorities used in the pssid lists
40139beb93cSSam Leffler 	 *
40239beb93cSSam Leffler 	 * This indicates how many per-priority network lists are included in
40339beb93cSSam Leffler 	 * pssid.
40439beb93cSSam Leffler 	 */
40539beb93cSSam Leffler 	int num_prio;
40639beb93cSSam Leffler 
40739beb93cSSam Leffler 	/**
408f05cddf9SRui Paulo 	 * cred - Head of the credential list
409f05cddf9SRui Paulo 	 *
410f05cddf9SRui Paulo 	 * This is the head for the list of all the configured credentials.
411f05cddf9SRui Paulo 	 */
412f05cddf9SRui Paulo 	struct wpa_cred *cred;
413f05cddf9SRui Paulo 
414f05cddf9SRui Paulo 	/**
41539beb93cSSam Leffler 	 * eapol_version - IEEE 802.1X/EAPOL version number
41639beb93cSSam Leffler 	 *
41739beb93cSSam Leffler 	 * wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which
41839beb93cSSam Leffler 	 * defines EAPOL version 2. However, there are many APs that do not
41939beb93cSSam Leffler 	 * handle the new version number correctly (they seem to drop the
42039beb93cSSam Leffler 	 * frames completely). In order to make wpa_supplicant interoperate
42139beb93cSSam Leffler 	 * with these APs, the version number is set to 1 by default. This
42239beb93cSSam Leffler 	 * configuration value can be used to set it to the new version (2).
42339beb93cSSam Leffler 	 */
42439beb93cSSam Leffler 	int eapol_version;
42539beb93cSSam Leffler 
42639beb93cSSam Leffler 	/**
42739beb93cSSam Leffler 	 * ap_scan - AP scanning/selection
42839beb93cSSam Leffler 	 *
42939beb93cSSam Leffler 	 * By default, wpa_supplicant requests driver to perform AP
43039beb93cSSam Leffler 	 * scanning and then uses the scan results to select a
43139beb93cSSam Leffler 	 * suitable AP. Another alternative is to allow the driver to
43239beb93cSSam Leffler 	 * take care of AP scanning and selection and use
43339beb93cSSam Leffler 	 * wpa_supplicant just to process EAPOL frames based on IEEE
43439beb93cSSam Leffler 	 * 802.11 association information from the driver.
43539beb93cSSam Leffler 	 *
43639beb93cSSam Leffler 	 * 1: wpa_supplicant initiates scanning and AP selection (default).
43739beb93cSSam Leffler 	 *
43839beb93cSSam Leffler 	 * 0: Driver takes care of scanning, AP selection, and IEEE 802.11
43939beb93cSSam Leffler 	 * association parameters (e.g., WPA IE generation); this mode can
44039beb93cSSam Leffler 	 * also be used with non-WPA drivers when using IEEE 802.1X mode;
44139beb93cSSam Leffler 	 * do not try to associate with APs (i.e., external program needs
44239beb93cSSam Leffler 	 * to control association). This mode must also be used when using
44339beb93cSSam Leffler 	 * wired Ethernet drivers.
44439beb93cSSam Leffler 	 *
44539beb93cSSam Leffler 	 * 2: like 0, but associate with APs using security policy and SSID
44639beb93cSSam Leffler 	 * (but not BSSID); this can be used, e.g., with ndiswrapper and NDIS
44739beb93cSSam Leffler 	 * drivers to enable operation with hidden SSIDs and optimized roaming;
44839beb93cSSam Leffler 	 * in this mode, the network blocks in the configuration are tried
44939beb93cSSam Leffler 	 * one by one until the driver reports successful association; each
45039beb93cSSam Leffler 	 * network block should have explicit security policy (i.e., only one
45139beb93cSSam Leffler 	 * option in the lists) for key_mgmt, pairwise, group, proto variables.
452325151a3SRui Paulo 	 *
453325151a3SRui Paulo 	 * Note: ap_scan=2 should not be used with the nl80211 driver interface
454325151a3SRui Paulo 	 * (the current Linux interface). ap_scan=1 is optimized work working
455325151a3SRui Paulo 	 * with nl80211. For finding networks using hidden SSID, scan_ssid=1 in
456325151a3SRui Paulo 	 * the network block can be used with nl80211.
45739beb93cSSam Leffler 	 */
45839beb93cSSam Leffler 	int ap_scan;
45939beb93cSSam Leffler 
46039beb93cSSam Leffler 	/**
4615b9c547cSRui Paulo 	 * bgscan - Background scan and roaming parameters or %NULL if none
4625b9c547cSRui Paulo 	 *
4635b9c547cSRui Paulo 	 * This is an optional set of parameters for background scanning and
4645b9c547cSRui Paulo 	 * roaming within a network (ESS). For more detailed information see
4655b9c547cSRui Paulo 	 * ssid block documentation.
4665b9c547cSRui Paulo 	 *
4675b9c547cSRui Paulo 	 * The variable defines default bgscan behavior for all BSS station
4685b9c547cSRui Paulo 	 * networks except for those which have their own bgscan configuration.
4695b9c547cSRui Paulo 	 */
4705b9c547cSRui Paulo 	 char *bgscan;
4715b9c547cSRui Paulo 
4725b9c547cSRui Paulo 	/**
473f05cddf9SRui Paulo 	 * disable_scan_offload - Disable automatic offloading of scan requests
474f05cddf9SRui Paulo 	 *
475f05cddf9SRui Paulo 	 * By default, %wpa_supplicant tries to offload scanning if the driver
476f05cddf9SRui Paulo 	 * indicates support for this (sched_scan). This configuration
477f05cddf9SRui Paulo 	 * parameter can be used to disable this offloading mechanism.
478f05cddf9SRui Paulo 	 */
479f05cddf9SRui Paulo 	int disable_scan_offload;
480f05cddf9SRui Paulo 
481f05cddf9SRui Paulo 	/**
48239beb93cSSam Leffler 	 * ctrl_interface - Parameters for the control interface
48339beb93cSSam Leffler 	 *
48439beb93cSSam Leffler 	 * If this is specified, %wpa_supplicant will open a control interface
48539beb93cSSam Leffler 	 * that is available for external programs to manage %wpa_supplicant.
48639beb93cSSam Leffler 	 * The meaning of this string depends on which control interface
487f05cddf9SRui Paulo 	 * mechanism is used. For all cases, the existence of this parameter
48839beb93cSSam Leffler 	 * in configuration is used to determine whether the control interface
48939beb93cSSam Leffler 	 * is enabled.
49039beb93cSSam Leffler 	 *
49139beb93cSSam Leffler 	 * For UNIX domain sockets (default on Linux and BSD): This is a
49239beb93cSSam Leffler 	 * directory that will be created for UNIX domain sockets for listening
49339beb93cSSam Leffler 	 * to requests from external programs (CLI/GUI, etc.) for status
49439beb93cSSam Leffler 	 * information and configuration. The socket file will be named based
49539beb93cSSam Leffler 	 * on the interface name, so multiple %wpa_supplicant processes can be
49639beb93cSSam Leffler 	 * run at the same time if more than one interface is used.
49739beb93cSSam Leffler 	 * /var/run/wpa_supplicant is the recommended directory for sockets and
49839beb93cSSam Leffler 	 * by default, wpa_cli will use it when trying to connect with
49939beb93cSSam Leffler 	 * %wpa_supplicant.
50039beb93cSSam Leffler 	 *
50139beb93cSSam Leffler 	 * Access control for the control interface can be configured
50239beb93cSSam Leffler 	 * by setting the directory to allow only members of a group
50339beb93cSSam Leffler 	 * to use sockets. This way, it is possible to run
50439beb93cSSam Leffler 	 * %wpa_supplicant as root (since it needs to change network
50539beb93cSSam Leffler 	 * configuration and open raw sockets) and still allow GUI/CLI
50639beb93cSSam Leffler 	 * components to be run as non-root users. However, since the
50739beb93cSSam Leffler 	 * control interface can be used to change the network
50839beb93cSSam Leffler 	 * configuration, this access needs to be protected in many
50939beb93cSSam Leffler 	 * cases. By default, %wpa_supplicant is configured to use gid
51039beb93cSSam Leffler 	 * 0 (root). If you want to allow non-root users to use the
51139beb93cSSam Leffler 	 * control interface, add a new group and change this value to
51239beb93cSSam Leffler 	 * match with that group. Add users that should have control
51339beb93cSSam Leffler 	 * interface access to this group.
51439beb93cSSam Leffler 	 *
51539beb93cSSam Leffler 	 * When configuring both the directory and group, use following format:
51639beb93cSSam Leffler 	 * DIR=/var/run/wpa_supplicant GROUP=wheel
51739beb93cSSam Leffler 	 * DIR=/var/run/wpa_supplicant GROUP=0
51839beb93cSSam Leffler 	 * (group can be either group name or gid)
51939beb93cSSam Leffler 	 *
52039beb93cSSam Leffler 	 * For UDP connections (default on Windows): The value will be ignored.
52139beb93cSSam Leffler 	 * This variable is just used to select that the control interface is
52239beb93cSSam Leffler 	 * to be created. The value can be set to, e.g., udp
52339beb93cSSam Leffler 	 * (ctrl_interface=udp).
52439beb93cSSam Leffler 	 *
52539beb93cSSam Leffler 	 * For Windows Named Pipe: This value can be used to set the security
52639beb93cSSam Leffler 	 * descriptor for controlling access to the control interface. Security
52739beb93cSSam Leffler 	 * descriptor can be set using Security Descriptor String Format (see
52839beb93cSSam Leffler 	 * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/security_descriptor_string_format.asp).
52939beb93cSSam Leffler 	 * The descriptor string needs to be prefixed with SDDL=. For example,
53039beb93cSSam Leffler 	 * ctrl_interface=SDDL=D: would set an empty DACL (which will reject
53139beb93cSSam Leffler 	 * all connections).
53239beb93cSSam Leffler 	 */
53339beb93cSSam Leffler 	char *ctrl_interface;
53439beb93cSSam Leffler 
53539beb93cSSam Leffler 	/**
53639beb93cSSam Leffler 	 * ctrl_interface_group - Control interface group (DEPRECATED)
53739beb93cSSam Leffler 	 *
53839beb93cSSam Leffler 	 * This variable is only used for backwards compatibility. Group for
53939beb93cSSam Leffler 	 * UNIX domain sockets should now be specified using GROUP=group in
54039beb93cSSam Leffler 	 * ctrl_interface variable.
54139beb93cSSam Leffler 	 */
54239beb93cSSam Leffler 	char *ctrl_interface_group;
54339beb93cSSam Leffler 
54439beb93cSSam Leffler 	/**
54539beb93cSSam Leffler 	 * fast_reauth - EAP fast re-authentication (session resumption)
54639beb93cSSam Leffler 	 *
54739beb93cSSam Leffler 	 * By default, fast re-authentication is enabled for all EAP methods
54839beb93cSSam Leffler 	 * that support it. This variable can be used to disable fast
54939beb93cSSam Leffler 	 * re-authentication (by setting fast_reauth=0). Normally, there is no
55039beb93cSSam Leffler 	 * need to disable fast re-authentication.
55139beb93cSSam Leffler 	 */
55239beb93cSSam Leffler 	int fast_reauth;
55339beb93cSSam Leffler 
55439beb93cSSam Leffler 	/**
55539beb93cSSam Leffler 	 * opensc_engine_path - Path to the OpenSSL engine for opensc
55639beb93cSSam Leffler 	 *
55739beb93cSSam Leffler 	 * This is an OpenSSL specific configuration option for loading OpenSC
55839beb93cSSam Leffler 	 * engine (engine_opensc.so); if %NULL, this engine is not loaded.
55939beb93cSSam Leffler 	 */
56039beb93cSSam Leffler 	char *opensc_engine_path;
56139beb93cSSam Leffler 
56239beb93cSSam Leffler 	/**
56339beb93cSSam Leffler 	 * pkcs11_engine_path - Path to the OpenSSL engine for PKCS#11
56439beb93cSSam Leffler 	 *
56539beb93cSSam Leffler 	 * This is an OpenSSL specific configuration option for loading PKCS#11
56639beb93cSSam Leffler 	 * engine (engine_pkcs11.so); if %NULL, this engine is not loaded.
56739beb93cSSam Leffler 	 */
56839beb93cSSam Leffler 	char *pkcs11_engine_path;
56939beb93cSSam Leffler 
57039beb93cSSam Leffler 	/**
57139beb93cSSam Leffler 	 * pkcs11_module_path - Path to the OpenSSL OpenSC/PKCS#11 module
57239beb93cSSam Leffler 	 *
57339beb93cSSam Leffler 	 * This is an OpenSSL specific configuration option for configuring
57439beb93cSSam Leffler 	 * path to OpenSC/PKCS#11 engine (opensc-pkcs11.so); if %NULL, this
57539beb93cSSam Leffler 	 * module is not loaded.
57639beb93cSSam Leffler 	 */
57739beb93cSSam Leffler 	char *pkcs11_module_path;
57839beb93cSSam Leffler 
57939beb93cSSam Leffler 	/**
5805b9c547cSRui Paulo 	 * openssl_ciphers - OpenSSL cipher string
5815b9c547cSRui Paulo 	 *
5825b9c547cSRui Paulo 	 * This is an OpenSSL specific configuration option for configuring the
5835b9c547cSRui Paulo 	 * default ciphers. If not set, "DEFAULT:!EXP:!LOW" is used as the
5845b9c547cSRui Paulo 	 * default.
5855b9c547cSRui Paulo 	 */
5865b9c547cSRui Paulo 	char *openssl_ciphers;
5875b9c547cSRui Paulo 
5885b9c547cSRui Paulo 	/**
589f05cddf9SRui Paulo 	 * pcsc_reader - PC/SC reader name prefix
590f05cddf9SRui Paulo 	 *
591f05cddf9SRui Paulo 	 * If not %NULL, PC/SC reader with a name that matches this prefix is
592f05cddf9SRui Paulo 	 * initialized for SIM/USIM access. Empty string can be used to match
593f05cddf9SRui Paulo 	 * the first available reader.
594f05cddf9SRui Paulo 	 */
595f05cddf9SRui Paulo 	char *pcsc_reader;
596f05cddf9SRui Paulo 
597f05cddf9SRui Paulo 	/**
598f05cddf9SRui Paulo 	 * pcsc_pin - PIN for USIM, GSM SIM, and smartcards
599f05cddf9SRui Paulo 	 *
600f05cddf9SRui Paulo 	 * This field is used to configure PIN for SIM/USIM for EAP-SIM and
601f05cddf9SRui Paulo 	 * EAP-AKA. If left out, this will be asked through control interface.
602f05cddf9SRui Paulo 	 */
603f05cddf9SRui Paulo 	char *pcsc_pin;
604f05cddf9SRui Paulo 
605f05cddf9SRui Paulo 	/**
6065b9c547cSRui Paulo 	 * external_sim - Use external processing for SIM/USIM operations
6075b9c547cSRui Paulo 	 */
6085b9c547cSRui Paulo 	int external_sim;
6095b9c547cSRui Paulo 
6105b9c547cSRui Paulo 	/**
61139beb93cSSam Leffler 	 * driver_param - Driver interface parameters
61239beb93cSSam Leffler 	 *
61339beb93cSSam Leffler 	 * This text string is passed to the selected driver interface with the
61439beb93cSSam Leffler 	 * optional struct wpa_driver_ops::set_param() handler. This can be
61539beb93cSSam Leffler 	 * used to configure driver specific options without having to add new
61639beb93cSSam Leffler 	 * driver interface functionality.
61739beb93cSSam Leffler 	 */
61839beb93cSSam Leffler 	char *driver_param;
61939beb93cSSam Leffler 
62039beb93cSSam Leffler 	/**
62139beb93cSSam Leffler 	 * dot11RSNAConfigPMKLifetime - Maximum lifetime of a PMK
62239beb93cSSam Leffler 	 *
62339beb93cSSam Leffler 	 * dot11 MIB variable for the maximum lifetime of a PMK in the PMK
62439beb93cSSam Leffler 	 * cache (unit: seconds).
62539beb93cSSam Leffler 	 */
62639beb93cSSam Leffler 	unsigned int dot11RSNAConfigPMKLifetime;
62739beb93cSSam Leffler 
62839beb93cSSam Leffler 	/**
62939beb93cSSam Leffler 	 * dot11RSNAConfigPMKReauthThreshold - PMK re-authentication threshold
63039beb93cSSam Leffler 	 *
63139beb93cSSam Leffler 	 * dot11 MIB variable for the percentage of the PMK lifetime
63239beb93cSSam Leffler 	 * that should expire before an IEEE 802.1X reauthentication occurs.
63339beb93cSSam Leffler 	 */
63439beb93cSSam Leffler 	unsigned int dot11RSNAConfigPMKReauthThreshold;
63539beb93cSSam Leffler 
63639beb93cSSam Leffler 	/**
63739beb93cSSam Leffler 	 * dot11RSNAConfigSATimeout - Security association timeout
63839beb93cSSam Leffler 	 *
63939beb93cSSam Leffler 	 * dot11 MIB variable for the maximum time a security association
64039beb93cSSam Leffler 	 * shall take to set up (unit: seconds).
64139beb93cSSam Leffler 	 */
64239beb93cSSam Leffler 	unsigned int dot11RSNAConfigSATimeout;
64339beb93cSSam Leffler 
64439beb93cSSam Leffler 	/**
64539beb93cSSam Leffler 	 * update_config - Is wpa_supplicant allowed to update configuration
64639beb93cSSam Leffler 	 *
64739beb93cSSam Leffler 	 * This variable control whether wpa_supplicant is allow to re-write
64839beb93cSSam Leffler 	 * its configuration with wpa_config_write(). If this is zero,
64939beb93cSSam Leffler 	 * configuration data is only changed in memory and the external data
65039beb93cSSam Leffler 	 * is not overriden. If this is non-zero, wpa_supplicant will update
65139beb93cSSam Leffler 	 * the configuration data (e.g., a file) whenever configuration is
65239beb93cSSam Leffler 	 * changed. This update may replace the old configuration which can
65339beb93cSSam Leffler 	 * remove comments from it in case of a text file configuration.
65439beb93cSSam Leffler 	 */
65539beb93cSSam Leffler 	int update_config;
65639beb93cSSam Leffler 
65739beb93cSSam Leffler 	/**
65839beb93cSSam Leffler 	 * blobs - Configuration blobs
65939beb93cSSam Leffler 	 */
66039beb93cSSam Leffler 	struct wpa_config_blob *blobs;
66139beb93cSSam Leffler 
66239beb93cSSam Leffler 	/**
66339beb93cSSam Leffler 	 * uuid - Universally Unique IDentifier (UUID; see RFC 4122) for WPS
66439beb93cSSam Leffler 	 */
66539beb93cSSam Leffler 	u8 uuid[16];
66639beb93cSSam Leffler 
66739beb93cSSam Leffler 	/**
668*85732ac8SCy Schubert 	 * auto_uuid - Automatic UUID behavior
669*85732ac8SCy Schubert 	 * 0 = generate static value based on the local MAC address (default)
670*85732ac8SCy Schubert 	 * 1 = generate a random UUID every time wpa_supplicant starts
671*85732ac8SCy Schubert 	 */
672*85732ac8SCy Schubert 	int auto_uuid;
673*85732ac8SCy Schubert 
674*85732ac8SCy Schubert 	/**
67539beb93cSSam Leffler 	 * device_name - Device Name (WPS)
67639beb93cSSam Leffler 	 * User-friendly description of device; up to 32 octets encoded in
67739beb93cSSam Leffler 	 * UTF-8
67839beb93cSSam Leffler 	 */
67939beb93cSSam Leffler 	char *device_name;
68039beb93cSSam Leffler 
68139beb93cSSam Leffler 	/**
68239beb93cSSam Leffler 	 * manufacturer - Manufacturer (WPS)
68339beb93cSSam Leffler 	 * The manufacturer of the device (up to 64 ASCII characters)
68439beb93cSSam Leffler 	 */
68539beb93cSSam Leffler 	char *manufacturer;
68639beb93cSSam Leffler 
68739beb93cSSam Leffler 	/**
68839beb93cSSam Leffler 	 * model_name - Model Name (WPS)
68939beb93cSSam Leffler 	 * Model of the device (up to 32 ASCII characters)
69039beb93cSSam Leffler 	 */
69139beb93cSSam Leffler 	char *model_name;
69239beb93cSSam Leffler 
69339beb93cSSam Leffler 	/**
69439beb93cSSam Leffler 	 * model_number - Model Number (WPS)
69539beb93cSSam Leffler 	 * Additional device description (up to 32 ASCII characters)
69639beb93cSSam Leffler 	 */
69739beb93cSSam Leffler 	char *model_number;
69839beb93cSSam Leffler 
69939beb93cSSam Leffler 	/**
70039beb93cSSam Leffler 	 * serial_number - Serial Number (WPS)
70139beb93cSSam Leffler 	 * Serial number of the device (up to 32 characters)
70239beb93cSSam Leffler 	 */
70339beb93cSSam Leffler 	char *serial_number;
70439beb93cSSam Leffler 
70539beb93cSSam Leffler 	/**
70639beb93cSSam Leffler 	 * device_type - Primary Device Type (WPS)
70739beb93cSSam Leffler 	 */
708f05cddf9SRui Paulo 	u8 device_type[WPS_DEV_TYPE_LEN];
70939beb93cSSam Leffler 
71039beb93cSSam Leffler 	/**
711e28a4053SRui Paulo 	 * config_methods - Config Methods
712e28a4053SRui Paulo 	 *
713e28a4053SRui Paulo 	 * This is a space-separated list of supported WPS configuration
714f05cddf9SRui Paulo 	 * methods. For example, "label virtual_display virtual_push_button
715f05cddf9SRui Paulo 	 * keypad".
716e28a4053SRui Paulo 	 * Available methods: usba ethernet label display ext_nfc_token
717f05cddf9SRui Paulo 	 * int_nfc_token nfc_interface push_button keypad
718f05cddf9SRui Paulo 	 * virtual_display physical_display
719f05cddf9SRui Paulo 	 * virtual_push_button physical_push_button.
720e28a4053SRui Paulo 	 */
721e28a4053SRui Paulo 	char *config_methods;
722e28a4053SRui Paulo 
723e28a4053SRui Paulo 	/**
72439beb93cSSam Leffler 	 * os_version - OS Version (WPS)
72539beb93cSSam Leffler 	 * 4-octet operating system version number
72639beb93cSSam Leffler 	 */
72739beb93cSSam Leffler 	u8 os_version[4];
72839beb93cSSam Leffler 
72939beb93cSSam Leffler 	/**
73039beb93cSSam Leffler 	 * country - Country code
73139beb93cSSam Leffler 	 *
73239beb93cSSam Leffler 	 * This is the ISO/IEC alpha2 country code for which we are operating
73339beb93cSSam Leffler 	 * in
73439beb93cSSam Leffler 	 */
73539beb93cSSam Leffler 	char country[2];
73639beb93cSSam Leffler 
73739beb93cSSam Leffler 	/**
73839beb93cSSam Leffler 	 * wps_cred_processing - Credential processing
73939beb93cSSam Leffler 	 *
74039beb93cSSam Leffler 	 *   0 = process received credentials internally
74139beb93cSSam Leffler 	 *   1 = do not process received credentials; just pass them over
74239beb93cSSam Leffler 	 *	ctrl_iface to external program(s)
74339beb93cSSam Leffler 	 *   2 = process received credentials internally and pass them over
74439beb93cSSam Leffler 	 *	ctrl_iface to external program(s)
74539beb93cSSam Leffler 	 */
74639beb93cSSam Leffler 	int wps_cred_processing;
747e28a4053SRui Paulo 
748f05cddf9SRui Paulo #define MAX_SEC_DEVICE_TYPES 5
749f05cddf9SRui Paulo 	/**
750f05cddf9SRui Paulo 	 * sec_device_types - Secondary Device Types (P2P)
751f05cddf9SRui Paulo 	 */
752f05cddf9SRui Paulo 	u8 sec_device_type[MAX_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN];
753f05cddf9SRui Paulo 	int num_sec_device_types;
754f05cddf9SRui Paulo 
755f05cddf9SRui Paulo 	int p2p_listen_reg_class;
756f05cddf9SRui Paulo 	int p2p_listen_channel;
757f05cddf9SRui Paulo 	int p2p_oper_reg_class;
758f05cddf9SRui Paulo 	int p2p_oper_channel;
759f05cddf9SRui Paulo 	int p2p_go_intent;
760f05cddf9SRui Paulo 	char *p2p_ssid_postfix;
761f05cddf9SRui Paulo 	int persistent_reconnect;
762f05cddf9SRui Paulo 	int p2p_intra_bss;
763f05cddf9SRui Paulo 	unsigned int num_p2p_pref_chan;
764f05cddf9SRui Paulo 	struct p2p_channel *p2p_pref_chan;
7655b9c547cSRui Paulo 	struct wpa_freq_range_list p2p_no_go_freq;
7665b9c547cSRui Paulo 	int p2p_add_cli_chan;
7675b9c547cSRui Paulo 	int p2p_ignore_shared_freq;
7685b9c547cSRui Paulo 	int p2p_optimize_listen_chan;
769f05cddf9SRui Paulo 
770f05cddf9SRui Paulo 	struct wpabuf *wps_vendor_ext_m1;
771f05cddf9SRui Paulo 
772f05cddf9SRui Paulo #define MAX_WPS_VENDOR_EXT 10
773f05cddf9SRui Paulo 	/**
774f05cddf9SRui Paulo 	 * wps_vendor_ext - Vendor extension attributes in WPS
775f05cddf9SRui Paulo 	 */
776f05cddf9SRui Paulo 	struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXT];
777f05cddf9SRui Paulo 
778f05cddf9SRui Paulo 	/**
779f05cddf9SRui Paulo 	 * p2p_group_idle - Maximum idle time in seconds for P2P group
780f05cddf9SRui Paulo 	 *
781f05cddf9SRui Paulo 	 * This value controls how long a P2P group is maintained after there
782f05cddf9SRui Paulo 	 * is no other members in the group. As a GO, this means no associated
783f05cddf9SRui Paulo 	 * stations in the group. As a P2P client, this means no GO seen in
784f05cddf9SRui Paulo 	 * scan results. The maximum idle time is specified in seconds with 0
785f05cddf9SRui Paulo 	 * indicating no time limit, i.e., the P2P group remains in active
786f05cddf9SRui Paulo 	 * state indefinitely until explicitly removed. As a P2P client, the
787f05cddf9SRui Paulo 	 * maximum idle time of P2P_MAX_CLIENT_IDLE seconds is enforced, i.e.,
788f05cddf9SRui Paulo 	 * this parameter is mainly meant for GO use and for P2P client, it can
789f05cddf9SRui Paulo 	 * only be used to reduce the default timeout to smaller value. A
790f05cddf9SRui Paulo 	 * special value -1 can be used to configure immediate removal of the
791f05cddf9SRui Paulo 	 * group for P2P client role on any disconnection after the data
792f05cddf9SRui Paulo 	 * connection has been established.
793f05cddf9SRui Paulo 	 */
794f05cddf9SRui Paulo 	int p2p_group_idle;
795f05cddf9SRui Paulo 
796e28a4053SRui Paulo 	/**
797325151a3SRui Paulo 	 * p2p_go_freq_change_policy - The GO frequency change policy
798325151a3SRui Paulo 	 *
799325151a3SRui Paulo 	 * This controls the behavior of the GO when there is a change in the
800325151a3SRui Paulo 	 * map of the currently used frequencies in case more than one channel
801325151a3SRui Paulo 	 * is supported.
802325151a3SRui Paulo 	 *
803325151a3SRui Paulo 	 * @P2P_GO_FREQ_MOVE_SCM: Prefer working in a single channel mode if
804325151a3SRui Paulo 	 * possible. In case the GO is the only interface using its frequency
805325151a3SRui Paulo 	 * and there are other station interfaces on other frequencies, the GO
806325151a3SRui Paulo 	 * will migrate to one of these frequencies.
807325151a3SRui Paulo 	 *
808325151a3SRui Paulo 	 * @P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS: Same as P2P_GO_FREQ_MOVE_SCM,
809325151a3SRui Paulo 	 * but a transition is possible only in case one of the other used
810325151a3SRui Paulo 	 * frequencies is one of the frequencies in the intersection of the
811325151a3SRui Paulo 	 * frequency list of the local device and the peer device.
812325151a3SRui Paulo 	 *
813325151a3SRui Paulo 	 * @P2P_GO_FREQ_MOVE_STAY: Prefer to stay on the current frequency.
814780fb4a2SCy Schubert 	 *
815780fb4a2SCy Schubert 	 * @P2P_GO_FREQ_MOVE_SCM_ECSA: Same as
816780fb4a2SCy Schubert 	 * P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS but a transition is possible only
817780fb4a2SCy Schubert 	 * if all the group members advertise eCSA support.
818325151a3SRui Paulo 	 */
819325151a3SRui Paulo 	enum {
820325151a3SRui Paulo 		P2P_GO_FREQ_MOVE_SCM = 0,
821325151a3SRui Paulo 		P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS = 1,
822325151a3SRui Paulo 		P2P_GO_FREQ_MOVE_STAY = 2,
823780fb4a2SCy Schubert 		P2P_GO_FREQ_MOVE_SCM_ECSA = 3,
824780fb4a2SCy Schubert 		P2P_GO_FREQ_MOVE_MAX = P2P_GO_FREQ_MOVE_SCM_ECSA,
825325151a3SRui Paulo 	} p2p_go_freq_change_policy;
826325151a3SRui Paulo 
827325151a3SRui Paulo #define DEFAULT_P2P_GO_FREQ_MOVE P2P_GO_FREQ_MOVE_STAY
828325151a3SRui Paulo 
829325151a3SRui Paulo 	/**
8305b9c547cSRui Paulo 	 * p2p_passphrase_len - Passphrase length (8..63) for P2P GO
8315b9c547cSRui Paulo 	 *
8325b9c547cSRui Paulo 	 * This parameter controls the length of the random passphrase that is
8335b9c547cSRui Paulo 	 * generated at the GO.
8345b9c547cSRui Paulo 	 */
8355b9c547cSRui Paulo 	unsigned int p2p_passphrase_len;
8365b9c547cSRui Paulo 
8375b9c547cSRui Paulo 	/**
838e28a4053SRui Paulo 	 * bss_max_count - Maximum number of BSS entries to keep in memory
839e28a4053SRui Paulo 	 */
840e28a4053SRui Paulo 	unsigned int bss_max_count;
841e28a4053SRui Paulo 
842e28a4053SRui Paulo 	/**
843f05cddf9SRui Paulo 	 * bss_expiration_age - BSS entry age after which it can be expired
844f05cddf9SRui Paulo 	 *
845f05cddf9SRui Paulo 	 * This value controls the time in seconds after which a BSS entry
846f05cddf9SRui Paulo 	 * gets removed if it has not been updated or is not in use.
847f05cddf9SRui Paulo 	 */
848f05cddf9SRui Paulo 	unsigned int bss_expiration_age;
849f05cddf9SRui Paulo 
850f05cddf9SRui Paulo 	/**
851f05cddf9SRui Paulo 	 * bss_expiration_scan_count - Expire BSS after number of scans
852f05cddf9SRui Paulo 	 *
853f05cddf9SRui Paulo 	 * If the BSS entry has not been seen in this many scans, it will be
854f05cddf9SRui Paulo 	 * removed. A value of 1 means that entry is removed after the first
855f05cddf9SRui Paulo 	 * scan in which the BSSID is not seen. Larger values can be used
856f05cddf9SRui Paulo 	 * to avoid BSS entries disappearing if they are not visible in
857f05cddf9SRui Paulo 	 * every scan (e.g., low signal quality or interference).
858f05cddf9SRui Paulo 	 */
859f05cddf9SRui Paulo 	unsigned int bss_expiration_scan_count;
860f05cddf9SRui Paulo 
861f05cddf9SRui Paulo 	/**
862e28a4053SRui Paulo 	 * filter_ssids - SSID-based scan result filtering
863e28a4053SRui Paulo 	 *
864e28a4053SRui Paulo 	 *   0 = do not filter scan results
865e28a4053SRui Paulo 	 *   1 = only include configured SSIDs in scan results/BSS table
866e28a4053SRui Paulo 	 */
867e28a4053SRui Paulo 	int filter_ssids;
868f05cddf9SRui Paulo 
869f05cddf9SRui Paulo 	/**
870f05cddf9SRui Paulo 	 * filter_rssi - RSSI-based scan result filtering
871f05cddf9SRui Paulo 	 *
872f05cddf9SRui Paulo 	 * 0 = do not filter scan results
873f05cddf9SRui Paulo 	 * -n = filter scan results below -n dBm
874f05cddf9SRui Paulo 	 */
875f05cddf9SRui Paulo 	int filter_rssi;
876f05cddf9SRui Paulo 
877f05cddf9SRui Paulo 	/**
878f05cddf9SRui Paulo 	 * max_num_sta - Maximum number of STAs in an AP/P2P GO
879f05cddf9SRui Paulo 	 */
880f05cddf9SRui Paulo 	unsigned int max_num_sta;
881f05cddf9SRui Paulo 
882f05cddf9SRui Paulo 	/**
883*85732ac8SCy Schubert 	 * ap_isolate - Whether to use client isolation feature
884*85732ac8SCy Schubert 	 *
885*85732ac8SCy Schubert 	 * Client isolation can be used to prevent low-level bridging of
886*85732ac8SCy Schubert 	 * frames between associated stations in the BSS. By default,
887*85732ac8SCy Schubert 	 * this bridging is allowed (ap_isolate=0); except in P2P GO case,
888*85732ac8SCy Schubert 	 * where p2p_intra_bss parameter is used to determine whether to allow
889*85732ac8SCy Schubert 	 * intra-BSS forwarding (ap_isolate = !p2p_intra_bss).
890*85732ac8SCy Schubert 	 *
891*85732ac8SCy Schubert 	 * 0 = do not enable AP isolation
892*85732ac8SCy Schubert 	 * 1 = enable AP isolation
893*85732ac8SCy Schubert 	 */
894*85732ac8SCy Schubert 	int ap_isolate;
895*85732ac8SCy Schubert 
896*85732ac8SCy Schubert 	/**
8975b9c547cSRui Paulo 	 * freq_list - Array of allowed scan frequencies or %NULL for all
8985b9c547cSRui Paulo 	 *
8995b9c547cSRui Paulo 	 * This is an optional zero-terminated array of frequencies in
9005b9c547cSRui Paulo 	 * megahertz (MHz) to allow for narrowing scanning range.
9015b9c547cSRui Paulo 	 */
9025b9c547cSRui Paulo 	int *freq_list;
9035b9c547cSRui Paulo 
9045b9c547cSRui Paulo 	/**
9055b9c547cSRui Paulo 	 * scan_cur_freq - Whether to scan only the current channel
9065b9c547cSRui Paulo 	 *
9075b9c547cSRui Paulo 	 * If true, attempt to scan only the current channel if any other
9085b9c547cSRui Paulo 	 * VIFs on this radio are already associated on a particular channel.
9095b9c547cSRui Paulo 	 */
9105b9c547cSRui Paulo 	int scan_cur_freq;
9115b9c547cSRui Paulo 
9125b9c547cSRui Paulo 	/**
913f05cddf9SRui Paulo 	 * changed_parameters - Bitmap of changed parameters since last update
914f05cddf9SRui Paulo 	 */
915f05cddf9SRui Paulo 	unsigned int changed_parameters;
916f05cddf9SRui Paulo 
917f05cddf9SRui Paulo 	/**
918*85732ac8SCy Schubert 	 * disassoc_low_ack - Disassociate stations with massive packet loss
919f05cddf9SRui Paulo 	 */
920f05cddf9SRui Paulo 	int disassoc_low_ack;
921f05cddf9SRui Paulo 
922f05cddf9SRui Paulo 	/**
923f05cddf9SRui Paulo 	 * interworking - Whether Interworking (IEEE 802.11u) is enabled
924f05cddf9SRui Paulo 	 */
925f05cddf9SRui Paulo 	int interworking;
926f05cddf9SRui Paulo 
927f05cddf9SRui Paulo 	/**
928f05cddf9SRui Paulo 	 * access_network_type - Access Network Type
929f05cddf9SRui Paulo 	 *
930f05cddf9SRui Paulo 	 * When Interworking is enabled, scans will be limited to APs that
931f05cddf9SRui Paulo 	 * advertise the specified Access Network Type (0..15; with 15
932f05cddf9SRui Paulo 	 * indicating wildcard match).
933f05cddf9SRui Paulo 	 */
934f05cddf9SRui Paulo 	int access_network_type;
935f05cddf9SRui Paulo 
936f05cddf9SRui Paulo 	 /**
937*85732ac8SCy Schubert 	  * go_interworking - Whether Interworking for P2P GO is enabled
938*85732ac8SCy Schubert 	  */
939*85732ac8SCy Schubert 	int go_interworking;
940*85732ac8SCy Schubert 
941*85732ac8SCy Schubert 	/**
942*85732ac8SCy Schubert 	 * go_access_network_type - P2P GO Access Network Type
943*85732ac8SCy Schubert 	 *
944*85732ac8SCy Schubert 	 * This indicates which access network type to advertise if Interworking
945*85732ac8SCy Schubert 	 * is enabled for P2P GO.
946*85732ac8SCy Schubert 	 */
947*85732ac8SCy Schubert 	int go_access_network_type;
948*85732ac8SCy Schubert 
949*85732ac8SCy Schubert 	/**
950*85732ac8SCy Schubert 	 * go_internet - Interworking: Internet connectivity (0 or 1)
951*85732ac8SCy Schubert 	 */
952*85732ac8SCy Schubert 	int go_internet;
953*85732ac8SCy Schubert 
954*85732ac8SCy Schubert 	/**
955*85732ac8SCy Schubert 	 * go_venue_group - Interworking: Venue group
956*85732ac8SCy Schubert 	 */
957*85732ac8SCy Schubert 	int go_venue_group;
958*85732ac8SCy Schubert 
959*85732ac8SCy Schubert 	/**
960*85732ac8SCy Schubert 	 * go_venue_type: Interworking: Venue type
961*85732ac8SCy Schubert 	 */
962*85732ac8SCy Schubert 	int go_venue_type;
963*85732ac8SCy Schubert 
964*85732ac8SCy Schubert 	/**
965f05cddf9SRui Paulo 	 * hessid - Homogenous ESS identifier
966f05cddf9SRui Paulo 	 *
967f05cddf9SRui Paulo 	 * If this is set (any octet is non-zero), scans will be used to
968f05cddf9SRui Paulo 	 * request response only from BSSes belonging to the specified
969f05cddf9SRui Paulo 	 * Homogeneous ESS. This is used only if interworking is enabled.
970f05cddf9SRui Paulo 	 */
971f05cddf9SRui Paulo 	u8 hessid[ETH_ALEN];
972f05cddf9SRui Paulo 
973f05cddf9SRui Paulo 	/**
974f05cddf9SRui Paulo 	 * hs20 - Hotspot 2.0
975f05cddf9SRui Paulo 	 */
976f05cddf9SRui Paulo 	int hs20;
977f05cddf9SRui Paulo 
978f05cddf9SRui Paulo 	/**
979f05cddf9SRui Paulo 	 * pbc_in_m1 - AP mode WPS probing workaround for PBC with Windows 7
980f05cddf9SRui Paulo 	 *
981f05cddf9SRui Paulo 	 * Windows 7 uses incorrect way of figuring out AP's WPS capabilities
982f05cddf9SRui Paulo 	 * by acting as a Registrar and using M1 from the AP. The config
983f05cddf9SRui Paulo 	 * methods attribute in that message is supposed to indicate only the
984f05cddf9SRui Paulo 	 * configuration method supported by the AP in Enrollee role, i.e., to
985f05cddf9SRui Paulo 	 * add an external Registrar. For that case, PBC shall not be used and
986f05cddf9SRui Paulo 	 * as such, the PushButton config method is removed from M1 by default.
987f05cddf9SRui Paulo 	 * If pbc_in_m1=1 is included in the configuration file, the PushButton
988f05cddf9SRui Paulo 	 * config method is left in M1 (if included in config_methods
989f05cddf9SRui Paulo 	 * parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from
990f05cddf9SRui Paulo 	 * a label in the AP).
991f05cddf9SRui Paulo 	 */
992f05cddf9SRui Paulo 	int pbc_in_m1;
993f05cddf9SRui Paulo 
994f05cddf9SRui Paulo 	/**
995f05cddf9SRui Paulo 	 * autoscan - Automatic scan parameters or %NULL if none
996f05cddf9SRui Paulo 	 *
997f05cddf9SRui Paulo 	 * This is an optional set of parameters for automatic scanning
998f05cddf9SRui Paulo 	 * within an interface in following format:
999f05cddf9SRui Paulo 	 * <autoscan module name>:<module parameters>
1000f05cddf9SRui Paulo 	 */
1001f05cddf9SRui Paulo 	char *autoscan;
1002f05cddf9SRui Paulo 
1003f05cddf9SRui Paulo 	/**
10045b9c547cSRui Paulo 	 * wps_nfc_pw_from_config - NFC Device Password was read from config
10055b9c547cSRui Paulo 	 *
10065b9c547cSRui Paulo 	 * This parameter can be determined whether the NFC Device Password was
10075b9c547cSRui Paulo 	 * included in the configuration (1) or generated dynamically (0). Only
10085b9c547cSRui Paulo 	 * the former case is re-written back to the configuration file.
10095b9c547cSRui Paulo 	 */
10105b9c547cSRui Paulo 	int wps_nfc_pw_from_config;
10115b9c547cSRui Paulo 
10125b9c547cSRui Paulo 	/**
1013f05cddf9SRui Paulo 	 * wps_nfc_dev_pw_id - NFC Device Password ID for password token
1014f05cddf9SRui Paulo 	 */
1015f05cddf9SRui Paulo 	int wps_nfc_dev_pw_id;
1016f05cddf9SRui Paulo 
1017f05cddf9SRui Paulo 	/**
1018f05cddf9SRui Paulo 	 * wps_nfc_dh_pubkey - NFC DH Public Key for password token
1019f05cddf9SRui Paulo 	 */
1020f05cddf9SRui Paulo 	struct wpabuf *wps_nfc_dh_pubkey;
1021f05cddf9SRui Paulo 
1022f05cddf9SRui Paulo 	/**
1023f05cddf9SRui Paulo 	 * wps_nfc_dh_privkey - NFC DH Private Key for password token
1024f05cddf9SRui Paulo 	 */
1025f05cddf9SRui Paulo 	struct wpabuf *wps_nfc_dh_privkey;
1026f05cddf9SRui Paulo 
1027f05cddf9SRui Paulo 	/**
1028f05cddf9SRui Paulo 	 * wps_nfc_dev_pw - NFC Device Password for password token
1029f05cddf9SRui Paulo 	 */
1030f05cddf9SRui Paulo 	struct wpabuf *wps_nfc_dev_pw;
1031f05cddf9SRui Paulo 
1032f05cddf9SRui Paulo 	/**
1033f05cddf9SRui Paulo 	 * ext_password_backend - External password backend or %NULL if none
1034f05cddf9SRui Paulo 	 *
1035f05cddf9SRui Paulo 	 * format: <backend name>[:<optional backend parameters>]
1036f05cddf9SRui Paulo 	 */
1037f05cddf9SRui Paulo 	char *ext_password_backend;
1038f05cddf9SRui Paulo 
1039f05cddf9SRui Paulo 	/*
1040f05cddf9SRui Paulo 	 * p2p_go_max_inactivity - Timeout in seconds to detect STA inactivity
1041f05cddf9SRui Paulo 	 *
1042f05cddf9SRui Paulo 	 * This timeout value is used in P2P GO mode to clean up
1043f05cddf9SRui Paulo 	 * inactive stations.
1044f05cddf9SRui Paulo 	 * By default: 300 seconds.
1045f05cddf9SRui Paulo 	 */
1046f05cddf9SRui Paulo 	int p2p_go_max_inactivity;
1047f05cddf9SRui Paulo 
1048f05cddf9SRui Paulo 	struct hostapd_wmm_ac_params wmm_ac_params[4];
1049f05cddf9SRui Paulo 
1050f05cddf9SRui Paulo 	/**
1051f05cddf9SRui Paulo 	 * auto_interworking - Whether to use network selection automatically
1052f05cddf9SRui Paulo 	 *
1053f05cddf9SRui Paulo 	 * 0 = do not automatically go through Interworking network selection
1054f05cddf9SRui Paulo 	 *     (i.e., require explicit interworking_select command for this)
1055f05cddf9SRui Paulo 	 * 1 = perform Interworking network selection if one or more
1056f05cddf9SRui Paulo 	 *     credentials have been configured and scan did not find a
1057f05cddf9SRui Paulo 	 *     matching network block
1058f05cddf9SRui Paulo 	 */
1059f05cddf9SRui Paulo 	int auto_interworking;
1060f05cddf9SRui Paulo 
1061f05cddf9SRui Paulo 	/**
1062f05cddf9SRui Paulo 	 * p2p_go_ht40 - Default mode for HT40 enable when operating as GO.
1063f05cddf9SRui Paulo 	 *
1064f05cddf9SRui Paulo 	 * This will take effect for p2p_group_add, p2p_connect, and p2p_invite.
1065f05cddf9SRui Paulo 	 * Note that regulatory constraints and driver capabilities are
1066f05cddf9SRui Paulo 	 * consulted anyway, so setting it to 1 can't do real harm.
1067f05cddf9SRui Paulo 	 * By default: 0 (disabled)
1068f05cddf9SRui Paulo 	 */
1069f05cddf9SRui Paulo 	int p2p_go_ht40;
1070f05cddf9SRui Paulo 
1071f05cddf9SRui Paulo 	/**
10725b9c547cSRui Paulo 	 * p2p_go_vht - Default mode for VHT enable when operating as GO
10735b9c547cSRui Paulo 	 *
10745b9c547cSRui Paulo 	 * This will take effect for p2p_group_add, p2p_connect, and p2p_invite.
10755b9c547cSRui Paulo 	 * Note that regulatory constraints and driver capabilities are
10765b9c547cSRui Paulo 	 * consulted anyway, so setting it to 1 can't do real harm.
10775b9c547cSRui Paulo 	 * By default: 0 (disabled)
10785b9c547cSRui Paulo 	 */
10795b9c547cSRui Paulo 	int p2p_go_vht;
10805b9c547cSRui Paulo 
10815b9c547cSRui Paulo 	/**
10825b9c547cSRui Paulo 	 * p2p_go_ctwindow - CTWindow to use when operating as GO
10835b9c547cSRui Paulo 	 *
10845b9c547cSRui Paulo 	 * By default: 0 (no CTWindow). Values 0-127 can be used to indicate
10855b9c547cSRui Paulo 	 * the length of the CTWindow in TUs.
10865b9c547cSRui Paulo 	 */
10875b9c547cSRui Paulo 	int p2p_go_ctwindow;
10885b9c547cSRui Paulo 
10895b9c547cSRui Paulo 	/**
1090f05cddf9SRui Paulo 	 * p2p_disabled - Whether P2P operations are disabled for this interface
1091f05cddf9SRui Paulo 	 */
1092f05cddf9SRui Paulo 	int p2p_disabled;
1093f05cddf9SRui Paulo 
1094f05cddf9SRui Paulo 	/**
1095f05cddf9SRui Paulo 	 * p2p_no_group_iface - Whether group interfaces can be used
1096f05cddf9SRui Paulo 	 *
1097f05cddf9SRui Paulo 	 * By default, wpa_supplicant will create a separate interface for P2P
1098f05cddf9SRui Paulo 	 * group operations if the driver supports this. This functionality can
1099f05cddf9SRui Paulo 	 * be disabled by setting this parameter to 1. In that case, the same
1100f05cddf9SRui Paulo 	 * interface that was used for the P2P management operations is used
1101f05cddf9SRui Paulo 	 * also for the group operation.
1102f05cddf9SRui Paulo 	 */
1103f05cddf9SRui Paulo 	int p2p_no_group_iface;
1104f05cddf9SRui Paulo 
1105f05cddf9SRui Paulo 	/**
1106325151a3SRui Paulo 	 * p2p_cli_probe - Enable/disable P2P CLI probe request handling
1107325151a3SRui Paulo 	 *
1108325151a3SRui Paulo 	 * If this parameter is set to 1, a connected P2P Client will receive
1109325151a3SRui Paulo 	 * and handle Probe Request frames. Setting this parameter to 0
1110325151a3SRui Paulo 	 * disables this option. Default value: 0.
1111325151a3SRui Paulo 	 *
1112325151a3SRui Paulo 	 * Note: Setting this property at run time takes effect on the following
1113325151a3SRui Paulo 	 * interface state transition to/from the WPA_COMPLETED state.
1114325151a3SRui Paulo 	 */
1115325151a3SRui Paulo 	int p2p_cli_probe;
1116325151a3SRui Paulo 
1117325151a3SRui Paulo 	/**
1118f05cddf9SRui Paulo 	 * okc - Whether to enable opportunistic key caching by default
1119f05cddf9SRui Paulo 	 *
1120f05cddf9SRui Paulo 	 * By default, OKC is disabled unless enabled by the per-network
1121f05cddf9SRui Paulo 	 * proactive_key_caching=1 parameter. okc=1 can be used to change this
1122f05cddf9SRui Paulo 	 * default behavior.
1123f05cddf9SRui Paulo 	 */
1124f05cddf9SRui Paulo 	int okc;
1125f05cddf9SRui Paulo 
1126f05cddf9SRui Paulo 	/**
1127f05cddf9SRui Paulo 	 * pmf - Whether to enable/require PMF by default
1128f05cddf9SRui Paulo 	 *
1129f05cddf9SRui Paulo 	 * By default, PMF is disabled unless enabled by the per-network
1130f05cddf9SRui Paulo 	 * ieee80211w=1 or ieee80211w=2 parameter. pmf=1/2 can be used to change
1131780fb4a2SCy Schubert 	 * this default behavior for RSN network (this is not applicable for
1132780fb4a2SCy Schubert 	 * non-RSN cases).
1133f05cddf9SRui Paulo 	 */
1134f05cddf9SRui Paulo 	enum mfp_options pmf;
11355b9c547cSRui Paulo 
11365b9c547cSRui Paulo 	/**
11375b9c547cSRui Paulo 	 * sae_groups - Preference list of enabled groups for SAE
11385b9c547cSRui Paulo 	 *
11395b9c547cSRui Paulo 	 * By default (if this parameter is not set), the mandatory group 19
11405b9c547cSRui Paulo 	 * (ECC group defined over a 256-bit prime order field) is preferred,
11415b9c547cSRui Paulo 	 * but other groups are also enabled. If this parameter is set, the
11425b9c547cSRui Paulo 	 * groups will be tried in the indicated order.
11435b9c547cSRui Paulo 	 */
11445b9c547cSRui Paulo 	int *sae_groups;
11455b9c547cSRui Paulo 
11465b9c547cSRui Paulo 	/**
11475b9c547cSRui Paulo 	 * dtim_period - Default DTIM period in Beacon intervals
11485b9c547cSRui Paulo 	 *
11495b9c547cSRui Paulo 	 * This parameter can be used to set the default value for network
11505b9c547cSRui Paulo 	 * blocks that do not specify dtim_period.
11515b9c547cSRui Paulo 	 */
11525b9c547cSRui Paulo 	int dtim_period;
11535b9c547cSRui Paulo 
11545b9c547cSRui Paulo 	/**
11555b9c547cSRui Paulo 	 * beacon_int - Default Beacon interval in TU
11565b9c547cSRui Paulo 	 *
11575b9c547cSRui Paulo 	 * This parameter can be used to set the default value for network
11585b9c547cSRui Paulo 	 * blocks that do not specify beacon_int.
11595b9c547cSRui Paulo 	 */
11605b9c547cSRui Paulo 	int beacon_int;
11615b9c547cSRui Paulo 
11625b9c547cSRui Paulo 	/**
11635b9c547cSRui Paulo 	 * ap_vendor_elements: Vendor specific elements for Beacon/ProbeResp
11645b9c547cSRui Paulo 	 *
11655b9c547cSRui Paulo 	 * This parameter can be used to define additional vendor specific
11665b9c547cSRui Paulo 	 * elements for Beacon and Probe Response frames in AP/P2P GO mode. The
11675b9c547cSRui Paulo 	 * format for these element(s) is a hexdump of the raw information
11685b9c547cSRui Paulo 	 * elements (id+len+payload for one or more elements).
11695b9c547cSRui Paulo 	 */
11705b9c547cSRui Paulo 	struct wpabuf *ap_vendor_elements;
11715b9c547cSRui Paulo 
11725b9c547cSRui Paulo 	/**
11735b9c547cSRui Paulo 	 * ignore_old_scan_res - Ignore scan results older than request
11745b9c547cSRui Paulo 	 *
11755b9c547cSRui Paulo 	 * The driver may have a cache of scan results that makes it return
11765b9c547cSRui Paulo 	 * information that is older than our scan trigger. This parameter can
11775b9c547cSRui Paulo 	 * be used to configure such old information to be ignored instead of
11785b9c547cSRui Paulo 	 * allowing it to update the internal BSS table.
11795b9c547cSRui Paulo 	 */
11805b9c547cSRui Paulo 	int ignore_old_scan_res;
11815b9c547cSRui Paulo 
11825b9c547cSRui Paulo 	/**
11835b9c547cSRui Paulo 	 * sched_scan_interval -  schedule scan interval
11845b9c547cSRui Paulo 	 */
11855b9c547cSRui Paulo 	unsigned int sched_scan_interval;
11865b9c547cSRui Paulo 
11875b9c547cSRui Paulo 	/**
1188*85732ac8SCy Schubert 	 * sched_scan_start_delay - Schedule scan start delay before first scan
1189*85732ac8SCy Schubert 	 *
1190*85732ac8SCy Schubert 	 * Delay (in seconds) before scheduling first scan plan cycle. The
1191*85732ac8SCy Schubert 	 * driver may ignore this parameter and start immediately (or at any
1192*85732ac8SCy Schubert 	 * other time), if this feature is not supported.
1193*85732ac8SCy Schubert 	 */
1194*85732ac8SCy Schubert 	unsigned int sched_scan_start_delay;
1195*85732ac8SCy Schubert 
1196*85732ac8SCy Schubert 	/**
11975b9c547cSRui Paulo 	 * tdls_external_control - External control for TDLS setup requests
11985b9c547cSRui Paulo 	 *
11995b9c547cSRui Paulo 	 * Enable TDLS mode where external programs are given the control
12005b9c547cSRui Paulo 	 * to specify the TDLS link to get established to the driver. The
12015b9c547cSRui Paulo 	 * driver requests the TDLS setup to the supplicant only for the
12025b9c547cSRui Paulo 	 * specified TDLS peers.
12035b9c547cSRui Paulo 	 */
12045b9c547cSRui Paulo 	int tdls_external_control;
12055b9c547cSRui Paulo 
12065b9c547cSRui Paulo 	u8 ip_addr_go[4];
12075b9c547cSRui Paulo 	u8 ip_addr_mask[4];
12085b9c547cSRui Paulo 	u8 ip_addr_start[4];
12095b9c547cSRui Paulo 	u8 ip_addr_end[4];
12105b9c547cSRui Paulo 
12115b9c547cSRui Paulo 	/**
12125b9c547cSRui Paulo 	 * osu_dir - OSU provider information directory
12135b9c547cSRui Paulo 	 *
12145b9c547cSRui Paulo 	 * If set, allow FETCH_OSU control interface command to be used to fetch
12155b9c547cSRui Paulo 	 * OSU provider information into all APs and store the results in this
12165b9c547cSRui Paulo 	 * directory.
12175b9c547cSRui Paulo 	 */
12185b9c547cSRui Paulo 	char *osu_dir;
12195b9c547cSRui Paulo 
12205b9c547cSRui Paulo 	/**
12215b9c547cSRui Paulo 	 * wowlan_triggers - Wake-on-WLAN triggers
12225b9c547cSRui Paulo 	 *
12235b9c547cSRui Paulo 	 * If set, these wowlan triggers will be configured.
12245b9c547cSRui Paulo 	 */
12255b9c547cSRui Paulo 	char *wowlan_triggers;
12265b9c547cSRui Paulo 
12275b9c547cSRui Paulo 	/**
12285b9c547cSRui Paulo 	 * p2p_search_delay - Extra delay between concurrent search iterations
12295b9c547cSRui Paulo 	 *
12305b9c547cSRui Paulo 	 * Add extra delay (in milliseconds) between search iterations when
12315b9c547cSRui Paulo 	 * there is a concurrent operation to make p2p_find friendlier to
12325b9c547cSRui Paulo 	 * concurrent operations by avoiding it from taking 100% of radio
12335b9c547cSRui Paulo 	 * resources.
12345b9c547cSRui Paulo 	 */
12355b9c547cSRui Paulo 	unsigned int p2p_search_delay;
12365b9c547cSRui Paulo 
12375b9c547cSRui Paulo 	/**
12385b9c547cSRui Paulo 	 * mac_addr - MAC address policy default
12395b9c547cSRui Paulo 	 *
12405b9c547cSRui Paulo 	 * 0 = use permanent MAC address
12415b9c547cSRui Paulo 	 * 1 = use random MAC address for each ESS connection
12425b9c547cSRui Paulo 	 * 2 = like 1, but maintain OUI (with local admin bit set)
12435b9c547cSRui Paulo 	 *
12445b9c547cSRui Paulo 	 * By default, permanent MAC address is used unless policy is changed by
12455b9c547cSRui Paulo 	 * the per-network mac_addr parameter. Global mac_addr=1 can be used to
12465b9c547cSRui Paulo 	 * change this default behavior.
12475b9c547cSRui Paulo 	 */
12485b9c547cSRui Paulo 	int mac_addr;
12495b9c547cSRui Paulo 
12505b9c547cSRui Paulo 	/**
12515b9c547cSRui Paulo 	 * rand_addr_lifetime - Lifetime of random MAC address in seconds
12525b9c547cSRui Paulo 	 */
12535b9c547cSRui Paulo 	unsigned int rand_addr_lifetime;
12545b9c547cSRui Paulo 
12555b9c547cSRui Paulo 	/**
12565b9c547cSRui Paulo 	 * preassoc_mac_addr - Pre-association MAC address policy
12575b9c547cSRui Paulo 	 *
12585b9c547cSRui Paulo 	 * 0 = use permanent MAC address
12595b9c547cSRui Paulo 	 * 1 = use random MAC address
12605b9c547cSRui Paulo 	 * 2 = like 1, but maintain OUI (with local admin bit set)
12615b9c547cSRui Paulo 	 */
12625b9c547cSRui Paulo 	int preassoc_mac_addr;
12635b9c547cSRui Paulo 
12645b9c547cSRui Paulo 	/**
12655b9c547cSRui Paulo 	 * key_mgmt_offload - Use key management offload
12665b9c547cSRui Paulo 	 *
12675b9c547cSRui Paulo 	 * Key management offload should be used if the device supports it.
12685b9c547cSRui Paulo 	 * Key management offload is the capability of a device operating as
12695b9c547cSRui Paulo 	 * a station to do the exchange necessary to establish temporal keys
12705b9c547cSRui Paulo 	 * during initial RSN connection, after roaming, or during a PTK
12715b9c547cSRui Paulo 	 * rekeying operation.
12725b9c547cSRui Paulo 	 */
12735b9c547cSRui Paulo 	int key_mgmt_offload;
12745b9c547cSRui Paulo 
12755b9c547cSRui Paulo 	/**
12765b9c547cSRui Paulo 	 * user_mpm - MPM residency
12775b9c547cSRui Paulo 	 *
12785b9c547cSRui Paulo 	 * 0: MPM lives in driver.
12795b9c547cSRui Paulo 	 * 1: wpa_supplicant handles peering and station allocation.
12805b9c547cSRui Paulo 	 *
12815b9c547cSRui Paulo 	 * If AMPE or SAE is enabled, the MPM is always in userspace.
12825b9c547cSRui Paulo 	 */
12835b9c547cSRui Paulo 	int user_mpm;
12845b9c547cSRui Paulo 
12855b9c547cSRui Paulo 	/**
12865b9c547cSRui Paulo 	 * max_peer_links - Maximum number of peer links
12875b9c547cSRui Paulo 	 *
12885b9c547cSRui Paulo 	 * Maximum number of mesh peering currently maintained by the STA.
12895b9c547cSRui Paulo 	 */
12905b9c547cSRui Paulo 	int max_peer_links;
12915b9c547cSRui Paulo 
12925b9c547cSRui Paulo 	/**
12935b9c547cSRui Paulo 	 * cert_in_cb - Whether to include a peer certificate dump in events
12945b9c547cSRui Paulo 	 *
12955b9c547cSRui Paulo 	 * This controls whether peer certificates for authentication server and
12965b9c547cSRui Paulo 	 * its certificate chain are included in EAP peer certificate events.
12975b9c547cSRui Paulo 	 */
12985b9c547cSRui Paulo 	int cert_in_cb;
12995b9c547cSRui Paulo 
13005b9c547cSRui Paulo 	/**
13015b9c547cSRui Paulo 	 * mesh_max_inactivity - Timeout in seconds to detect STA inactivity
13025b9c547cSRui Paulo 	 *
13035b9c547cSRui Paulo 	 * This timeout value is used in mesh STA to clean up inactive stations.
13045b9c547cSRui Paulo 	 * By default: 300 seconds.
13055b9c547cSRui Paulo 	 */
13065b9c547cSRui Paulo 	int mesh_max_inactivity;
13075b9c547cSRui Paulo 
13085b9c547cSRui Paulo 	/**
1309325151a3SRui Paulo 	 * dot11RSNASAERetransPeriod - Timeout to retransmit SAE Auth frame
1310325151a3SRui Paulo 	 *
1311325151a3SRui Paulo 	 * This timeout value is used in mesh STA to retransmit
1312325151a3SRui Paulo 	 * SAE Authentication frame.
1313325151a3SRui Paulo 	 * By default: 1000 milliseconds.
1314325151a3SRui Paulo 	 */
1315325151a3SRui Paulo 	int dot11RSNASAERetransPeriod;
1316325151a3SRui Paulo 
1317325151a3SRui Paulo 	/**
13185b9c547cSRui Paulo 	 * passive_scan - Whether to force passive scan for network connection
13195b9c547cSRui Paulo 	 *
13205b9c547cSRui Paulo 	 * This parameter can be used to force only passive scanning to be used
13215b9c547cSRui Paulo 	 * for network connection cases. It should be noted that this will slow
13225b9c547cSRui Paulo 	 * down scan operations and reduce likelihood of finding the AP. In
13235b9c547cSRui Paulo 	 * addition, some use cases will override this due to functional
13245b9c547cSRui Paulo 	 * requirements, e.g., for finding an AP that uses hidden SSID
13255b9c547cSRui Paulo 	 * (scan_ssid=1) or P2P device discovery.
13265b9c547cSRui Paulo 	 */
13275b9c547cSRui Paulo 	int passive_scan;
13285b9c547cSRui Paulo 
13295b9c547cSRui Paulo 	/**
13305b9c547cSRui Paulo 	 * reassoc_same_bss_optim - Whether to optimize reassoc-to-same-BSS
13315b9c547cSRui Paulo 	 */
13325b9c547cSRui Paulo 	int reassoc_same_bss_optim;
1333325151a3SRui Paulo 
1334325151a3SRui Paulo 	/**
1335325151a3SRui Paulo 	 * wps_priority - Priority for the networks added through WPS
1336325151a3SRui Paulo 	 *
1337325151a3SRui Paulo 	 * This priority value will be set to each network profile that is added
1338325151a3SRui Paulo 	 * by executing the WPS protocol.
1339325151a3SRui Paulo 	 */
1340325151a3SRui Paulo 	int wps_priority;
1341325151a3SRui Paulo 
1342325151a3SRui Paulo 	/**
1343325151a3SRui Paulo 	 * fst_group_id - FST group ID
1344325151a3SRui Paulo 	 */
1345325151a3SRui Paulo 	char *fst_group_id;
1346325151a3SRui Paulo 
1347325151a3SRui Paulo 	/**
1348325151a3SRui Paulo 	 * fst_priority - priority of the interface within the FST group
1349325151a3SRui Paulo 	 */
1350325151a3SRui Paulo 	int fst_priority;
1351325151a3SRui Paulo 
1352325151a3SRui Paulo 	/**
1353325151a3SRui Paulo 	 * fst_llt - default FST LLT (Link-Lost Timeout) to be used for the
1354325151a3SRui Paulo 	 * interface.
1355325151a3SRui Paulo 	 */
1356325151a3SRui Paulo 	int fst_llt;
1357780fb4a2SCy Schubert 
1358780fb4a2SCy Schubert 	 /**
1359780fb4a2SCy Schubert 	  * wpa_rsc_relaxation - RSC relaxation on GTK installation
1360780fb4a2SCy Schubert 	  *
1361780fb4a2SCy Schubert 	  * Values:
1362780fb4a2SCy Schubert 	  * 0 - use the EAPOL-Key RSC value on GTK installation
1363780fb4a2SCy Schubert 	  * 1 - use the null RSC if a bogus RSC value is detected in message 3
1364780fb4a2SCy Schubert 	  * of 4-Way Handshake or message 1 of Group Key Handshake.
1365780fb4a2SCy Schubert 	  */
1366780fb4a2SCy Schubert 	 int wpa_rsc_relaxation;
1367780fb4a2SCy Schubert 
1368780fb4a2SCy Schubert 	/**
1369780fb4a2SCy Schubert 	 * sched_scan_plans - Scan plans for scheduled scan
1370780fb4a2SCy Schubert 	 *
1371780fb4a2SCy Schubert 	 * Each scan plan specifies the interval between scans and the number of
1372780fb4a2SCy Schubert 	 * iterations. The last scan plan only specifies the scan interval and
1373780fb4a2SCy Schubert 	 * will be run infinitely.
1374780fb4a2SCy Schubert 	 *
1375780fb4a2SCy Schubert 	 * format: <interval:iterations> <interval2:iterations2> ... <interval>
1376780fb4a2SCy Schubert 	 */
1377780fb4a2SCy Schubert 	 char *sched_scan_plans;
1378780fb4a2SCy Schubert 
1379780fb4a2SCy Schubert #ifdef CONFIG_MBO
1380780fb4a2SCy Schubert 	/**
1381780fb4a2SCy Schubert 	 * non_pref_chan - Non-preferred channels list, separated by spaces.
1382780fb4a2SCy Schubert 	 *
1383780fb4a2SCy Schubert 	 * format: op_class:chan:preference:reason<:detail>
1384780fb4a2SCy Schubert 	 * Detail is optional.
1385780fb4a2SCy Schubert 	 */
1386780fb4a2SCy Schubert 	char *non_pref_chan;
1387780fb4a2SCy Schubert 
1388780fb4a2SCy Schubert 	/**
1389780fb4a2SCy Schubert 	 * mbo_cell_capa - Cellular capabilities for MBO
1390780fb4a2SCy Schubert 	 */
1391780fb4a2SCy Schubert 	enum mbo_cellular_capa mbo_cell_capa;
1392*85732ac8SCy Schubert 
1393*85732ac8SCy Schubert 	/**
1394*85732ac8SCy Schubert 	 * disassoc_imminent_rssi_threshold - RSSI threshold of candidate AP
1395*85732ac8SCy Schubert 	 * when disassociation imminent is set.
1396*85732ac8SCy Schubert 	 */
1397*85732ac8SCy Schubert 	int disassoc_imminent_rssi_threshold;
1398*85732ac8SCy Schubert 
1399*85732ac8SCy Schubert 	/**
1400*85732ac8SCy Schubert 	 * oce - Enable OCE in STA and/or STA-CFON mode
1401*85732ac8SCy Schubert 	 *  - Set BIT(0) to enable OCE in non-AP STA mode
1402*85732ac8SCy Schubert 	 *  - Set BIT(1) to enable OCE in STA-CFON mode
1403*85732ac8SCy Schubert 	 */
1404*85732ac8SCy Schubert 	unsigned int oce;
1405780fb4a2SCy Schubert #endif /* CONFIG_MBO */
1406780fb4a2SCy Schubert 
1407780fb4a2SCy Schubert 	/**
1408780fb4a2SCy Schubert 	 * gas_address3 - GAS Address3 field behavior
1409780fb4a2SCy Schubert 	 *
1410780fb4a2SCy Schubert 	 * Values:
1411780fb4a2SCy Schubert 	 * 0 - P2P specification (Address3 = AP BSSID)
1412780fb4a2SCy Schubert 	 * 1 = IEEE 802.11 standard compliant (Address3 = Wildcard BSSID when
1413780fb4a2SCy Schubert 	 *	sent to not-associated AP; if associated, AP BSSID)
1414780fb4a2SCy Schubert 	 */
1415780fb4a2SCy Schubert 	int gas_address3;
1416780fb4a2SCy Schubert 
1417780fb4a2SCy Schubert 	/**
1418780fb4a2SCy Schubert 	 * ftm_responder - Publish FTM (fine timing measurement)
1419780fb4a2SCy Schubert 	 * responder functionality
1420780fb4a2SCy Schubert 	 *
1421780fb4a2SCy Schubert 	 * Values:
1422780fb4a2SCy Schubert 	 * 0 - do not publish FTM responder functionality (Default)
1423780fb4a2SCy Schubert 	 * 1 - publish FTM responder functionality in
1424780fb4a2SCy Schubert 	 *	bit 70 of Extended Capabilities element
1425780fb4a2SCy Schubert 	 * Note, actual FTM responder operation is managed outside
1426780fb4a2SCy Schubert 	 * wpa_supplicant.
1427780fb4a2SCy Schubert 	 */
1428780fb4a2SCy Schubert 	int ftm_responder;
1429780fb4a2SCy Schubert 
1430780fb4a2SCy Schubert 	/**
1431780fb4a2SCy Schubert 	 * ftm_initiator - Publish FTM (fine timing measurement)
1432780fb4a2SCy Schubert 	 * initiator functionality
1433780fb4a2SCy Schubert 	 *
1434780fb4a2SCy Schubert 	 * Values:
1435780fb4a2SCy Schubert 	 * 0 - do not publish FTM initiator functionality (Default)
1436780fb4a2SCy Schubert 	 * 1 - publish FTM initiator functionality in
1437780fb4a2SCy Schubert 	 *	bit 71 of Extended Capabilities element
1438780fb4a2SCy Schubert 	 * Note, actual FTM initiator operation is managed outside
1439780fb4a2SCy Schubert 	 * wpa_supplicant.
1440780fb4a2SCy Schubert 	 */
1441780fb4a2SCy Schubert 	int ftm_initiator;
1442*85732ac8SCy Schubert 
1443*85732ac8SCy Schubert 	/**
1444*85732ac8SCy Schubert 	 * gas_rand_addr_lifetime - Lifetime of random MAC address for ANQP in
1445*85732ac8SCy Schubert 	 *	seconds
1446*85732ac8SCy Schubert 	 */
1447*85732ac8SCy Schubert 	unsigned int gas_rand_addr_lifetime;
1448*85732ac8SCy Schubert 
1449*85732ac8SCy Schubert 	/**
1450*85732ac8SCy Schubert 	 * gas_rand_mac_addr - GAS MAC address policy
1451*85732ac8SCy Schubert 	 *
1452*85732ac8SCy Schubert 	 * 0 = use permanent MAC address
1453*85732ac8SCy Schubert 	 * 1 = use random MAC address
1454*85732ac8SCy Schubert 	 * 2 = like 1, but maintain OUI (with local admin bit set)
1455*85732ac8SCy Schubert 	 */
1456*85732ac8SCy Schubert 	int gas_rand_mac_addr;
1457*85732ac8SCy Schubert 
1458*85732ac8SCy Schubert 	/**
1459*85732ac8SCy Schubert 	 * dpp_config_processing - How to process DPP configuration
1460*85732ac8SCy Schubert 	 *
1461*85732ac8SCy Schubert 	 * 0 = report received configuration to an external program for
1462*85732ac8SCy Schubert 	 *	processing; do not generate any network profile internally
1463*85732ac8SCy Schubert 	 * 1 = report received configuration to an external program and generate
1464*85732ac8SCy Schubert 	 *	a network profile internally, but do not automatically connect
1465*85732ac8SCy Schubert 	 *	to the created (disabled) profile; the network profile id is
1466*85732ac8SCy Schubert 	 *	reported to external programs
1467*85732ac8SCy Schubert 	 * 2 = report received configuration to an external program, generate
1468*85732ac8SCy Schubert 	 *	a network profile internally, try to connect to the created
1469*85732ac8SCy Schubert 	 *	profile automatically
1470*85732ac8SCy Schubert 	 */
1471*85732ac8SCy Schubert 	int dpp_config_processing;
1472*85732ac8SCy Schubert 
1473*85732ac8SCy Schubert 	/**
1474*85732ac8SCy Schubert 	 * coloc_intf_reporting - Colocated interference reporting
1475*85732ac8SCy Schubert 	 *
1476*85732ac8SCy Schubert 	 * dot11CoLocIntfReportingActivated
1477*85732ac8SCy Schubert 	 * 0 = disabled (false)
1478*85732ac8SCy Schubert 	 * 1 = enabled (true)
1479*85732ac8SCy Schubert 	 */
1480*85732ac8SCy Schubert 	int coloc_intf_reporting;
148139beb93cSSam Leffler };
148239beb93cSSam Leffler 
148339beb93cSSam Leffler 
148439beb93cSSam Leffler /* Prototypes for common functions from config.c */
148539beb93cSSam Leffler 
148639beb93cSSam Leffler void wpa_config_free(struct wpa_config *ssid);
148739beb93cSSam Leffler void wpa_config_free_ssid(struct wpa_ssid *ssid);
1488f05cddf9SRui Paulo void wpa_config_foreach_network(struct wpa_config *config,
1489f05cddf9SRui Paulo 				void (*func)(void *, struct wpa_ssid *),
1490f05cddf9SRui Paulo 				void *arg);
149139beb93cSSam Leffler struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id);
149239beb93cSSam Leffler struct wpa_ssid * wpa_config_add_network(struct wpa_config *config);
149339beb93cSSam Leffler int wpa_config_remove_network(struct wpa_config *config, int id);
149439beb93cSSam Leffler void wpa_config_set_network_defaults(struct wpa_ssid *ssid);
149539beb93cSSam Leffler int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
149639beb93cSSam Leffler 		   int line);
1497f05cddf9SRui Paulo int wpa_config_set_quoted(struct wpa_ssid *ssid, const char *var,
1498f05cddf9SRui Paulo 			  const char *value);
14995b9c547cSRui Paulo int wpa_config_dump_values(struct wpa_config *config, char *buf,
15005b9c547cSRui Paulo 			   size_t buflen);
15015b9c547cSRui Paulo int wpa_config_get_value(const char *name, struct wpa_config *config,
15025b9c547cSRui Paulo 			 char *buf, size_t buflen);
15035b9c547cSRui Paulo 
1504e28a4053SRui Paulo char ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys);
150539beb93cSSam Leffler char * wpa_config_get(struct wpa_ssid *ssid, const char *var);
150639beb93cSSam Leffler char * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var);
150739beb93cSSam Leffler void wpa_config_update_psk(struct wpa_ssid *ssid);
150839beb93cSSam Leffler int wpa_config_add_prio_network(struct wpa_config *config,
150939beb93cSSam Leffler 				struct wpa_ssid *ssid);
1510e28a4053SRui Paulo int wpa_config_update_prio_list(struct wpa_config *config);
151139beb93cSSam Leffler const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
151239beb93cSSam Leffler 						   const char *name);
151339beb93cSSam Leffler void wpa_config_set_blob(struct wpa_config *config,
151439beb93cSSam Leffler 			 struct wpa_config_blob *blob);
151539beb93cSSam Leffler void wpa_config_free_blob(struct wpa_config_blob *blob);
151639beb93cSSam Leffler int wpa_config_remove_blob(struct wpa_config *config, const char *name);
15175b9c547cSRui Paulo void wpa_config_flush_blobs(struct wpa_config *config);
151839beb93cSSam Leffler 
1519f05cddf9SRui Paulo struct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id);
1520f05cddf9SRui Paulo struct wpa_cred * wpa_config_add_cred(struct wpa_config *config);
1521f05cddf9SRui Paulo int wpa_config_remove_cred(struct wpa_config *config, int id);
1522f05cddf9SRui Paulo void wpa_config_free_cred(struct wpa_cred *cred);
1523f05cddf9SRui Paulo int wpa_config_set_cred(struct wpa_cred *cred, const char *var,
1524f05cddf9SRui Paulo 			const char *value, int line);
15255b9c547cSRui Paulo char * wpa_config_get_cred_no_key(struct wpa_cred *cred, const char *var);
1526f05cddf9SRui Paulo 
152739beb93cSSam Leffler struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
152839beb93cSSam Leffler 					   const char *driver_param);
152939beb93cSSam Leffler #ifndef CONFIG_NO_STDOUT_DEBUG
153039beb93cSSam Leffler void wpa_config_debug_dump_networks(struct wpa_config *config);
153139beb93cSSam Leffler #else /* CONFIG_NO_STDOUT_DEBUG */
153239beb93cSSam Leffler #define wpa_config_debug_dump_networks(c) do { } while (0)
153339beb93cSSam Leffler #endif /* CONFIG_NO_STDOUT_DEBUG */
153439beb93cSSam Leffler 
153539beb93cSSam Leffler 
1536f05cddf9SRui Paulo /* Prototypes for common functions from config.c */
1537f05cddf9SRui Paulo int wpa_config_process_global(struct wpa_config *config, char *pos, int line);
1538f05cddf9SRui Paulo 
1539780fb4a2SCy Schubert int wpa_config_get_num_global_field_names(void);
1540780fb4a2SCy Schubert 
1541780fb4a2SCy Schubert const char * wpa_config_get_global_field_name(unsigned int i, int *no_var);
1542f05cddf9SRui Paulo 
154339beb93cSSam Leffler /* Prototypes for backend specific functions from the selected config_*.c */
154439beb93cSSam Leffler 
154539beb93cSSam Leffler /**
154639beb93cSSam Leffler  * wpa_config_read - Read and parse configuration database
154739beb93cSSam Leffler  * @name: Name of the configuration (e.g., path and file name for the
154839beb93cSSam Leffler  * configuration file)
15495b9c547cSRui Paulo  * @cfgp: Pointer to previously allocated configuration data or %NULL if none
155039beb93cSSam Leffler  * Returns: Pointer to allocated configuration data or %NULL on failure
155139beb93cSSam Leffler  *
155239beb93cSSam Leffler  * This function reads configuration data, parses its contents, and allocates
155339beb93cSSam Leffler  * data structures needed for storing configuration information. The allocated
155439beb93cSSam Leffler  * data can be freed with wpa_config_free().
155539beb93cSSam Leffler  *
155639beb93cSSam Leffler  * Each configuration backend needs to implement this function.
155739beb93cSSam Leffler  */
15585b9c547cSRui Paulo struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp);
155939beb93cSSam Leffler 
156039beb93cSSam Leffler /**
156139beb93cSSam Leffler  * wpa_config_write - Write or update configuration data
156239beb93cSSam Leffler  * @name: Name of the configuration (e.g., path and file name for the
156339beb93cSSam Leffler  * configuration file)
156439beb93cSSam Leffler  * @config: Configuration data from wpa_config_read()
156539beb93cSSam Leffler  * Returns: 0 on success, -1 on failure
156639beb93cSSam Leffler  *
156739beb93cSSam Leffler  * This function write all configuration data into an external database (e.g.,
156839beb93cSSam Leffler  * a text file) in a format that can be read with wpa_config_read(). This can
156939beb93cSSam Leffler  * be used to allow wpa_supplicant to update its configuration, e.g., when a
157039beb93cSSam Leffler  * new network is added or a password is changed.
157139beb93cSSam Leffler  *
157239beb93cSSam Leffler  * Each configuration backend needs to implement this function.
157339beb93cSSam Leffler  */
157439beb93cSSam Leffler int wpa_config_write(const char *name, struct wpa_config *config);
157539beb93cSSam Leffler 
157639beb93cSSam Leffler #endif /* CONFIG_H */
1577