config.h revision 289549
1189251Ssam/* 2189251Ssam * WPA Supplicant / Configuration file structures 3252726Srpaulo * Copyright (c) 2003-2012, Jouni Malinen <j@w1.fi> 4189251Ssam * 5252726Srpaulo * This software may be distributed under the terms of the BSD license. 6252726Srpaulo * See README for more details. 7189251Ssam */ 8189251Ssam 9189251Ssam#ifndef CONFIG_H 10189251Ssam#define CONFIG_H 11189251Ssam 12189251Ssam#define DEFAULT_EAPOL_VERSION 1 13189251Ssam#ifdef CONFIG_NO_SCAN_PROCESSING 14189251Ssam#define DEFAULT_AP_SCAN 2 15189251Ssam#else /* CONFIG_NO_SCAN_PROCESSING */ 16189251Ssam#define DEFAULT_AP_SCAN 1 17189251Ssam#endif /* CONFIG_NO_SCAN_PROCESSING */ 18281806Srpaulo#define DEFAULT_USER_MPM 1 19281806Srpaulo#define DEFAULT_MAX_PEER_LINKS 99 20281806Srpaulo#define DEFAULT_MESH_MAX_INACTIVITY 300 21289549Srpaulo/* 22289549Srpaulo * The default dot11RSNASAERetransPeriod is defined as 40 ms in the standard, 23289549Srpaulo * but use 1000 ms in practice to avoid issues on low power CPUs. 24289549Srpaulo */ 25289549Srpaulo#define DEFAULT_DOT11_RSNA_SAE_RETRANS_PERIOD 1000 26189251Ssam#define DEFAULT_FAST_REAUTH 1 27252726Srpaulo#define DEFAULT_P2P_GO_INTENT 7 28252726Srpaulo#define DEFAULT_P2P_INTRA_BSS 1 29252726Srpaulo#define DEFAULT_P2P_GO_MAX_INACTIVITY (5 * 60) 30281806Srpaulo#define DEFAULT_P2P_OPTIMIZE_LISTEN_CHAN 0 31214734Srpaulo#define DEFAULT_BSS_MAX_COUNT 200 32252726Srpaulo#define DEFAULT_BSS_EXPIRATION_AGE 180 33252726Srpaulo#define DEFAULT_BSS_EXPIRATION_SCAN_COUNT 2 34252726Srpaulo#define DEFAULT_MAX_NUM_STA 128 35252726Srpaulo#define DEFAULT_ACCESS_NETWORK_TYPE 15 36281806Srpaulo#define DEFAULT_SCAN_CUR_FREQ 0 37281806Srpaulo#define DEFAULT_P2P_SEARCH_DELAY 500 38281806Srpaulo#define DEFAULT_RAND_ADDR_LIFETIME 60 39281806Srpaulo#define DEFAULT_KEY_MGMT_OFFLOAD 1 40281806Srpaulo#define DEFAULT_CERT_IN_CB 1 41281806Srpaulo#define DEFAULT_P2P_GO_CTWINDOW 0 42189251Ssam 43189251Ssam#include "config_ssid.h" 44252726Srpaulo#include "wps/wps.h" 45289549Srpaulo#include "common/ieee802_11_defs.h" 46252726Srpaulo#include "common/ieee802_11_common.h" 47189251Ssam 48189251Ssam 49252726Srpaulostruct wpa_cred { 50252726Srpaulo /** 51252726Srpaulo * next - Next credential in the list 52252726Srpaulo * 53252726Srpaulo * This pointer can be used to iterate over all credentials. The head 54252726Srpaulo * of this list is stored in the cred field of struct wpa_config. 55252726Srpaulo */ 56252726Srpaulo struct wpa_cred *next; 57252726Srpaulo 58252726Srpaulo /** 59252726Srpaulo * id - Unique id for the credential 60252726Srpaulo * 61252726Srpaulo * This identifier is used as a unique identifier for each credential 62252726Srpaulo * block when using the control interface. Each credential is allocated 63252726Srpaulo * an id when it is being created, either when reading the 64252726Srpaulo * configuration file or when a new credential is added through the 65252726Srpaulo * control interface. 66252726Srpaulo */ 67252726Srpaulo int id; 68252726Srpaulo 69252726Srpaulo /** 70281806Srpaulo * temporary - Whether this credential is temporary and not to be saved 71281806Srpaulo */ 72281806Srpaulo int temporary; 73281806Srpaulo 74281806Srpaulo /** 75252726Srpaulo * priority - Priority group 76252726Srpaulo * 77252726Srpaulo * By default, all networks and credentials get the same priority group 78252726Srpaulo * (0). This field can be used to give higher priority for credentials 79252726Srpaulo * (and similarly in struct wpa_ssid for network blocks) to change the 80252726Srpaulo * Interworking automatic networking selection behavior. The matching 81252726Srpaulo * network (based on either an enabled network block or a credential) 82252726Srpaulo * with the highest priority value will be selected. 83252726Srpaulo */ 84252726Srpaulo int priority; 85252726Srpaulo 86252726Srpaulo /** 87252726Srpaulo * pcsc - Use PC/SC and SIM/USIM card 88252726Srpaulo */ 89252726Srpaulo int pcsc; 90252726Srpaulo 91252726Srpaulo /** 92252726Srpaulo * realm - Home Realm for Interworking 93252726Srpaulo */ 94252726Srpaulo char *realm; 95252726Srpaulo 96252726Srpaulo /** 97252726Srpaulo * username - Username for Interworking network selection 98252726Srpaulo */ 99252726Srpaulo char *username; 100252726Srpaulo 101252726Srpaulo /** 102252726Srpaulo * password - Password for Interworking network selection 103252726Srpaulo */ 104252726Srpaulo char *password; 105252726Srpaulo 106252726Srpaulo /** 107252726Srpaulo * ext_password - Whether password is a name for external storage 108252726Srpaulo */ 109252726Srpaulo int ext_password; 110252726Srpaulo 111252726Srpaulo /** 112252726Srpaulo * ca_cert - CA certificate for Interworking network selection 113252726Srpaulo */ 114252726Srpaulo char *ca_cert; 115252726Srpaulo 116252726Srpaulo /** 117252726Srpaulo * client_cert - File path to client certificate file (PEM/DER) 118252726Srpaulo * 119252726Srpaulo * This field is used with Interworking networking selection for a case 120252726Srpaulo * where client certificate/private key is used for authentication 121252726Srpaulo * (EAP-TLS). Full path to the file should be used since working 122252726Srpaulo * directory may change when wpa_supplicant is run in the background. 123252726Srpaulo * 124252726Srpaulo * Alternatively, a named configuration blob can be used by setting 125252726Srpaulo * this to blob://blob_name. 126252726Srpaulo */ 127252726Srpaulo char *client_cert; 128252726Srpaulo 129252726Srpaulo /** 130252726Srpaulo * private_key - File path to client private key file (PEM/DER/PFX) 131252726Srpaulo * 132252726Srpaulo * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be 133252726Srpaulo * commented out. Both the private key and certificate will be read 134252726Srpaulo * from the PKCS#12 file in this case. Full path to the file should be 135252726Srpaulo * used since working directory may change when wpa_supplicant is run 136252726Srpaulo * in the background. 137252726Srpaulo * 138252726Srpaulo * Windows certificate store can be used by leaving client_cert out and 139252726Srpaulo * configuring private_key in one of the following formats: 140252726Srpaulo * 141252726Srpaulo * cert://substring_to_match 142252726Srpaulo * 143252726Srpaulo * hash://certificate_thumbprint_in_hex 144252726Srpaulo * 145252726Srpaulo * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4" 146252726Srpaulo * 147252726Srpaulo * Note that when running wpa_supplicant as an application, the user 148252726Srpaulo * certificate store (My user account) is used, whereas computer store 149252726Srpaulo * (Computer account) is used when running wpasvc as a service. 150252726Srpaulo * 151252726Srpaulo * Alternatively, a named configuration blob can be used by setting 152252726Srpaulo * this to blob://blob_name. 153252726Srpaulo */ 154252726Srpaulo char *private_key; 155252726Srpaulo 156252726Srpaulo /** 157252726Srpaulo * private_key_passwd - Password for private key file 158252726Srpaulo */ 159252726Srpaulo char *private_key_passwd; 160252726Srpaulo 161252726Srpaulo /** 162252726Srpaulo * imsi - IMSI in <MCC> | <MNC> | '-' | <MSIN> format 163252726Srpaulo */ 164252726Srpaulo char *imsi; 165252726Srpaulo 166252726Srpaulo /** 167252726Srpaulo * milenage - Milenage parameters for SIM/USIM simulator in 168252726Srpaulo * <Ki>:<OPc>:<SQN> format 169252726Srpaulo */ 170252726Srpaulo char *milenage; 171252726Srpaulo 172252726Srpaulo /** 173281806Srpaulo * domain_suffix_match - Constraint for server domain name 174252726Srpaulo * 175281806Srpaulo * If set, this FQDN is used as a suffix match requirement for the AAA 176281806Srpaulo * server certificate in SubjectAltName dNSName element(s). If a 177281806Srpaulo * matching dNSName is found, this constraint is met. If no dNSName 178281806Srpaulo * values are present, this constraint is matched against SubjectName CN 179281806Srpaulo * using same suffix match comparison. Suffix match here means that the 180281806Srpaulo * host/domain name is compared one label at a time starting from the 181281806Srpaulo * top-level domain and all the labels in @domain_suffix_match shall be 182281806Srpaulo * included in the certificate. The certificate may include additional 183281806Srpaulo * sub-level labels in addition to the required labels. 184281806Srpaulo * 185281806Srpaulo * For example, domain_suffix_match=example.com would match 186281806Srpaulo * test.example.com but would not match test-example.com. 187281806Srpaulo */ 188281806Srpaulo char *domain_suffix_match; 189281806Srpaulo 190281806Srpaulo /** 191281806Srpaulo * domain - Home service provider FQDN(s) 192281806Srpaulo * 193252726Srpaulo * This is used to compare against the Domain Name List to figure out 194281806Srpaulo * whether the AP is operated by the Home SP. Multiple domain entries 195281806Srpaulo * can be used to configure alternative FQDNs that will be considered 196281806Srpaulo * home networks. 197252726Srpaulo */ 198281806Srpaulo char **domain; 199252726Srpaulo 200252726Srpaulo /** 201281806Srpaulo * num_domain - Number of FQDNs in the domain array 202281806Srpaulo */ 203281806Srpaulo size_t num_domain; 204281806Srpaulo 205281806Srpaulo /** 206252726Srpaulo * roaming_consortium - Roaming Consortium OI 207252726Srpaulo * 208252726Srpaulo * If roaming_consortium_len is non-zero, this field contains the 209252726Srpaulo * Roaming Consortium OI that can be used to determine which access 210252726Srpaulo * points support authentication with this credential. This is an 211252726Srpaulo * alternative to the use of the realm parameter. When using Roaming 212252726Srpaulo * Consortium to match the network, the EAP parameters need to be 213252726Srpaulo * pre-configured with the credential since the NAI Realm information 214252726Srpaulo * may not be available or fetched. 215252726Srpaulo */ 216252726Srpaulo u8 roaming_consortium[15]; 217252726Srpaulo 218252726Srpaulo /** 219252726Srpaulo * roaming_consortium_len - Length of roaming_consortium 220252726Srpaulo */ 221252726Srpaulo size_t roaming_consortium_len; 222252726Srpaulo 223281806Srpaulo u8 required_roaming_consortium[15]; 224281806Srpaulo size_t required_roaming_consortium_len; 225281806Srpaulo 226252726Srpaulo /** 227252726Srpaulo * eap_method - EAP method to use 228252726Srpaulo * 229252726Srpaulo * Pre-configured EAP method to use with this credential or %NULL to 230252726Srpaulo * indicate no EAP method is selected, i.e., the method will be 231252726Srpaulo * selected automatically based on ANQP information. 232252726Srpaulo */ 233252726Srpaulo struct eap_method_type *eap_method; 234252726Srpaulo 235252726Srpaulo /** 236252726Srpaulo * phase1 - Phase 1 (outer authentication) parameters 237252726Srpaulo * 238252726Srpaulo * Pre-configured EAP parameters or %NULL. 239252726Srpaulo */ 240252726Srpaulo char *phase1; 241252726Srpaulo 242252726Srpaulo /** 243252726Srpaulo * phase2 - Phase 2 (inner authentication) parameters 244252726Srpaulo * 245252726Srpaulo * Pre-configured EAP parameters or %NULL. 246252726Srpaulo */ 247252726Srpaulo char *phase2; 248252726Srpaulo 249252726Srpaulo struct excluded_ssid { 250289549Srpaulo u8 ssid[SSID_MAX_LEN]; 251252726Srpaulo size_t ssid_len; 252252726Srpaulo } *excluded_ssid; 253252726Srpaulo size_t num_excluded_ssid; 254281806Srpaulo 255281806Srpaulo struct roaming_partner { 256281806Srpaulo char fqdn[128]; 257281806Srpaulo int exact_match; 258281806Srpaulo u8 priority; 259281806Srpaulo char country[3]; 260281806Srpaulo } *roaming_partner; 261281806Srpaulo size_t num_roaming_partner; 262281806Srpaulo 263281806Srpaulo int update_identifier; 264281806Srpaulo 265281806Srpaulo /** 266281806Srpaulo * provisioning_sp - FQDN of the SP that provisioned the credential 267281806Srpaulo */ 268281806Srpaulo char *provisioning_sp; 269281806Srpaulo 270281806Srpaulo /** 271281806Srpaulo * sp_priority - Credential priority within a provisioning SP 272281806Srpaulo * 273281806Srpaulo * This is the priority of the credential among all credentials 274281806Srpaulo * provisionined by the same SP (i.e., for entries that have identical 275281806Srpaulo * provisioning_sp value). The range of this priority is 0-255 with 0 276281806Srpaulo * being the highest and 255 the lower priority. 277281806Srpaulo */ 278281806Srpaulo int sp_priority; 279281806Srpaulo 280281806Srpaulo unsigned int min_dl_bandwidth_home; 281281806Srpaulo unsigned int min_ul_bandwidth_home; 282281806Srpaulo unsigned int min_dl_bandwidth_roaming; 283281806Srpaulo unsigned int min_ul_bandwidth_roaming; 284281806Srpaulo 285281806Srpaulo /** 286281806Srpaulo * max_bss_load - Maximum BSS Load Channel Utilization (1..255) 287281806Srpaulo * This value is used as the maximum channel utilization for network 288281806Srpaulo * selection purposes for home networks. If the AP does not advertise 289281806Srpaulo * BSS Load or if the limit would prevent any connection, this 290281806Srpaulo * constraint will be ignored. 291281806Srpaulo */ 292281806Srpaulo unsigned int max_bss_load; 293281806Srpaulo 294281806Srpaulo unsigned int num_req_conn_capab; 295281806Srpaulo u8 *req_conn_capab_proto; 296281806Srpaulo int **req_conn_capab_port; 297281806Srpaulo 298281806Srpaulo /** 299281806Srpaulo * ocsp - Whether to use/require OCSP to check server certificate 300281806Srpaulo * 301281806Srpaulo * 0 = do not use OCSP stapling (TLS certificate status extension) 302281806Srpaulo * 1 = try to use OCSP stapling, but not require response 303281806Srpaulo * 2 = require valid OCSP stapling response 304281806Srpaulo */ 305281806Srpaulo int ocsp; 306281806Srpaulo 307281806Srpaulo /** 308281806Srpaulo * sim_num - User selected SIM identifier 309281806Srpaulo * 310281806Srpaulo * This variable is used for identifying which SIM is used if the system 311281806Srpaulo * has more than one. 312281806Srpaulo */ 313281806Srpaulo int sim_num; 314252726Srpaulo}; 315252726Srpaulo 316252726Srpaulo 317252726Srpaulo#define CFG_CHANGED_DEVICE_NAME BIT(0) 318252726Srpaulo#define CFG_CHANGED_CONFIG_METHODS BIT(1) 319252726Srpaulo#define CFG_CHANGED_DEVICE_TYPE BIT(2) 320252726Srpaulo#define CFG_CHANGED_OS_VERSION BIT(3) 321252726Srpaulo#define CFG_CHANGED_UUID BIT(4) 322252726Srpaulo#define CFG_CHANGED_COUNTRY BIT(5) 323252726Srpaulo#define CFG_CHANGED_SEC_DEVICE_TYPE BIT(6) 324252726Srpaulo#define CFG_CHANGED_P2P_SSID_POSTFIX BIT(7) 325252726Srpaulo#define CFG_CHANGED_WPS_STRING BIT(8) 326252726Srpaulo#define CFG_CHANGED_P2P_INTRA_BSS BIT(9) 327252726Srpaulo#define CFG_CHANGED_VENDOR_EXTENSION BIT(10) 328252726Srpaulo#define CFG_CHANGED_P2P_LISTEN_CHANNEL BIT(11) 329252726Srpaulo#define CFG_CHANGED_P2P_OPER_CHANNEL BIT(12) 330252726Srpaulo#define CFG_CHANGED_P2P_PREF_CHAN BIT(13) 331252726Srpaulo#define CFG_CHANGED_EXT_PW_BACKEND BIT(14) 332281806Srpaulo#define CFG_CHANGED_NFC_PASSWORD_TOKEN BIT(15) 333281806Srpaulo#define CFG_CHANGED_P2P_PASSPHRASE_LEN BIT(16) 334252726Srpaulo 335189251Ssam/** 336189251Ssam * struct wpa_config - wpa_supplicant configuration data 337189251Ssam * 338189251Ssam * This data structure is presents the per-interface (radio) configuration 339189251Ssam * data. In many cases, there is only one struct wpa_config instance, but if 340189251Ssam * more than one network interface is being controlled, one instance is used 341189251Ssam * for each. 342189251Ssam */ 343189251Ssamstruct wpa_config { 344189251Ssam /** 345189251Ssam * ssid - Head of the global network list 346189251Ssam * 347189251Ssam * This is the head for the list of all the configured networks. 348189251Ssam */ 349189251Ssam struct wpa_ssid *ssid; 350189251Ssam 351189251Ssam /** 352189251Ssam * pssid - Per-priority network lists (in priority order) 353189251Ssam */ 354189251Ssam struct wpa_ssid **pssid; 355189251Ssam 356189251Ssam /** 357189251Ssam * num_prio - Number of different priorities used in the pssid lists 358189251Ssam * 359189251Ssam * This indicates how many per-priority network lists are included in 360189251Ssam * pssid. 361189251Ssam */ 362189251Ssam int num_prio; 363189251Ssam 364189251Ssam /** 365252726Srpaulo * cred - Head of the credential list 366252726Srpaulo * 367252726Srpaulo * This is the head for the list of all the configured credentials. 368252726Srpaulo */ 369252726Srpaulo struct wpa_cred *cred; 370252726Srpaulo 371252726Srpaulo /** 372189251Ssam * eapol_version - IEEE 802.1X/EAPOL version number 373189251Ssam * 374189251Ssam * wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which 375189251Ssam * defines EAPOL version 2. However, there are many APs that do not 376189251Ssam * handle the new version number correctly (they seem to drop the 377189251Ssam * frames completely). In order to make wpa_supplicant interoperate 378189251Ssam * with these APs, the version number is set to 1 by default. This 379189251Ssam * configuration value can be used to set it to the new version (2). 380189251Ssam */ 381189251Ssam int eapol_version; 382189251Ssam 383189251Ssam /** 384189251Ssam * ap_scan - AP scanning/selection 385189251Ssam * 386189251Ssam * By default, wpa_supplicant requests driver to perform AP 387189251Ssam * scanning and then uses the scan results to select a 388189251Ssam * suitable AP. Another alternative is to allow the driver to 389189251Ssam * take care of AP scanning and selection and use 390189251Ssam * wpa_supplicant just to process EAPOL frames based on IEEE 391189251Ssam * 802.11 association information from the driver. 392189251Ssam * 393189251Ssam * 1: wpa_supplicant initiates scanning and AP selection (default). 394189251Ssam * 395189251Ssam * 0: Driver takes care of scanning, AP selection, and IEEE 802.11 396189251Ssam * association parameters (e.g., WPA IE generation); this mode can 397189251Ssam * also be used with non-WPA drivers when using IEEE 802.1X mode; 398189251Ssam * do not try to associate with APs (i.e., external program needs 399189251Ssam * to control association). This mode must also be used when using 400189251Ssam * wired Ethernet drivers. 401189251Ssam * 402189251Ssam * 2: like 0, but associate with APs using security policy and SSID 403189251Ssam * (but not BSSID); this can be used, e.g., with ndiswrapper and NDIS 404189251Ssam * drivers to enable operation with hidden SSIDs and optimized roaming; 405189251Ssam * in this mode, the network blocks in the configuration are tried 406189251Ssam * one by one until the driver reports successful association; each 407189251Ssam * network block should have explicit security policy (i.e., only one 408189251Ssam * option in the lists) for key_mgmt, pairwise, group, proto variables. 409289549Srpaulo * 410289549Srpaulo * Note: ap_scan=2 should not be used with the nl80211 driver interface 411289549Srpaulo * (the current Linux interface). ap_scan=1 is optimized work working 412289549Srpaulo * with nl80211. For finding networks using hidden SSID, scan_ssid=1 in 413289549Srpaulo * the network block can be used with nl80211. 414189251Ssam */ 415189251Ssam int ap_scan; 416189251Ssam 417189251Ssam /** 418281806Srpaulo * bgscan - Background scan and roaming parameters or %NULL if none 419281806Srpaulo * 420281806Srpaulo * This is an optional set of parameters for background scanning and 421281806Srpaulo * roaming within a network (ESS). For more detailed information see 422281806Srpaulo * ssid block documentation. 423281806Srpaulo * 424281806Srpaulo * The variable defines default bgscan behavior for all BSS station 425281806Srpaulo * networks except for those which have their own bgscan configuration. 426281806Srpaulo */ 427281806Srpaulo char *bgscan; 428281806Srpaulo 429281806Srpaulo /** 430252726Srpaulo * disable_scan_offload - Disable automatic offloading of scan requests 431252726Srpaulo * 432252726Srpaulo * By default, %wpa_supplicant tries to offload scanning if the driver 433252726Srpaulo * indicates support for this (sched_scan). This configuration 434252726Srpaulo * parameter can be used to disable this offloading mechanism. 435252726Srpaulo */ 436252726Srpaulo int disable_scan_offload; 437252726Srpaulo 438252726Srpaulo /** 439189251Ssam * ctrl_interface - Parameters for the control interface 440189251Ssam * 441189251Ssam * If this is specified, %wpa_supplicant will open a control interface 442189251Ssam * that is available for external programs to manage %wpa_supplicant. 443189251Ssam * The meaning of this string depends on which control interface 444252726Srpaulo * mechanism is used. For all cases, the existence of this parameter 445189251Ssam * in configuration is used to determine whether the control interface 446189251Ssam * is enabled. 447189251Ssam * 448189251Ssam * For UNIX domain sockets (default on Linux and BSD): This is a 449189251Ssam * directory that will be created for UNIX domain sockets for listening 450189251Ssam * to requests from external programs (CLI/GUI, etc.) for status 451189251Ssam * information and configuration. The socket file will be named based 452189251Ssam * on the interface name, so multiple %wpa_supplicant processes can be 453189251Ssam * run at the same time if more than one interface is used. 454189251Ssam * /var/run/wpa_supplicant is the recommended directory for sockets and 455189251Ssam * by default, wpa_cli will use it when trying to connect with 456189251Ssam * %wpa_supplicant. 457189251Ssam * 458189251Ssam * Access control for the control interface can be configured 459189251Ssam * by setting the directory to allow only members of a group 460189251Ssam * to use sockets. This way, it is possible to run 461189251Ssam * %wpa_supplicant as root (since it needs to change network 462189251Ssam * configuration and open raw sockets) and still allow GUI/CLI 463189251Ssam * components to be run as non-root users. However, since the 464189251Ssam * control interface can be used to change the network 465189251Ssam * configuration, this access needs to be protected in many 466189251Ssam * cases. By default, %wpa_supplicant is configured to use gid 467189251Ssam * 0 (root). If you want to allow non-root users to use the 468189251Ssam * control interface, add a new group and change this value to 469189251Ssam * match with that group. Add users that should have control 470189251Ssam * interface access to this group. 471189251Ssam * 472189251Ssam * When configuring both the directory and group, use following format: 473189251Ssam * DIR=/var/run/wpa_supplicant GROUP=wheel 474189251Ssam * DIR=/var/run/wpa_supplicant GROUP=0 475189251Ssam * (group can be either group name or gid) 476189251Ssam * 477189251Ssam * For UDP connections (default on Windows): The value will be ignored. 478189251Ssam * This variable is just used to select that the control interface is 479189251Ssam * to be created. The value can be set to, e.g., udp 480189251Ssam * (ctrl_interface=udp). 481189251Ssam * 482189251Ssam * For Windows Named Pipe: This value can be used to set the security 483189251Ssam * descriptor for controlling access to the control interface. Security 484189251Ssam * descriptor can be set using Security Descriptor String Format (see 485189251Ssam * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/security_descriptor_string_format.asp). 486189251Ssam * The descriptor string needs to be prefixed with SDDL=. For example, 487189251Ssam * ctrl_interface=SDDL=D: would set an empty DACL (which will reject 488189251Ssam * all connections). 489189251Ssam */ 490189251Ssam char *ctrl_interface; 491189251Ssam 492189251Ssam /** 493189251Ssam * ctrl_interface_group - Control interface group (DEPRECATED) 494189251Ssam * 495189251Ssam * This variable is only used for backwards compatibility. Group for 496189251Ssam * UNIX domain sockets should now be specified using GROUP=group in 497189251Ssam * ctrl_interface variable. 498189251Ssam */ 499189251Ssam char *ctrl_interface_group; 500189251Ssam 501189251Ssam /** 502189251Ssam * fast_reauth - EAP fast re-authentication (session resumption) 503189251Ssam * 504189251Ssam * By default, fast re-authentication is enabled for all EAP methods 505189251Ssam * that support it. This variable can be used to disable fast 506189251Ssam * re-authentication (by setting fast_reauth=0). Normally, there is no 507189251Ssam * need to disable fast re-authentication. 508189251Ssam */ 509189251Ssam int fast_reauth; 510189251Ssam 511189251Ssam /** 512189251Ssam * opensc_engine_path - Path to the OpenSSL engine for opensc 513189251Ssam * 514189251Ssam * This is an OpenSSL specific configuration option for loading OpenSC 515189251Ssam * engine (engine_opensc.so); if %NULL, this engine is not loaded. 516189251Ssam */ 517189251Ssam char *opensc_engine_path; 518189251Ssam 519189251Ssam /** 520189251Ssam * pkcs11_engine_path - Path to the OpenSSL engine for PKCS#11 521189251Ssam * 522189251Ssam * This is an OpenSSL specific configuration option for loading PKCS#11 523189251Ssam * engine (engine_pkcs11.so); if %NULL, this engine is not loaded. 524189251Ssam */ 525189251Ssam char *pkcs11_engine_path; 526189251Ssam 527189251Ssam /** 528189251Ssam * pkcs11_module_path - Path to the OpenSSL OpenSC/PKCS#11 module 529189251Ssam * 530189251Ssam * This is an OpenSSL specific configuration option for configuring 531189251Ssam * path to OpenSC/PKCS#11 engine (opensc-pkcs11.so); if %NULL, this 532189251Ssam * module is not loaded. 533189251Ssam */ 534189251Ssam char *pkcs11_module_path; 535189251Ssam 536189251Ssam /** 537281806Srpaulo * openssl_ciphers - OpenSSL cipher string 538281806Srpaulo * 539281806Srpaulo * This is an OpenSSL specific configuration option for configuring the 540281806Srpaulo * default ciphers. If not set, "DEFAULT:!EXP:!LOW" is used as the 541281806Srpaulo * default. 542281806Srpaulo */ 543281806Srpaulo char *openssl_ciphers; 544281806Srpaulo 545281806Srpaulo /** 546252726Srpaulo * pcsc_reader - PC/SC reader name prefix 547252726Srpaulo * 548252726Srpaulo * If not %NULL, PC/SC reader with a name that matches this prefix is 549252726Srpaulo * initialized for SIM/USIM access. Empty string can be used to match 550252726Srpaulo * the first available reader. 551252726Srpaulo */ 552252726Srpaulo char *pcsc_reader; 553252726Srpaulo 554252726Srpaulo /** 555252726Srpaulo * pcsc_pin - PIN for USIM, GSM SIM, and smartcards 556252726Srpaulo * 557252726Srpaulo * This field is used to configure PIN for SIM/USIM for EAP-SIM and 558252726Srpaulo * EAP-AKA. If left out, this will be asked through control interface. 559252726Srpaulo */ 560252726Srpaulo char *pcsc_pin; 561252726Srpaulo 562252726Srpaulo /** 563281806Srpaulo * external_sim - Use external processing for SIM/USIM operations 564281806Srpaulo */ 565281806Srpaulo int external_sim; 566281806Srpaulo 567281806Srpaulo /** 568189251Ssam * driver_param - Driver interface parameters 569189251Ssam * 570189251Ssam * This text string is passed to the selected driver interface with the 571189251Ssam * optional struct wpa_driver_ops::set_param() handler. This can be 572189251Ssam * used to configure driver specific options without having to add new 573189251Ssam * driver interface functionality. 574189251Ssam */ 575189251Ssam char *driver_param; 576189251Ssam 577189251Ssam /** 578189251Ssam * dot11RSNAConfigPMKLifetime - Maximum lifetime of a PMK 579189251Ssam * 580189251Ssam * dot11 MIB variable for the maximum lifetime of a PMK in the PMK 581189251Ssam * cache (unit: seconds). 582189251Ssam */ 583189251Ssam unsigned int dot11RSNAConfigPMKLifetime; 584189251Ssam 585189251Ssam /** 586189251Ssam * dot11RSNAConfigPMKReauthThreshold - PMK re-authentication threshold 587189251Ssam * 588189251Ssam * dot11 MIB variable for the percentage of the PMK lifetime 589189251Ssam * that should expire before an IEEE 802.1X reauthentication occurs. 590189251Ssam */ 591189251Ssam unsigned int dot11RSNAConfigPMKReauthThreshold; 592189251Ssam 593189251Ssam /** 594189251Ssam * dot11RSNAConfigSATimeout - Security association timeout 595189251Ssam * 596189251Ssam * dot11 MIB variable for the maximum time a security association 597189251Ssam * shall take to set up (unit: seconds). 598189251Ssam */ 599189251Ssam unsigned int dot11RSNAConfigSATimeout; 600189251Ssam 601189251Ssam /** 602189251Ssam * update_config - Is wpa_supplicant allowed to update configuration 603189251Ssam * 604189251Ssam * This variable control whether wpa_supplicant is allow to re-write 605189251Ssam * its configuration with wpa_config_write(). If this is zero, 606189251Ssam * configuration data is only changed in memory and the external data 607189251Ssam * is not overriden. If this is non-zero, wpa_supplicant will update 608189251Ssam * the configuration data (e.g., a file) whenever configuration is 609189251Ssam * changed. This update may replace the old configuration which can 610189251Ssam * remove comments from it in case of a text file configuration. 611189251Ssam */ 612189251Ssam int update_config; 613189251Ssam 614189251Ssam /** 615189251Ssam * blobs - Configuration blobs 616189251Ssam */ 617189251Ssam struct wpa_config_blob *blobs; 618189251Ssam 619189251Ssam /** 620189251Ssam * uuid - Universally Unique IDentifier (UUID; see RFC 4122) for WPS 621189251Ssam */ 622189251Ssam u8 uuid[16]; 623189251Ssam 624189251Ssam /** 625189251Ssam * device_name - Device Name (WPS) 626189251Ssam * User-friendly description of device; up to 32 octets encoded in 627189251Ssam * UTF-8 628189251Ssam */ 629189251Ssam char *device_name; 630189251Ssam 631189251Ssam /** 632189251Ssam * manufacturer - Manufacturer (WPS) 633189251Ssam * The manufacturer of the device (up to 64 ASCII characters) 634189251Ssam */ 635189251Ssam char *manufacturer; 636189251Ssam 637189251Ssam /** 638189251Ssam * model_name - Model Name (WPS) 639189251Ssam * Model of the device (up to 32 ASCII characters) 640189251Ssam */ 641189251Ssam char *model_name; 642189251Ssam 643189251Ssam /** 644189251Ssam * model_number - Model Number (WPS) 645189251Ssam * Additional device description (up to 32 ASCII characters) 646189251Ssam */ 647189251Ssam char *model_number; 648189251Ssam 649189251Ssam /** 650189251Ssam * serial_number - Serial Number (WPS) 651189251Ssam * Serial number of the device (up to 32 characters) 652189251Ssam */ 653189251Ssam char *serial_number; 654189251Ssam 655189251Ssam /** 656189251Ssam * device_type - Primary Device Type (WPS) 657189251Ssam */ 658252726Srpaulo u8 device_type[WPS_DEV_TYPE_LEN]; 659189251Ssam 660189251Ssam /** 661214734Srpaulo * config_methods - Config Methods 662214734Srpaulo * 663214734Srpaulo * This is a space-separated list of supported WPS configuration 664252726Srpaulo * methods. For example, "label virtual_display virtual_push_button 665252726Srpaulo * keypad". 666214734Srpaulo * Available methods: usba ethernet label display ext_nfc_token 667252726Srpaulo * int_nfc_token nfc_interface push_button keypad 668252726Srpaulo * virtual_display physical_display 669252726Srpaulo * virtual_push_button physical_push_button. 670214734Srpaulo */ 671214734Srpaulo char *config_methods; 672214734Srpaulo 673214734Srpaulo /** 674189251Ssam * os_version - OS Version (WPS) 675189251Ssam * 4-octet operating system version number 676189251Ssam */ 677189251Ssam u8 os_version[4]; 678189251Ssam 679189251Ssam /** 680189251Ssam * country - Country code 681189251Ssam * 682189251Ssam * This is the ISO/IEC alpha2 country code for which we are operating 683189251Ssam * in 684189251Ssam */ 685189251Ssam char country[2]; 686189251Ssam 687189251Ssam /** 688189251Ssam * wps_cred_processing - Credential processing 689189251Ssam * 690189251Ssam * 0 = process received credentials internally 691189251Ssam * 1 = do not process received credentials; just pass them over 692189251Ssam * ctrl_iface to external program(s) 693189251Ssam * 2 = process received credentials internally and pass them over 694189251Ssam * ctrl_iface to external program(s) 695189251Ssam */ 696189251Ssam int wps_cred_processing; 697214734Srpaulo 698252726Srpaulo#define MAX_SEC_DEVICE_TYPES 5 699214734Srpaulo /** 700252726Srpaulo * sec_device_types - Secondary Device Types (P2P) 701252726Srpaulo */ 702252726Srpaulo u8 sec_device_type[MAX_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN]; 703252726Srpaulo int num_sec_device_types; 704252726Srpaulo 705252726Srpaulo int p2p_listen_reg_class; 706252726Srpaulo int p2p_listen_channel; 707252726Srpaulo int p2p_oper_reg_class; 708252726Srpaulo int p2p_oper_channel; 709252726Srpaulo int p2p_go_intent; 710252726Srpaulo char *p2p_ssid_postfix; 711252726Srpaulo int persistent_reconnect; 712252726Srpaulo int p2p_intra_bss; 713252726Srpaulo unsigned int num_p2p_pref_chan; 714252726Srpaulo struct p2p_channel *p2p_pref_chan; 715281806Srpaulo struct wpa_freq_range_list p2p_no_go_freq; 716281806Srpaulo int p2p_add_cli_chan; 717281806Srpaulo int p2p_ignore_shared_freq; 718281806Srpaulo int p2p_optimize_listen_chan; 719252726Srpaulo 720252726Srpaulo struct wpabuf *wps_vendor_ext_m1; 721252726Srpaulo 722252726Srpaulo#define MAX_WPS_VENDOR_EXT 10 723252726Srpaulo /** 724252726Srpaulo * wps_vendor_ext - Vendor extension attributes in WPS 725252726Srpaulo */ 726252726Srpaulo struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXT]; 727252726Srpaulo 728252726Srpaulo /** 729252726Srpaulo * p2p_group_idle - Maximum idle time in seconds for P2P group 730252726Srpaulo * 731252726Srpaulo * This value controls how long a P2P group is maintained after there 732252726Srpaulo * is no other members in the group. As a GO, this means no associated 733252726Srpaulo * stations in the group. As a P2P client, this means no GO seen in 734252726Srpaulo * scan results. The maximum idle time is specified in seconds with 0 735252726Srpaulo * indicating no time limit, i.e., the P2P group remains in active 736252726Srpaulo * state indefinitely until explicitly removed. As a P2P client, the 737252726Srpaulo * maximum idle time of P2P_MAX_CLIENT_IDLE seconds is enforced, i.e., 738252726Srpaulo * this parameter is mainly meant for GO use and for P2P client, it can 739252726Srpaulo * only be used to reduce the default timeout to smaller value. A 740252726Srpaulo * special value -1 can be used to configure immediate removal of the 741252726Srpaulo * group for P2P client role on any disconnection after the data 742252726Srpaulo * connection has been established. 743252726Srpaulo */ 744252726Srpaulo int p2p_group_idle; 745252726Srpaulo 746252726Srpaulo /** 747289549Srpaulo * p2p_go_freq_change_policy - The GO frequency change policy 748289549Srpaulo * 749289549Srpaulo * This controls the behavior of the GO when there is a change in the 750289549Srpaulo * map of the currently used frequencies in case more than one channel 751289549Srpaulo * is supported. 752289549Srpaulo * 753289549Srpaulo * @P2P_GO_FREQ_MOVE_SCM: Prefer working in a single channel mode if 754289549Srpaulo * possible. In case the GO is the only interface using its frequency 755289549Srpaulo * and there are other station interfaces on other frequencies, the GO 756289549Srpaulo * will migrate to one of these frequencies. 757289549Srpaulo * 758289549Srpaulo * @P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS: Same as P2P_GO_FREQ_MOVE_SCM, 759289549Srpaulo * but a transition is possible only in case one of the other used 760289549Srpaulo * frequencies is one of the frequencies in the intersection of the 761289549Srpaulo * frequency list of the local device and the peer device. 762289549Srpaulo * 763289549Srpaulo * @P2P_GO_FREQ_MOVE_STAY: Prefer to stay on the current frequency. 764289549Srpaulo */ 765289549Srpaulo enum { 766289549Srpaulo P2P_GO_FREQ_MOVE_SCM = 0, 767289549Srpaulo P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS = 1, 768289549Srpaulo P2P_GO_FREQ_MOVE_STAY = 2, 769289549Srpaulo P2P_GO_FREQ_MOVE_MAX = P2P_GO_FREQ_MOVE_STAY, 770289549Srpaulo } p2p_go_freq_change_policy; 771289549Srpaulo 772289549Srpaulo#define DEFAULT_P2P_GO_FREQ_MOVE P2P_GO_FREQ_MOVE_STAY 773289549Srpaulo 774289549Srpaulo /** 775281806Srpaulo * p2p_passphrase_len - Passphrase length (8..63) for P2P GO 776281806Srpaulo * 777281806Srpaulo * This parameter controls the length of the random passphrase that is 778281806Srpaulo * generated at the GO. 779281806Srpaulo */ 780281806Srpaulo unsigned int p2p_passphrase_len; 781281806Srpaulo 782281806Srpaulo /** 783214734Srpaulo * bss_max_count - Maximum number of BSS entries to keep in memory 784214734Srpaulo */ 785214734Srpaulo unsigned int bss_max_count; 786214734Srpaulo 787214734Srpaulo /** 788252726Srpaulo * bss_expiration_age - BSS entry age after which it can be expired 789252726Srpaulo * 790252726Srpaulo * This value controls the time in seconds after which a BSS entry 791252726Srpaulo * gets removed if it has not been updated or is not in use. 792252726Srpaulo */ 793252726Srpaulo unsigned int bss_expiration_age; 794252726Srpaulo 795252726Srpaulo /** 796252726Srpaulo * bss_expiration_scan_count - Expire BSS after number of scans 797252726Srpaulo * 798252726Srpaulo * If the BSS entry has not been seen in this many scans, it will be 799252726Srpaulo * removed. A value of 1 means that entry is removed after the first 800252726Srpaulo * scan in which the BSSID is not seen. Larger values can be used 801252726Srpaulo * to avoid BSS entries disappearing if they are not visible in 802252726Srpaulo * every scan (e.g., low signal quality or interference). 803252726Srpaulo */ 804252726Srpaulo unsigned int bss_expiration_scan_count; 805252726Srpaulo 806252726Srpaulo /** 807214734Srpaulo * filter_ssids - SSID-based scan result filtering 808214734Srpaulo * 809214734Srpaulo * 0 = do not filter scan results 810214734Srpaulo * 1 = only include configured SSIDs in scan results/BSS table 811214734Srpaulo */ 812214734Srpaulo int filter_ssids; 813252726Srpaulo 814252726Srpaulo /** 815252726Srpaulo * filter_rssi - RSSI-based scan result filtering 816252726Srpaulo * 817252726Srpaulo * 0 = do not filter scan results 818252726Srpaulo * -n = filter scan results below -n dBm 819252726Srpaulo */ 820252726Srpaulo int filter_rssi; 821252726Srpaulo 822252726Srpaulo /** 823252726Srpaulo * max_num_sta - Maximum number of STAs in an AP/P2P GO 824252726Srpaulo */ 825252726Srpaulo unsigned int max_num_sta; 826252726Srpaulo 827252726Srpaulo /** 828281806Srpaulo * freq_list - Array of allowed scan frequencies or %NULL for all 829281806Srpaulo * 830281806Srpaulo * This is an optional zero-terminated array of frequencies in 831281806Srpaulo * megahertz (MHz) to allow for narrowing scanning range. 832281806Srpaulo */ 833281806Srpaulo int *freq_list; 834281806Srpaulo 835281806Srpaulo /** 836281806Srpaulo * scan_cur_freq - Whether to scan only the current channel 837281806Srpaulo * 838281806Srpaulo * If true, attempt to scan only the current channel if any other 839281806Srpaulo * VIFs on this radio are already associated on a particular channel. 840281806Srpaulo */ 841281806Srpaulo int scan_cur_freq; 842281806Srpaulo 843281806Srpaulo /** 844252726Srpaulo * changed_parameters - Bitmap of changed parameters since last update 845252726Srpaulo */ 846252726Srpaulo unsigned int changed_parameters; 847252726Srpaulo 848252726Srpaulo /** 849252726Srpaulo * disassoc_low_ack - Disassocicate stations with massive packet loss 850252726Srpaulo */ 851252726Srpaulo int disassoc_low_ack; 852252726Srpaulo 853252726Srpaulo /** 854252726Srpaulo * interworking - Whether Interworking (IEEE 802.11u) is enabled 855252726Srpaulo */ 856252726Srpaulo int interworking; 857252726Srpaulo 858252726Srpaulo /** 859252726Srpaulo * access_network_type - Access Network Type 860252726Srpaulo * 861252726Srpaulo * When Interworking is enabled, scans will be limited to APs that 862252726Srpaulo * advertise the specified Access Network Type (0..15; with 15 863252726Srpaulo * indicating wildcard match). 864252726Srpaulo */ 865252726Srpaulo int access_network_type; 866252726Srpaulo 867252726Srpaulo /** 868252726Srpaulo * hessid - Homogenous ESS identifier 869252726Srpaulo * 870252726Srpaulo * If this is set (any octet is non-zero), scans will be used to 871252726Srpaulo * request response only from BSSes belonging to the specified 872252726Srpaulo * Homogeneous ESS. This is used only if interworking is enabled. 873252726Srpaulo */ 874252726Srpaulo u8 hessid[ETH_ALEN]; 875252726Srpaulo 876252726Srpaulo /** 877252726Srpaulo * hs20 - Hotspot 2.0 878252726Srpaulo */ 879252726Srpaulo int hs20; 880252726Srpaulo 881252726Srpaulo /** 882252726Srpaulo * pbc_in_m1 - AP mode WPS probing workaround for PBC with Windows 7 883252726Srpaulo * 884252726Srpaulo * Windows 7 uses incorrect way of figuring out AP's WPS capabilities 885252726Srpaulo * by acting as a Registrar and using M1 from the AP. The config 886252726Srpaulo * methods attribute in that message is supposed to indicate only the 887252726Srpaulo * configuration method supported by the AP in Enrollee role, i.e., to 888252726Srpaulo * add an external Registrar. For that case, PBC shall not be used and 889252726Srpaulo * as such, the PushButton config method is removed from M1 by default. 890252726Srpaulo * If pbc_in_m1=1 is included in the configuration file, the PushButton 891252726Srpaulo * config method is left in M1 (if included in config_methods 892252726Srpaulo * parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from 893252726Srpaulo * a label in the AP). 894252726Srpaulo */ 895252726Srpaulo int pbc_in_m1; 896252726Srpaulo 897252726Srpaulo /** 898252726Srpaulo * autoscan - Automatic scan parameters or %NULL if none 899252726Srpaulo * 900252726Srpaulo * This is an optional set of parameters for automatic scanning 901252726Srpaulo * within an interface in following format: 902252726Srpaulo * <autoscan module name>:<module parameters> 903252726Srpaulo */ 904252726Srpaulo char *autoscan; 905252726Srpaulo 906252726Srpaulo /** 907281806Srpaulo * wps_nfc_pw_from_config - NFC Device Password was read from config 908281806Srpaulo * 909281806Srpaulo * This parameter can be determined whether the NFC Device Password was 910281806Srpaulo * included in the configuration (1) or generated dynamically (0). Only 911281806Srpaulo * the former case is re-written back to the configuration file. 912281806Srpaulo */ 913281806Srpaulo int wps_nfc_pw_from_config; 914281806Srpaulo 915281806Srpaulo /** 916252726Srpaulo * wps_nfc_dev_pw_id - NFC Device Password ID for password token 917252726Srpaulo */ 918252726Srpaulo int wps_nfc_dev_pw_id; 919252726Srpaulo 920252726Srpaulo /** 921252726Srpaulo * wps_nfc_dh_pubkey - NFC DH Public Key for password token 922252726Srpaulo */ 923252726Srpaulo struct wpabuf *wps_nfc_dh_pubkey; 924252726Srpaulo 925252726Srpaulo /** 926252726Srpaulo * wps_nfc_dh_privkey - NFC DH Private Key for password token 927252726Srpaulo */ 928252726Srpaulo struct wpabuf *wps_nfc_dh_privkey; 929252726Srpaulo 930252726Srpaulo /** 931252726Srpaulo * wps_nfc_dev_pw - NFC Device Password for password token 932252726Srpaulo */ 933252726Srpaulo struct wpabuf *wps_nfc_dev_pw; 934252726Srpaulo 935252726Srpaulo /** 936252726Srpaulo * ext_password_backend - External password backend or %NULL if none 937252726Srpaulo * 938252726Srpaulo * format: <backend name>[:<optional backend parameters>] 939252726Srpaulo */ 940252726Srpaulo char *ext_password_backend; 941252726Srpaulo 942252726Srpaulo /* 943252726Srpaulo * p2p_go_max_inactivity - Timeout in seconds to detect STA inactivity 944252726Srpaulo * 945252726Srpaulo * This timeout value is used in P2P GO mode to clean up 946252726Srpaulo * inactive stations. 947252726Srpaulo * By default: 300 seconds. 948252726Srpaulo */ 949252726Srpaulo int p2p_go_max_inactivity; 950252726Srpaulo 951252726Srpaulo struct hostapd_wmm_ac_params wmm_ac_params[4]; 952252726Srpaulo 953252726Srpaulo /** 954252726Srpaulo * auto_interworking - Whether to use network selection automatically 955252726Srpaulo * 956252726Srpaulo * 0 = do not automatically go through Interworking network selection 957252726Srpaulo * (i.e., require explicit interworking_select command for this) 958252726Srpaulo * 1 = perform Interworking network selection if one or more 959252726Srpaulo * credentials have been configured and scan did not find a 960252726Srpaulo * matching network block 961252726Srpaulo */ 962252726Srpaulo int auto_interworking; 963252726Srpaulo 964252726Srpaulo /** 965252726Srpaulo * p2p_go_ht40 - Default mode for HT40 enable when operating as GO. 966252726Srpaulo * 967252726Srpaulo * This will take effect for p2p_group_add, p2p_connect, and p2p_invite. 968252726Srpaulo * Note that regulatory constraints and driver capabilities are 969252726Srpaulo * consulted anyway, so setting it to 1 can't do real harm. 970252726Srpaulo * By default: 0 (disabled) 971252726Srpaulo */ 972252726Srpaulo int p2p_go_ht40; 973252726Srpaulo 974252726Srpaulo /** 975281806Srpaulo * p2p_go_vht - Default mode for VHT enable when operating as GO 976281806Srpaulo * 977281806Srpaulo * This will take effect for p2p_group_add, p2p_connect, and p2p_invite. 978281806Srpaulo * Note that regulatory constraints and driver capabilities are 979281806Srpaulo * consulted anyway, so setting it to 1 can't do real harm. 980281806Srpaulo * By default: 0 (disabled) 981281806Srpaulo */ 982281806Srpaulo int p2p_go_vht; 983281806Srpaulo 984281806Srpaulo /** 985281806Srpaulo * p2p_go_ctwindow - CTWindow to use when operating as GO 986281806Srpaulo * 987281806Srpaulo * By default: 0 (no CTWindow). Values 0-127 can be used to indicate 988281806Srpaulo * the length of the CTWindow in TUs. 989281806Srpaulo */ 990281806Srpaulo int p2p_go_ctwindow; 991281806Srpaulo 992281806Srpaulo /** 993252726Srpaulo * p2p_disabled - Whether P2P operations are disabled for this interface 994252726Srpaulo */ 995252726Srpaulo int p2p_disabled; 996252726Srpaulo 997252726Srpaulo /** 998252726Srpaulo * p2p_no_group_iface - Whether group interfaces can be used 999252726Srpaulo * 1000252726Srpaulo * By default, wpa_supplicant will create a separate interface for P2P 1001252726Srpaulo * group operations if the driver supports this. This functionality can 1002252726Srpaulo * be disabled by setting this parameter to 1. In that case, the same 1003252726Srpaulo * interface that was used for the P2P management operations is used 1004252726Srpaulo * also for the group operation. 1005252726Srpaulo */ 1006252726Srpaulo int p2p_no_group_iface; 1007252726Srpaulo 1008252726Srpaulo /** 1009289549Srpaulo * p2p_cli_probe - Enable/disable P2P CLI probe request handling 1010289549Srpaulo * 1011289549Srpaulo * If this parameter is set to 1, a connected P2P Client will receive 1012289549Srpaulo * and handle Probe Request frames. Setting this parameter to 0 1013289549Srpaulo * disables this option. Default value: 0. 1014289549Srpaulo * 1015289549Srpaulo * Note: Setting this property at run time takes effect on the following 1016289549Srpaulo * interface state transition to/from the WPA_COMPLETED state. 1017289549Srpaulo */ 1018289549Srpaulo int p2p_cli_probe; 1019289549Srpaulo 1020289549Srpaulo /** 1021252726Srpaulo * okc - Whether to enable opportunistic key caching by default 1022252726Srpaulo * 1023252726Srpaulo * By default, OKC is disabled unless enabled by the per-network 1024252726Srpaulo * proactive_key_caching=1 parameter. okc=1 can be used to change this 1025252726Srpaulo * default behavior. 1026252726Srpaulo */ 1027252726Srpaulo int okc; 1028252726Srpaulo 1029252726Srpaulo /** 1030252726Srpaulo * pmf - Whether to enable/require PMF by default 1031252726Srpaulo * 1032252726Srpaulo * By default, PMF is disabled unless enabled by the per-network 1033252726Srpaulo * ieee80211w=1 or ieee80211w=2 parameter. pmf=1/2 can be used to change 1034252726Srpaulo * this default behavior. 1035252726Srpaulo */ 1036252726Srpaulo enum mfp_options pmf; 1037281806Srpaulo 1038281806Srpaulo /** 1039281806Srpaulo * sae_groups - Preference list of enabled groups for SAE 1040281806Srpaulo * 1041281806Srpaulo * By default (if this parameter is not set), the mandatory group 19 1042281806Srpaulo * (ECC group defined over a 256-bit prime order field) is preferred, 1043281806Srpaulo * but other groups are also enabled. If this parameter is set, the 1044281806Srpaulo * groups will be tried in the indicated order. 1045281806Srpaulo */ 1046281806Srpaulo int *sae_groups; 1047281806Srpaulo 1048281806Srpaulo /** 1049281806Srpaulo * dtim_period - Default DTIM period in Beacon intervals 1050281806Srpaulo * 1051281806Srpaulo * This parameter can be used to set the default value for network 1052281806Srpaulo * blocks that do not specify dtim_period. 1053281806Srpaulo */ 1054281806Srpaulo int dtim_period; 1055281806Srpaulo 1056281806Srpaulo /** 1057281806Srpaulo * beacon_int - Default Beacon interval in TU 1058281806Srpaulo * 1059281806Srpaulo * This parameter can be used to set the default value for network 1060281806Srpaulo * blocks that do not specify beacon_int. 1061281806Srpaulo */ 1062281806Srpaulo int beacon_int; 1063281806Srpaulo 1064281806Srpaulo /** 1065281806Srpaulo * ap_vendor_elements: Vendor specific elements for Beacon/ProbeResp 1066281806Srpaulo * 1067281806Srpaulo * This parameter can be used to define additional vendor specific 1068281806Srpaulo * elements for Beacon and Probe Response frames in AP/P2P GO mode. The 1069281806Srpaulo * format for these element(s) is a hexdump of the raw information 1070281806Srpaulo * elements (id+len+payload for one or more elements). 1071281806Srpaulo */ 1072281806Srpaulo struct wpabuf *ap_vendor_elements; 1073281806Srpaulo 1074281806Srpaulo /** 1075281806Srpaulo * ignore_old_scan_res - Ignore scan results older than request 1076281806Srpaulo * 1077281806Srpaulo * The driver may have a cache of scan results that makes it return 1078281806Srpaulo * information that is older than our scan trigger. This parameter can 1079281806Srpaulo * be used to configure such old information to be ignored instead of 1080281806Srpaulo * allowing it to update the internal BSS table. 1081281806Srpaulo */ 1082281806Srpaulo int ignore_old_scan_res; 1083281806Srpaulo 1084281806Srpaulo /** 1085281806Srpaulo * sched_scan_interval - schedule scan interval 1086281806Srpaulo */ 1087281806Srpaulo unsigned int sched_scan_interval; 1088281806Srpaulo 1089281806Srpaulo /** 1090281806Srpaulo * tdls_external_control - External control for TDLS setup requests 1091281806Srpaulo * 1092281806Srpaulo * Enable TDLS mode where external programs are given the control 1093281806Srpaulo * to specify the TDLS link to get established to the driver. The 1094281806Srpaulo * driver requests the TDLS setup to the supplicant only for the 1095281806Srpaulo * specified TDLS peers. 1096281806Srpaulo */ 1097281806Srpaulo int tdls_external_control; 1098281806Srpaulo 1099281806Srpaulo u8 ip_addr_go[4]; 1100281806Srpaulo u8 ip_addr_mask[4]; 1101281806Srpaulo u8 ip_addr_start[4]; 1102281806Srpaulo u8 ip_addr_end[4]; 1103281806Srpaulo 1104281806Srpaulo /** 1105281806Srpaulo * osu_dir - OSU provider information directory 1106281806Srpaulo * 1107281806Srpaulo * If set, allow FETCH_OSU control interface command to be used to fetch 1108281806Srpaulo * OSU provider information into all APs and store the results in this 1109281806Srpaulo * directory. 1110281806Srpaulo */ 1111281806Srpaulo char *osu_dir; 1112281806Srpaulo 1113281806Srpaulo /** 1114281806Srpaulo * wowlan_triggers - Wake-on-WLAN triggers 1115281806Srpaulo * 1116281806Srpaulo * If set, these wowlan triggers will be configured. 1117281806Srpaulo */ 1118281806Srpaulo char *wowlan_triggers; 1119281806Srpaulo 1120281806Srpaulo /** 1121281806Srpaulo * p2p_search_delay - Extra delay between concurrent search iterations 1122281806Srpaulo * 1123281806Srpaulo * Add extra delay (in milliseconds) between search iterations when 1124281806Srpaulo * there is a concurrent operation to make p2p_find friendlier to 1125281806Srpaulo * concurrent operations by avoiding it from taking 100% of radio 1126281806Srpaulo * resources. 1127281806Srpaulo */ 1128281806Srpaulo unsigned int p2p_search_delay; 1129281806Srpaulo 1130281806Srpaulo /** 1131281806Srpaulo * mac_addr - MAC address policy default 1132281806Srpaulo * 1133281806Srpaulo * 0 = use permanent MAC address 1134281806Srpaulo * 1 = use random MAC address for each ESS connection 1135281806Srpaulo * 2 = like 1, but maintain OUI (with local admin bit set) 1136281806Srpaulo * 1137281806Srpaulo * By default, permanent MAC address is used unless policy is changed by 1138281806Srpaulo * the per-network mac_addr parameter. Global mac_addr=1 can be used to 1139281806Srpaulo * change this default behavior. 1140281806Srpaulo */ 1141281806Srpaulo int mac_addr; 1142281806Srpaulo 1143281806Srpaulo /** 1144281806Srpaulo * rand_addr_lifetime - Lifetime of random MAC address in seconds 1145281806Srpaulo */ 1146281806Srpaulo unsigned int rand_addr_lifetime; 1147281806Srpaulo 1148281806Srpaulo /** 1149281806Srpaulo * preassoc_mac_addr - Pre-association MAC address policy 1150281806Srpaulo * 1151281806Srpaulo * 0 = use permanent MAC address 1152281806Srpaulo * 1 = use random MAC address 1153281806Srpaulo * 2 = like 1, but maintain OUI (with local admin bit set) 1154281806Srpaulo */ 1155281806Srpaulo int preassoc_mac_addr; 1156281806Srpaulo 1157281806Srpaulo /** 1158281806Srpaulo * key_mgmt_offload - Use key management offload 1159281806Srpaulo * 1160281806Srpaulo * Key management offload should be used if the device supports it. 1161281806Srpaulo * Key management offload is the capability of a device operating as 1162281806Srpaulo * a station to do the exchange necessary to establish temporal keys 1163281806Srpaulo * during initial RSN connection, after roaming, or during a PTK 1164281806Srpaulo * rekeying operation. 1165281806Srpaulo */ 1166281806Srpaulo int key_mgmt_offload; 1167281806Srpaulo 1168281806Srpaulo /** 1169281806Srpaulo * user_mpm - MPM residency 1170281806Srpaulo * 1171281806Srpaulo * 0: MPM lives in driver. 1172281806Srpaulo * 1: wpa_supplicant handles peering and station allocation. 1173281806Srpaulo * 1174281806Srpaulo * If AMPE or SAE is enabled, the MPM is always in userspace. 1175281806Srpaulo */ 1176281806Srpaulo int user_mpm; 1177281806Srpaulo 1178281806Srpaulo /** 1179281806Srpaulo * max_peer_links - Maximum number of peer links 1180281806Srpaulo * 1181281806Srpaulo * Maximum number of mesh peering currently maintained by the STA. 1182281806Srpaulo */ 1183281806Srpaulo int max_peer_links; 1184281806Srpaulo 1185281806Srpaulo /** 1186281806Srpaulo * cert_in_cb - Whether to include a peer certificate dump in events 1187281806Srpaulo * 1188281806Srpaulo * This controls whether peer certificates for authentication server and 1189281806Srpaulo * its certificate chain are included in EAP peer certificate events. 1190281806Srpaulo */ 1191281806Srpaulo int cert_in_cb; 1192281806Srpaulo 1193281806Srpaulo /** 1194281806Srpaulo * mesh_max_inactivity - Timeout in seconds to detect STA inactivity 1195281806Srpaulo * 1196281806Srpaulo * This timeout value is used in mesh STA to clean up inactive stations. 1197281806Srpaulo * By default: 300 seconds. 1198281806Srpaulo */ 1199281806Srpaulo int mesh_max_inactivity; 1200281806Srpaulo 1201281806Srpaulo /** 1202289549Srpaulo * dot11RSNASAERetransPeriod - Timeout to retransmit SAE Auth frame 1203289549Srpaulo * 1204289549Srpaulo * This timeout value is used in mesh STA to retransmit 1205289549Srpaulo * SAE Authentication frame. 1206289549Srpaulo * By default: 1000 milliseconds. 1207289549Srpaulo */ 1208289549Srpaulo int dot11RSNASAERetransPeriod; 1209289549Srpaulo 1210289549Srpaulo /** 1211281806Srpaulo * passive_scan - Whether to force passive scan for network connection 1212281806Srpaulo * 1213281806Srpaulo * This parameter can be used to force only passive scanning to be used 1214281806Srpaulo * for network connection cases. It should be noted that this will slow 1215281806Srpaulo * down scan operations and reduce likelihood of finding the AP. In 1216281806Srpaulo * addition, some use cases will override this due to functional 1217281806Srpaulo * requirements, e.g., for finding an AP that uses hidden SSID 1218281806Srpaulo * (scan_ssid=1) or P2P device discovery. 1219281806Srpaulo */ 1220281806Srpaulo int passive_scan; 1221281806Srpaulo 1222281806Srpaulo /** 1223281806Srpaulo * reassoc_same_bss_optim - Whether to optimize reassoc-to-same-BSS 1224281806Srpaulo */ 1225281806Srpaulo int reassoc_same_bss_optim; 1226289549Srpaulo 1227289549Srpaulo /** 1228289549Srpaulo * wps_priority - Priority for the networks added through WPS 1229289549Srpaulo * 1230289549Srpaulo * This priority value will be set to each network profile that is added 1231289549Srpaulo * by executing the WPS protocol. 1232289549Srpaulo */ 1233289549Srpaulo int wps_priority; 1234289549Srpaulo 1235289549Srpaulo /** 1236289549Srpaulo * fst_group_id - FST group ID 1237289549Srpaulo */ 1238289549Srpaulo char *fst_group_id; 1239289549Srpaulo 1240289549Srpaulo /** 1241289549Srpaulo * fst_priority - priority of the interface within the FST group 1242289549Srpaulo */ 1243289549Srpaulo int fst_priority; 1244289549Srpaulo 1245289549Srpaulo /** 1246289549Srpaulo * fst_llt - default FST LLT (Link-Lost Timeout) to be used for the 1247289549Srpaulo * interface. 1248289549Srpaulo */ 1249289549Srpaulo int fst_llt; 1250189251Ssam}; 1251189251Ssam 1252189251Ssam 1253189251Ssam/* Prototypes for common functions from config.c */ 1254189251Ssam 1255189251Ssamvoid wpa_config_free(struct wpa_config *ssid); 1256189251Ssamvoid wpa_config_free_ssid(struct wpa_ssid *ssid); 1257252726Srpaulovoid wpa_config_foreach_network(struct wpa_config *config, 1258252726Srpaulo void (*func)(void *, struct wpa_ssid *), 1259252726Srpaulo void *arg); 1260189251Ssamstruct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id); 1261189251Ssamstruct wpa_ssid * wpa_config_add_network(struct wpa_config *config); 1262189251Ssamint wpa_config_remove_network(struct wpa_config *config, int id); 1263189251Ssamvoid wpa_config_set_network_defaults(struct wpa_ssid *ssid); 1264189251Ssamint wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value, 1265189251Ssam int line); 1266252726Srpauloint wpa_config_set_quoted(struct wpa_ssid *ssid, const char *var, 1267252726Srpaulo const char *value); 1268281806Srpauloint wpa_config_dump_values(struct wpa_config *config, char *buf, 1269281806Srpaulo size_t buflen); 1270281806Srpauloint wpa_config_get_value(const char *name, struct wpa_config *config, 1271281806Srpaulo char *buf, size_t buflen); 1272281806Srpaulo 1273214734Srpaulochar ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys); 1274189251Ssamchar * wpa_config_get(struct wpa_ssid *ssid, const char *var); 1275189251Ssamchar * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var); 1276189251Ssamvoid wpa_config_update_psk(struct wpa_ssid *ssid); 1277189251Ssamint wpa_config_add_prio_network(struct wpa_config *config, 1278189251Ssam struct wpa_ssid *ssid); 1279214734Srpauloint wpa_config_update_prio_list(struct wpa_config *config); 1280189251Ssamconst struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config, 1281189251Ssam const char *name); 1282189251Ssamvoid wpa_config_set_blob(struct wpa_config *config, 1283189251Ssam struct wpa_config_blob *blob); 1284189251Ssamvoid wpa_config_free_blob(struct wpa_config_blob *blob); 1285189251Ssamint wpa_config_remove_blob(struct wpa_config *config, const char *name); 1286281806Srpaulovoid wpa_config_flush_blobs(struct wpa_config *config); 1287189251Ssam 1288252726Srpaulostruct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id); 1289252726Srpaulostruct wpa_cred * wpa_config_add_cred(struct wpa_config *config); 1290252726Srpauloint wpa_config_remove_cred(struct wpa_config *config, int id); 1291252726Srpaulovoid wpa_config_free_cred(struct wpa_cred *cred); 1292252726Srpauloint wpa_config_set_cred(struct wpa_cred *cred, const char *var, 1293252726Srpaulo const char *value, int line); 1294281806Srpaulochar * wpa_config_get_cred_no_key(struct wpa_cred *cred, const char *var); 1295252726Srpaulo 1296189251Ssamstruct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface, 1297189251Ssam const char *driver_param); 1298189251Ssam#ifndef CONFIG_NO_STDOUT_DEBUG 1299189251Ssamvoid wpa_config_debug_dump_networks(struct wpa_config *config); 1300189251Ssam#else /* CONFIG_NO_STDOUT_DEBUG */ 1301189251Ssam#define wpa_config_debug_dump_networks(c) do { } while (0) 1302189251Ssam#endif /* CONFIG_NO_STDOUT_DEBUG */ 1303189251Ssam 1304189251Ssam 1305252726Srpaulo/* Prototypes for common functions from config.c */ 1306252726Srpauloint wpa_config_process_global(struct wpa_config *config, char *pos, int line); 1307252726Srpaulo 1308252726Srpaulo 1309189251Ssam/* Prototypes for backend specific functions from the selected config_*.c */ 1310189251Ssam 1311189251Ssam/** 1312189251Ssam * wpa_config_read - Read and parse configuration database 1313189251Ssam * @name: Name of the configuration (e.g., path and file name for the 1314189251Ssam * configuration file) 1315281806Srpaulo * @cfgp: Pointer to previously allocated configuration data or %NULL if none 1316189251Ssam * Returns: Pointer to allocated configuration data or %NULL on failure 1317189251Ssam * 1318189251Ssam * This function reads configuration data, parses its contents, and allocates 1319189251Ssam * data structures needed for storing configuration information. The allocated 1320189251Ssam * data can be freed with wpa_config_free(). 1321189251Ssam * 1322189251Ssam * Each configuration backend needs to implement this function. 1323189251Ssam */ 1324281806Srpaulostruct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp); 1325189251Ssam 1326189251Ssam/** 1327189251Ssam * wpa_config_write - Write or update configuration data 1328189251Ssam * @name: Name of the configuration (e.g., path and file name for the 1329189251Ssam * configuration file) 1330189251Ssam * @config: Configuration data from wpa_config_read() 1331189251Ssam * Returns: 0 on success, -1 on failure 1332189251Ssam * 1333189251Ssam * This function write all configuration data into an external database (e.g., 1334189251Ssam * a text file) in a format that can be read with wpa_config_read(). This can 1335189251Ssam * be used to allow wpa_supplicant to update its configuration, e.g., when a 1336189251Ssam * new network is added or a password is changed. 1337189251Ssam * 1338189251Ssam * Each configuration backend needs to implement this function. 1339189251Ssam */ 1340189251Ssamint wpa_config_write(const char *name, struct wpa_config *config); 1341189251Ssam 1342189251Ssam#endif /* CONFIG_H */ 1343