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 35f05cddf9SRui Paulo #define DEFAULT_ACCESS_NETWORK_TYPE 15 365b9c547cSRui Paulo #define DEFAULT_SCAN_CUR_FREQ 0 375b9c547cSRui Paulo #define DEFAULT_P2P_SEARCH_DELAY 500 385b9c547cSRui Paulo #define DEFAULT_RAND_ADDR_LIFETIME 60 395b9c547cSRui Paulo #define DEFAULT_KEY_MGMT_OFFLOAD 1 405b9c547cSRui Paulo #define DEFAULT_CERT_IN_CB 1 415b9c547cSRui Paulo #define DEFAULT_P2P_GO_CTWINDOW 0 42*780fb4a2SCy Schubert #define DEFAULT_WPA_RSC_RELAXATION 1 43*780fb4a2SCy Schubert #define DEFAULT_MBO_CELL_CAPA MBO_CELL_CAPA_NOT_SUPPORTED 4439beb93cSSam Leffler 4539beb93cSSam Leffler #include "config_ssid.h" 46f05cddf9SRui Paulo #include "wps/wps.h" 47325151a3SRui Paulo #include "common/ieee802_11_defs.h" 48f05cddf9SRui Paulo #include "common/ieee802_11_common.h" 4939beb93cSSam Leffler 5039beb93cSSam Leffler 51f05cddf9SRui Paulo struct wpa_cred { 52f05cddf9SRui Paulo /** 53f05cddf9SRui Paulo * next - Next credential in the list 54f05cddf9SRui Paulo * 55f05cddf9SRui Paulo * This pointer can be used to iterate over all credentials. The head 56f05cddf9SRui Paulo * of this list is stored in the cred field of struct wpa_config. 57f05cddf9SRui Paulo */ 58f05cddf9SRui Paulo struct wpa_cred *next; 59f05cddf9SRui Paulo 60f05cddf9SRui Paulo /** 61f05cddf9SRui Paulo * id - Unique id for the credential 62f05cddf9SRui Paulo * 63f05cddf9SRui Paulo * This identifier is used as a unique identifier for each credential 64f05cddf9SRui Paulo * block when using the control interface. Each credential is allocated 65f05cddf9SRui Paulo * an id when it is being created, either when reading the 66f05cddf9SRui Paulo * configuration file or when a new credential is added through the 67f05cddf9SRui Paulo * control interface. 68f05cddf9SRui Paulo */ 69f05cddf9SRui Paulo int id; 70f05cddf9SRui Paulo 71f05cddf9SRui Paulo /** 725b9c547cSRui Paulo * temporary - Whether this credential is temporary and not to be saved 735b9c547cSRui Paulo */ 745b9c547cSRui Paulo int temporary; 755b9c547cSRui Paulo 765b9c547cSRui Paulo /** 77f05cddf9SRui Paulo * priority - Priority group 78f05cddf9SRui Paulo * 79f05cddf9SRui Paulo * By default, all networks and credentials get the same priority group 80f05cddf9SRui Paulo * (0). This field can be used to give higher priority for credentials 81f05cddf9SRui Paulo * (and similarly in struct wpa_ssid for network blocks) to change the 82f05cddf9SRui Paulo * Interworking automatic networking selection behavior. The matching 83f05cddf9SRui Paulo * network (based on either an enabled network block or a credential) 84f05cddf9SRui Paulo * with the highest priority value will be selected. 85f05cddf9SRui Paulo */ 86f05cddf9SRui Paulo int priority; 87f05cddf9SRui Paulo 88f05cddf9SRui Paulo /** 89f05cddf9SRui Paulo * pcsc - Use PC/SC and SIM/USIM card 90f05cddf9SRui Paulo */ 91f05cddf9SRui Paulo int pcsc; 92f05cddf9SRui Paulo 93f05cddf9SRui Paulo /** 94f05cddf9SRui Paulo * realm - Home Realm for Interworking 95f05cddf9SRui Paulo */ 96f05cddf9SRui Paulo char *realm; 97f05cddf9SRui Paulo 98f05cddf9SRui Paulo /** 99f05cddf9SRui Paulo * username - Username for Interworking network selection 100f05cddf9SRui Paulo */ 101f05cddf9SRui Paulo char *username; 102f05cddf9SRui Paulo 103f05cddf9SRui Paulo /** 104f05cddf9SRui Paulo * password - Password for Interworking network selection 105f05cddf9SRui Paulo */ 106f05cddf9SRui Paulo char *password; 107f05cddf9SRui Paulo 108f05cddf9SRui Paulo /** 109f05cddf9SRui Paulo * ext_password - Whether password is a name for external storage 110f05cddf9SRui Paulo */ 111f05cddf9SRui Paulo int ext_password; 112f05cddf9SRui Paulo 113f05cddf9SRui Paulo /** 114f05cddf9SRui Paulo * ca_cert - CA certificate for Interworking network selection 115f05cddf9SRui Paulo */ 116f05cddf9SRui Paulo char *ca_cert; 117f05cddf9SRui Paulo 118f05cddf9SRui Paulo /** 119f05cddf9SRui Paulo * client_cert - File path to client certificate file (PEM/DER) 120f05cddf9SRui Paulo * 121f05cddf9SRui Paulo * This field is used with Interworking networking selection for a case 122f05cddf9SRui Paulo * where client certificate/private key is used for authentication 123f05cddf9SRui Paulo * (EAP-TLS). Full path to the file should be used since working 124f05cddf9SRui Paulo * directory may change when wpa_supplicant is run in the background. 125f05cddf9SRui Paulo * 126f05cddf9SRui Paulo * Alternatively, a named configuration blob can be used by setting 127f05cddf9SRui Paulo * this to blob://blob_name. 128f05cddf9SRui Paulo */ 129f05cddf9SRui Paulo char *client_cert; 130f05cddf9SRui Paulo 131f05cddf9SRui Paulo /** 132f05cddf9SRui Paulo * private_key - File path to client private key file (PEM/DER/PFX) 133f05cddf9SRui Paulo * 134f05cddf9SRui Paulo * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be 135f05cddf9SRui Paulo * commented out. Both the private key and certificate will be read 136f05cddf9SRui Paulo * from the PKCS#12 file in this case. Full path to the file should be 137f05cddf9SRui Paulo * used since working directory may change when wpa_supplicant is run 138f05cddf9SRui Paulo * in the background. 139f05cddf9SRui Paulo * 140f05cddf9SRui Paulo * Windows certificate store can be used by leaving client_cert out and 141f05cddf9SRui Paulo * configuring private_key in one of the following formats: 142f05cddf9SRui Paulo * 143f05cddf9SRui Paulo * cert://substring_to_match 144f05cddf9SRui Paulo * 145f05cddf9SRui Paulo * hash://certificate_thumbprint_in_hex 146f05cddf9SRui Paulo * 147f05cddf9SRui Paulo * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4" 148f05cddf9SRui Paulo * 149f05cddf9SRui Paulo * Note that when running wpa_supplicant as an application, the user 150f05cddf9SRui Paulo * certificate store (My user account) is used, whereas computer store 151f05cddf9SRui Paulo * (Computer account) is used when running wpasvc as a service. 152f05cddf9SRui Paulo * 153f05cddf9SRui Paulo * Alternatively, a named configuration blob can be used by setting 154f05cddf9SRui Paulo * this to blob://blob_name. 155f05cddf9SRui Paulo */ 156f05cddf9SRui Paulo char *private_key; 157f05cddf9SRui Paulo 158f05cddf9SRui Paulo /** 159f05cddf9SRui Paulo * private_key_passwd - Password for private key file 160f05cddf9SRui Paulo */ 161f05cddf9SRui Paulo char *private_key_passwd; 162f05cddf9SRui Paulo 163f05cddf9SRui Paulo /** 164f05cddf9SRui Paulo * imsi - IMSI in <MCC> | <MNC> | '-' | <MSIN> format 165f05cddf9SRui Paulo */ 166f05cddf9SRui Paulo char *imsi; 167f05cddf9SRui Paulo 168f05cddf9SRui Paulo /** 169f05cddf9SRui Paulo * milenage - Milenage parameters for SIM/USIM simulator in 170f05cddf9SRui Paulo * <Ki>:<OPc>:<SQN> format 171f05cddf9SRui Paulo */ 172f05cddf9SRui Paulo char *milenage; 173f05cddf9SRui Paulo 174f05cddf9SRui Paulo /** 1755b9c547cSRui Paulo * domain_suffix_match - Constraint for server domain name 1765b9c547cSRui Paulo * 1775b9c547cSRui Paulo * If set, this FQDN is used as a suffix match requirement for the AAA 1785b9c547cSRui Paulo * server certificate in SubjectAltName dNSName element(s). If a 1795b9c547cSRui Paulo * matching dNSName is found, this constraint is met. If no dNSName 1805b9c547cSRui Paulo * values are present, this constraint is matched against SubjectName CN 1815b9c547cSRui Paulo * using same suffix match comparison. Suffix match here means that the 1825b9c547cSRui Paulo * host/domain name is compared one label at a time starting from the 1835b9c547cSRui Paulo * top-level domain and all the labels in @domain_suffix_match shall be 1845b9c547cSRui Paulo * included in the certificate. The certificate may include additional 1855b9c547cSRui Paulo * sub-level labels in addition to the required labels. 1865b9c547cSRui Paulo * 1875b9c547cSRui Paulo * For example, domain_suffix_match=example.com would match 1885b9c547cSRui Paulo * test.example.com but would not match test-example.com. 1895b9c547cSRui Paulo */ 1905b9c547cSRui Paulo char *domain_suffix_match; 1915b9c547cSRui Paulo 1925b9c547cSRui Paulo /** 1935b9c547cSRui Paulo * domain - Home service provider FQDN(s) 194f05cddf9SRui Paulo * 195f05cddf9SRui Paulo * This is used to compare against the Domain Name List to figure out 1965b9c547cSRui Paulo * whether the AP is operated by the Home SP. Multiple domain entries 1975b9c547cSRui Paulo * can be used to configure alternative FQDNs that will be considered 1985b9c547cSRui Paulo * home networks. 199f05cddf9SRui Paulo */ 2005b9c547cSRui Paulo char **domain; 2015b9c547cSRui Paulo 2025b9c547cSRui Paulo /** 2035b9c547cSRui Paulo * num_domain - Number of FQDNs in the domain array 2045b9c547cSRui Paulo */ 2055b9c547cSRui Paulo size_t num_domain; 206f05cddf9SRui Paulo 207f05cddf9SRui Paulo /** 208f05cddf9SRui Paulo * roaming_consortium - Roaming Consortium OI 209f05cddf9SRui Paulo * 210f05cddf9SRui Paulo * If roaming_consortium_len is non-zero, this field contains the 211f05cddf9SRui Paulo * Roaming Consortium OI that can be used to determine which access 212f05cddf9SRui Paulo * points support authentication with this credential. This is an 213f05cddf9SRui Paulo * alternative to the use of the realm parameter. When using Roaming 214f05cddf9SRui Paulo * Consortium to match the network, the EAP parameters need to be 215f05cddf9SRui Paulo * pre-configured with the credential since the NAI Realm information 216f05cddf9SRui Paulo * may not be available or fetched. 217f05cddf9SRui Paulo */ 218f05cddf9SRui Paulo u8 roaming_consortium[15]; 219f05cddf9SRui Paulo 220f05cddf9SRui Paulo /** 221f05cddf9SRui Paulo * roaming_consortium_len - Length of roaming_consortium 222f05cddf9SRui Paulo */ 223f05cddf9SRui Paulo size_t roaming_consortium_len; 224f05cddf9SRui Paulo 2255b9c547cSRui Paulo u8 required_roaming_consortium[15]; 2265b9c547cSRui Paulo size_t required_roaming_consortium_len; 2275b9c547cSRui Paulo 228f05cddf9SRui Paulo /** 229f05cddf9SRui Paulo * eap_method - EAP method to use 230f05cddf9SRui Paulo * 231f05cddf9SRui Paulo * Pre-configured EAP method to use with this credential or %NULL to 232f05cddf9SRui Paulo * indicate no EAP method is selected, i.e., the method will be 233f05cddf9SRui Paulo * selected automatically based on ANQP information. 234f05cddf9SRui Paulo */ 235f05cddf9SRui Paulo struct eap_method_type *eap_method; 236f05cddf9SRui Paulo 237f05cddf9SRui Paulo /** 238f05cddf9SRui Paulo * phase1 - Phase 1 (outer authentication) parameters 239f05cddf9SRui Paulo * 240f05cddf9SRui Paulo * Pre-configured EAP parameters or %NULL. 241f05cddf9SRui Paulo */ 242f05cddf9SRui Paulo char *phase1; 243f05cddf9SRui Paulo 244f05cddf9SRui Paulo /** 245f05cddf9SRui Paulo * phase2 - Phase 2 (inner authentication) parameters 246f05cddf9SRui Paulo * 247f05cddf9SRui Paulo * Pre-configured EAP parameters or %NULL. 248f05cddf9SRui Paulo */ 249f05cddf9SRui Paulo char *phase2; 250f05cddf9SRui Paulo 251f05cddf9SRui Paulo struct excluded_ssid { 252325151a3SRui Paulo u8 ssid[SSID_MAX_LEN]; 253f05cddf9SRui Paulo size_t ssid_len; 254f05cddf9SRui Paulo } *excluded_ssid; 255f05cddf9SRui Paulo size_t num_excluded_ssid; 2565b9c547cSRui Paulo 2575b9c547cSRui Paulo struct roaming_partner { 2585b9c547cSRui Paulo char fqdn[128]; 2595b9c547cSRui Paulo int exact_match; 2605b9c547cSRui Paulo u8 priority; 2615b9c547cSRui Paulo char country[3]; 2625b9c547cSRui Paulo } *roaming_partner; 2635b9c547cSRui Paulo size_t num_roaming_partner; 2645b9c547cSRui Paulo 2655b9c547cSRui Paulo int update_identifier; 2665b9c547cSRui Paulo 2675b9c547cSRui Paulo /** 2685b9c547cSRui Paulo * provisioning_sp - FQDN of the SP that provisioned the credential 2695b9c547cSRui Paulo */ 2705b9c547cSRui Paulo char *provisioning_sp; 2715b9c547cSRui Paulo 2725b9c547cSRui Paulo /** 2735b9c547cSRui Paulo * sp_priority - Credential priority within a provisioning SP 2745b9c547cSRui Paulo * 2755b9c547cSRui Paulo * This is the priority of the credential among all credentials 2765b9c547cSRui Paulo * provisionined by the same SP (i.e., for entries that have identical 2775b9c547cSRui Paulo * provisioning_sp value). The range of this priority is 0-255 with 0 2785b9c547cSRui Paulo * being the highest and 255 the lower priority. 2795b9c547cSRui Paulo */ 2805b9c547cSRui Paulo int sp_priority; 2815b9c547cSRui Paulo 2825b9c547cSRui Paulo unsigned int min_dl_bandwidth_home; 2835b9c547cSRui Paulo unsigned int min_ul_bandwidth_home; 2845b9c547cSRui Paulo unsigned int min_dl_bandwidth_roaming; 2855b9c547cSRui Paulo unsigned int min_ul_bandwidth_roaming; 2865b9c547cSRui Paulo 2875b9c547cSRui Paulo /** 2885b9c547cSRui Paulo * max_bss_load - Maximum BSS Load Channel Utilization (1..255) 2895b9c547cSRui Paulo * This value is used as the maximum channel utilization for network 2905b9c547cSRui Paulo * selection purposes for home networks. If the AP does not advertise 2915b9c547cSRui Paulo * BSS Load or if the limit would prevent any connection, this 2925b9c547cSRui Paulo * constraint will be ignored. 2935b9c547cSRui Paulo */ 2945b9c547cSRui Paulo unsigned int max_bss_load; 2955b9c547cSRui Paulo 2965b9c547cSRui Paulo unsigned int num_req_conn_capab; 2975b9c547cSRui Paulo u8 *req_conn_capab_proto; 2985b9c547cSRui Paulo int **req_conn_capab_port; 2995b9c547cSRui Paulo 3005b9c547cSRui Paulo /** 3015b9c547cSRui Paulo * ocsp - Whether to use/require OCSP to check server certificate 3025b9c547cSRui Paulo * 3035b9c547cSRui Paulo * 0 = do not use OCSP stapling (TLS certificate status extension) 3045b9c547cSRui Paulo * 1 = try to use OCSP stapling, but not require response 3055b9c547cSRui Paulo * 2 = require valid OCSP stapling response 3065b9c547cSRui Paulo */ 3075b9c547cSRui Paulo int ocsp; 3085b9c547cSRui Paulo 3095b9c547cSRui Paulo /** 3105b9c547cSRui Paulo * sim_num - User selected SIM identifier 3115b9c547cSRui Paulo * 3125b9c547cSRui Paulo * This variable is used for identifying which SIM is used if the system 3135b9c547cSRui Paulo * has more than one. 3145b9c547cSRui Paulo */ 3155b9c547cSRui Paulo int sim_num; 316f05cddf9SRui Paulo }; 317f05cddf9SRui Paulo 318f05cddf9SRui Paulo 319f05cddf9SRui Paulo #define CFG_CHANGED_DEVICE_NAME BIT(0) 320f05cddf9SRui Paulo #define CFG_CHANGED_CONFIG_METHODS BIT(1) 321f05cddf9SRui Paulo #define CFG_CHANGED_DEVICE_TYPE BIT(2) 322f05cddf9SRui Paulo #define CFG_CHANGED_OS_VERSION BIT(3) 323f05cddf9SRui Paulo #define CFG_CHANGED_UUID BIT(4) 324f05cddf9SRui Paulo #define CFG_CHANGED_COUNTRY BIT(5) 325f05cddf9SRui Paulo #define CFG_CHANGED_SEC_DEVICE_TYPE BIT(6) 326f05cddf9SRui Paulo #define CFG_CHANGED_P2P_SSID_POSTFIX BIT(7) 327f05cddf9SRui Paulo #define CFG_CHANGED_WPS_STRING BIT(8) 328f05cddf9SRui Paulo #define CFG_CHANGED_P2P_INTRA_BSS BIT(9) 329f05cddf9SRui Paulo #define CFG_CHANGED_VENDOR_EXTENSION BIT(10) 330f05cddf9SRui Paulo #define CFG_CHANGED_P2P_LISTEN_CHANNEL BIT(11) 331f05cddf9SRui Paulo #define CFG_CHANGED_P2P_OPER_CHANNEL BIT(12) 332f05cddf9SRui Paulo #define CFG_CHANGED_P2P_PREF_CHAN BIT(13) 333f05cddf9SRui Paulo #define CFG_CHANGED_EXT_PW_BACKEND BIT(14) 3345b9c547cSRui Paulo #define CFG_CHANGED_NFC_PASSWORD_TOKEN BIT(15) 3355b9c547cSRui Paulo #define CFG_CHANGED_P2P_PASSPHRASE_LEN BIT(16) 336*780fb4a2SCy Schubert #define CFG_CHANGED_SCHED_SCAN_PLANS BIT(17) 337f05cddf9SRui Paulo 33839beb93cSSam Leffler /** 33939beb93cSSam Leffler * struct wpa_config - wpa_supplicant configuration data 34039beb93cSSam Leffler * 34139beb93cSSam Leffler * This data structure is presents the per-interface (radio) configuration 34239beb93cSSam Leffler * data. In many cases, there is only one struct wpa_config instance, but if 34339beb93cSSam Leffler * more than one network interface is being controlled, one instance is used 34439beb93cSSam Leffler * for each. 34539beb93cSSam Leffler */ 34639beb93cSSam Leffler struct wpa_config { 34739beb93cSSam Leffler /** 34839beb93cSSam Leffler * ssid - Head of the global network list 34939beb93cSSam Leffler * 35039beb93cSSam Leffler * This is the head for the list of all the configured networks. 35139beb93cSSam Leffler */ 35239beb93cSSam Leffler struct wpa_ssid *ssid; 35339beb93cSSam Leffler 35439beb93cSSam Leffler /** 35539beb93cSSam Leffler * pssid - Per-priority network lists (in priority order) 35639beb93cSSam Leffler */ 35739beb93cSSam Leffler struct wpa_ssid **pssid; 35839beb93cSSam Leffler 35939beb93cSSam Leffler /** 36039beb93cSSam Leffler * num_prio - Number of different priorities used in the pssid lists 36139beb93cSSam Leffler * 36239beb93cSSam Leffler * This indicates how many per-priority network lists are included in 36339beb93cSSam Leffler * pssid. 36439beb93cSSam Leffler */ 36539beb93cSSam Leffler int num_prio; 36639beb93cSSam Leffler 36739beb93cSSam Leffler /** 368f05cddf9SRui Paulo * cred - Head of the credential list 369f05cddf9SRui Paulo * 370f05cddf9SRui Paulo * This is the head for the list of all the configured credentials. 371f05cddf9SRui Paulo */ 372f05cddf9SRui Paulo struct wpa_cred *cred; 373f05cddf9SRui Paulo 374f05cddf9SRui Paulo /** 37539beb93cSSam Leffler * eapol_version - IEEE 802.1X/EAPOL version number 37639beb93cSSam Leffler * 37739beb93cSSam Leffler * wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which 37839beb93cSSam Leffler * defines EAPOL version 2. However, there are many APs that do not 37939beb93cSSam Leffler * handle the new version number correctly (they seem to drop the 38039beb93cSSam Leffler * frames completely). In order to make wpa_supplicant interoperate 38139beb93cSSam Leffler * with these APs, the version number is set to 1 by default. This 38239beb93cSSam Leffler * configuration value can be used to set it to the new version (2). 38339beb93cSSam Leffler */ 38439beb93cSSam Leffler int eapol_version; 38539beb93cSSam Leffler 38639beb93cSSam Leffler /** 38739beb93cSSam Leffler * ap_scan - AP scanning/selection 38839beb93cSSam Leffler * 38939beb93cSSam Leffler * By default, wpa_supplicant requests driver to perform AP 39039beb93cSSam Leffler * scanning and then uses the scan results to select a 39139beb93cSSam Leffler * suitable AP. Another alternative is to allow the driver to 39239beb93cSSam Leffler * take care of AP scanning and selection and use 39339beb93cSSam Leffler * wpa_supplicant just to process EAPOL frames based on IEEE 39439beb93cSSam Leffler * 802.11 association information from the driver. 39539beb93cSSam Leffler * 39639beb93cSSam Leffler * 1: wpa_supplicant initiates scanning and AP selection (default). 39739beb93cSSam Leffler * 39839beb93cSSam Leffler * 0: Driver takes care of scanning, AP selection, and IEEE 802.11 39939beb93cSSam Leffler * association parameters (e.g., WPA IE generation); this mode can 40039beb93cSSam Leffler * also be used with non-WPA drivers when using IEEE 802.1X mode; 40139beb93cSSam Leffler * do not try to associate with APs (i.e., external program needs 40239beb93cSSam Leffler * to control association). This mode must also be used when using 40339beb93cSSam Leffler * wired Ethernet drivers. 40439beb93cSSam Leffler * 40539beb93cSSam Leffler * 2: like 0, but associate with APs using security policy and SSID 40639beb93cSSam Leffler * (but not BSSID); this can be used, e.g., with ndiswrapper and NDIS 40739beb93cSSam Leffler * drivers to enable operation with hidden SSIDs and optimized roaming; 40839beb93cSSam Leffler * in this mode, the network blocks in the configuration are tried 40939beb93cSSam Leffler * one by one until the driver reports successful association; each 41039beb93cSSam Leffler * network block should have explicit security policy (i.e., only one 41139beb93cSSam Leffler * option in the lists) for key_mgmt, pairwise, group, proto variables. 412325151a3SRui Paulo * 413325151a3SRui Paulo * Note: ap_scan=2 should not be used with the nl80211 driver interface 414325151a3SRui Paulo * (the current Linux interface). ap_scan=1 is optimized work working 415325151a3SRui Paulo * with nl80211. For finding networks using hidden SSID, scan_ssid=1 in 416325151a3SRui Paulo * the network block can be used with nl80211. 41739beb93cSSam Leffler */ 41839beb93cSSam Leffler int ap_scan; 41939beb93cSSam Leffler 42039beb93cSSam Leffler /** 4215b9c547cSRui Paulo * bgscan - Background scan and roaming parameters or %NULL if none 4225b9c547cSRui Paulo * 4235b9c547cSRui Paulo * This is an optional set of parameters for background scanning and 4245b9c547cSRui Paulo * roaming within a network (ESS). For more detailed information see 4255b9c547cSRui Paulo * ssid block documentation. 4265b9c547cSRui Paulo * 4275b9c547cSRui Paulo * The variable defines default bgscan behavior for all BSS station 4285b9c547cSRui Paulo * networks except for those which have their own bgscan configuration. 4295b9c547cSRui Paulo */ 4305b9c547cSRui Paulo char *bgscan; 4315b9c547cSRui Paulo 4325b9c547cSRui Paulo /** 433f05cddf9SRui Paulo * disable_scan_offload - Disable automatic offloading of scan requests 434f05cddf9SRui Paulo * 435f05cddf9SRui Paulo * By default, %wpa_supplicant tries to offload scanning if the driver 436f05cddf9SRui Paulo * indicates support for this (sched_scan). This configuration 437f05cddf9SRui Paulo * parameter can be used to disable this offloading mechanism. 438f05cddf9SRui Paulo */ 439f05cddf9SRui Paulo int disable_scan_offload; 440f05cddf9SRui Paulo 441f05cddf9SRui Paulo /** 44239beb93cSSam Leffler * ctrl_interface - Parameters for the control interface 44339beb93cSSam Leffler * 44439beb93cSSam Leffler * If this is specified, %wpa_supplicant will open a control interface 44539beb93cSSam Leffler * that is available for external programs to manage %wpa_supplicant. 44639beb93cSSam Leffler * The meaning of this string depends on which control interface 447f05cddf9SRui Paulo * mechanism is used. For all cases, the existence of this parameter 44839beb93cSSam Leffler * in configuration is used to determine whether the control interface 44939beb93cSSam Leffler * is enabled. 45039beb93cSSam Leffler * 45139beb93cSSam Leffler * For UNIX domain sockets (default on Linux and BSD): This is a 45239beb93cSSam Leffler * directory that will be created for UNIX domain sockets for listening 45339beb93cSSam Leffler * to requests from external programs (CLI/GUI, etc.) for status 45439beb93cSSam Leffler * information and configuration. The socket file will be named based 45539beb93cSSam Leffler * on the interface name, so multiple %wpa_supplicant processes can be 45639beb93cSSam Leffler * run at the same time if more than one interface is used. 45739beb93cSSam Leffler * /var/run/wpa_supplicant is the recommended directory for sockets and 45839beb93cSSam Leffler * by default, wpa_cli will use it when trying to connect with 45939beb93cSSam Leffler * %wpa_supplicant. 46039beb93cSSam Leffler * 46139beb93cSSam Leffler * Access control for the control interface can be configured 46239beb93cSSam Leffler * by setting the directory to allow only members of a group 46339beb93cSSam Leffler * to use sockets. This way, it is possible to run 46439beb93cSSam Leffler * %wpa_supplicant as root (since it needs to change network 46539beb93cSSam Leffler * configuration and open raw sockets) and still allow GUI/CLI 46639beb93cSSam Leffler * components to be run as non-root users. However, since the 46739beb93cSSam Leffler * control interface can be used to change the network 46839beb93cSSam Leffler * configuration, this access needs to be protected in many 46939beb93cSSam Leffler * cases. By default, %wpa_supplicant is configured to use gid 47039beb93cSSam Leffler * 0 (root). If you want to allow non-root users to use the 47139beb93cSSam Leffler * control interface, add a new group and change this value to 47239beb93cSSam Leffler * match with that group. Add users that should have control 47339beb93cSSam Leffler * interface access to this group. 47439beb93cSSam Leffler * 47539beb93cSSam Leffler * When configuring both the directory and group, use following format: 47639beb93cSSam Leffler * DIR=/var/run/wpa_supplicant GROUP=wheel 47739beb93cSSam Leffler * DIR=/var/run/wpa_supplicant GROUP=0 47839beb93cSSam Leffler * (group can be either group name or gid) 47939beb93cSSam Leffler * 48039beb93cSSam Leffler * For UDP connections (default on Windows): The value will be ignored. 48139beb93cSSam Leffler * This variable is just used to select that the control interface is 48239beb93cSSam Leffler * to be created. The value can be set to, e.g., udp 48339beb93cSSam Leffler * (ctrl_interface=udp). 48439beb93cSSam Leffler * 48539beb93cSSam Leffler * For Windows Named Pipe: This value can be used to set the security 48639beb93cSSam Leffler * descriptor for controlling access to the control interface. Security 48739beb93cSSam Leffler * descriptor can be set using Security Descriptor String Format (see 48839beb93cSSam Leffler * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/security_descriptor_string_format.asp). 48939beb93cSSam Leffler * The descriptor string needs to be prefixed with SDDL=. For example, 49039beb93cSSam Leffler * ctrl_interface=SDDL=D: would set an empty DACL (which will reject 49139beb93cSSam Leffler * all connections). 49239beb93cSSam Leffler */ 49339beb93cSSam Leffler char *ctrl_interface; 49439beb93cSSam Leffler 49539beb93cSSam Leffler /** 49639beb93cSSam Leffler * ctrl_interface_group - Control interface group (DEPRECATED) 49739beb93cSSam Leffler * 49839beb93cSSam Leffler * This variable is only used for backwards compatibility. Group for 49939beb93cSSam Leffler * UNIX domain sockets should now be specified using GROUP=group in 50039beb93cSSam Leffler * ctrl_interface variable. 50139beb93cSSam Leffler */ 50239beb93cSSam Leffler char *ctrl_interface_group; 50339beb93cSSam Leffler 50439beb93cSSam Leffler /** 50539beb93cSSam Leffler * fast_reauth - EAP fast re-authentication (session resumption) 50639beb93cSSam Leffler * 50739beb93cSSam Leffler * By default, fast re-authentication is enabled for all EAP methods 50839beb93cSSam Leffler * that support it. This variable can be used to disable fast 50939beb93cSSam Leffler * re-authentication (by setting fast_reauth=0). Normally, there is no 51039beb93cSSam Leffler * need to disable fast re-authentication. 51139beb93cSSam Leffler */ 51239beb93cSSam Leffler int fast_reauth; 51339beb93cSSam Leffler 51439beb93cSSam Leffler /** 51539beb93cSSam Leffler * opensc_engine_path - Path to the OpenSSL engine for opensc 51639beb93cSSam Leffler * 51739beb93cSSam Leffler * This is an OpenSSL specific configuration option for loading OpenSC 51839beb93cSSam Leffler * engine (engine_opensc.so); if %NULL, this engine is not loaded. 51939beb93cSSam Leffler */ 52039beb93cSSam Leffler char *opensc_engine_path; 52139beb93cSSam Leffler 52239beb93cSSam Leffler /** 52339beb93cSSam Leffler * pkcs11_engine_path - Path to the OpenSSL engine for PKCS#11 52439beb93cSSam Leffler * 52539beb93cSSam Leffler * This is an OpenSSL specific configuration option for loading PKCS#11 52639beb93cSSam Leffler * engine (engine_pkcs11.so); if %NULL, this engine is not loaded. 52739beb93cSSam Leffler */ 52839beb93cSSam Leffler char *pkcs11_engine_path; 52939beb93cSSam Leffler 53039beb93cSSam Leffler /** 53139beb93cSSam Leffler * pkcs11_module_path - Path to the OpenSSL OpenSC/PKCS#11 module 53239beb93cSSam Leffler * 53339beb93cSSam Leffler * This is an OpenSSL specific configuration option for configuring 53439beb93cSSam Leffler * path to OpenSC/PKCS#11 engine (opensc-pkcs11.so); if %NULL, this 53539beb93cSSam Leffler * module is not loaded. 53639beb93cSSam Leffler */ 53739beb93cSSam Leffler char *pkcs11_module_path; 53839beb93cSSam Leffler 53939beb93cSSam Leffler /** 5405b9c547cSRui Paulo * openssl_ciphers - OpenSSL cipher string 5415b9c547cSRui Paulo * 5425b9c547cSRui Paulo * This is an OpenSSL specific configuration option for configuring the 5435b9c547cSRui Paulo * default ciphers. If not set, "DEFAULT:!EXP:!LOW" is used as the 5445b9c547cSRui Paulo * default. 5455b9c547cSRui Paulo */ 5465b9c547cSRui Paulo char *openssl_ciphers; 5475b9c547cSRui Paulo 5485b9c547cSRui Paulo /** 549f05cddf9SRui Paulo * pcsc_reader - PC/SC reader name prefix 550f05cddf9SRui Paulo * 551f05cddf9SRui Paulo * If not %NULL, PC/SC reader with a name that matches this prefix is 552f05cddf9SRui Paulo * initialized for SIM/USIM access. Empty string can be used to match 553f05cddf9SRui Paulo * the first available reader. 554f05cddf9SRui Paulo */ 555f05cddf9SRui Paulo char *pcsc_reader; 556f05cddf9SRui Paulo 557f05cddf9SRui Paulo /** 558f05cddf9SRui Paulo * pcsc_pin - PIN for USIM, GSM SIM, and smartcards 559f05cddf9SRui Paulo * 560f05cddf9SRui Paulo * This field is used to configure PIN for SIM/USIM for EAP-SIM and 561f05cddf9SRui Paulo * EAP-AKA. If left out, this will be asked through control interface. 562f05cddf9SRui Paulo */ 563f05cddf9SRui Paulo char *pcsc_pin; 564f05cddf9SRui Paulo 565f05cddf9SRui Paulo /** 5665b9c547cSRui Paulo * external_sim - Use external processing for SIM/USIM operations 5675b9c547cSRui Paulo */ 5685b9c547cSRui Paulo int external_sim; 5695b9c547cSRui Paulo 5705b9c547cSRui Paulo /** 57139beb93cSSam Leffler * driver_param - Driver interface parameters 57239beb93cSSam Leffler * 57339beb93cSSam Leffler * This text string is passed to the selected driver interface with the 57439beb93cSSam Leffler * optional struct wpa_driver_ops::set_param() handler. This can be 57539beb93cSSam Leffler * used to configure driver specific options without having to add new 57639beb93cSSam Leffler * driver interface functionality. 57739beb93cSSam Leffler */ 57839beb93cSSam Leffler char *driver_param; 57939beb93cSSam Leffler 58039beb93cSSam Leffler /** 58139beb93cSSam Leffler * dot11RSNAConfigPMKLifetime - Maximum lifetime of a PMK 58239beb93cSSam Leffler * 58339beb93cSSam Leffler * dot11 MIB variable for the maximum lifetime of a PMK in the PMK 58439beb93cSSam Leffler * cache (unit: seconds). 58539beb93cSSam Leffler */ 58639beb93cSSam Leffler unsigned int dot11RSNAConfigPMKLifetime; 58739beb93cSSam Leffler 58839beb93cSSam Leffler /** 58939beb93cSSam Leffler * dot11RSNAConfigPMKReauthThreshold - PMK re-authentication threshold 59039beb93cSSam Leffler * 59139beb93cSSam Leffler * dot11 MIB variable for the percentage of the PMK lifetime 59239beb93cSSam Leffler * that should expire before an IEEE 802.1X reauthentication occurs. 59339beb93cSSam Leffler */ 59439beb93cSSam Leffler unsigned int dot11RSNAConfigPMKReauthThreshold; 59539beb93cSSam Leffler 59639beb93cSSam Leffler /** 59739beb93cSSam Leffler * dot11RSNAConfigSATimeout - Security association timeout 59839beb93cSSam Leffler * 59939beb93cSSam Leffler * dot11 MIB variable for the maximum time a security association 60039beb93cSSam Leffler * shall take to set up (unit: seconds). 60139beb93cSSam Leffler */ 60239beb93cSSam Leffler unsigned int dot11RSNAConfigSATimeout; 60339beb93cSSam Leffler 60439beb93cSSam Leffler /** 60539beb93cSSam Leffler * update_config - Is wpa_supplicant allowed to update configuration 60639beb93cSSam Leffler * 60739beb93cSSam Leffler * This variable control whether wpa_supplicant is allow to re-write 60839beb93cSSam Leffler * its configuration with wpa_config_write(). If this is zero, 60939beb93cSSam Leffler * configuration data is only changed in memory and the external data 61039beb93cSSam Leffler * is not overriden. If this is non-zero, wpa_supplicant will update 61139beb93cSSam Leffler * the configuration data (e.g., a file) whenever configuration is 61239beb93cSSam Leffler * changed. This update may replace the old configuration which can 61339beb93cSSam Leffler * remove comments from it in case of a text file configuration. 61439beb93cSSam Leffler */ 61539beb93cSSam Leffler int update_config; 61639beb93cSSam Leffler 61739beb93cSSam Leffler /** 61839beb93cSSam Leffler * blobs - Configuration blobs 61939beb93cSSam Leffler */ 62039beb93cSSam Leffler struct wpa_config_blob *blobs; 62139beb93cSSam Leffler 62239beb93cSSam Leffler /** 62339beb93cSSam Leffler * uuid - Universally Unique IDentifier (UUID; see RFC 4122) for WPS 62439beb93cSSam Leffler */ 62539beb93cSSam Leffler u8 uuid[16]; 62639beb93cSSam Leffler 62739beb93cSSam Leffler /** 62839beb93cSSam Leffler * device_name - Device Name (WPS) 62939beb93cSSam Leffler * User-friendly description of device; up to 32 octets encoded in 63039beb93cSSam Leffler * UTF-8 63139beb93cSSam Leffler */ 63239beb93cSSam Leffler char *device_name; 63339beb93cSSam Leffler 63439beb93cSSam Leffler /** 63539beb93cSSam Leffler * manufacturer - Manufacturer (WPS) 63639beb93cSSam Leffler * The manufacturer of the device (up to 64 ASCII characters) 63739beb93cSSam Leffler */ 63839beb93cSSam Leffler char *manufacturer; 63939beb93cSSam Leffler 64039beb93cSSam Leffler /** 64139beb93cSSam Leffler * model_name - Model Name (WPS) 64239beb93cSSam Leffler * Model of the device (up to 32 ASCII characters) 64339beb93cSSam Leffler */ 64439beb93cSSam Leffler char *model_name; 64539beb93cSSam Leffler 64639beb93cSSam Leffler /** 64739beb93cSSam Leffler * model_number - Model Number (WPS) 64839beb93cSSam Leffler * Additional device description (up to 32 ASCII characters) 64939beb93cSSam Leffler */ 65039beb93cSSam Leffler char *model_number; 65139beb93cSSam Leffler 65239beb93cSSam Leffler /** 65339beb93cSSam Leffler * serial_number - Serial Number (WPS) 65439beb93cSSam Leffler * Serial number of the device (up to 32 characters) 65539beb93cSSam Leffler */ 65639beb93cSSam Leffler char *serial_number; 65739beb93cSSam Leffler 65839beb93cSSam Leffler /** 65939beb93cSSam Leffler * device_type - Primary Device Type (WPS) 66039beb93cSSam Leffler */ 661f05cddf9SRui Paulo u8 device_type[WPS_DEV_TYPE_LEN]; 66239beb93cSSam Leffler 66339beb93cSSam Leffler /** 664e28a4053SRui Paulo * config_methods - Config Methods 665e28a4053SRui Paulo * 666e28a4053SRui Paulo * This is a space-separated list of supported WPS configuration 667f05cddf9SRui Paulo * methods. For example, "label virtual_display virtual_push_button 668f05cddf9SRui Paulo * keypad". 669e28a4053SRui Paulo * Available methods: usba ethernet label display ext_nfc_token 670f05cddf9SRui Paulo * int_nfc_token nfc_interface push_button keypad 671f05cddf9SRui Paulo * virtual_display physical_display 672f05cddf9SRui Paulo * virtual_push_button physical_push_button. 673e28a4053SRui Paulo */ 674e28a4053SRui Paulo char *config_methods; 675e28a4053SRui Paulo 676e28a4053SRui Paulo /** 67739beb93cSSam Leffler * os_version - OS Version (WPS) 67839beb93cSSam Leffler * 4-octet operating system version number 67939beb93cSSam Leffler */ 68039beb93cSSam Leffler u8 os_version[4]; 68139beb93cSSam Leffler 68239beb93cSSam Leffler /** 68339beb93cSSam Leffler * country - Country code 68439beb93cSSam Leffler * 68539beb93cSSam Leffler * This is the ISO/IEC alpha2 country code for which we are operating 68639beb93cSSam Leffler * in 68739beb93cSSam Leffler */ 68839beb93cSSam Leffler char country[2]; 68939beb93cSSam Leffler 69039beb93cSSam Leffler /** 69139beb93cSSam Leffler * wps_cred_processing - Credential processing 69239beb93cSSam Leffler * 69339beb93cSSam Leffler * 0 = process received credentials internally 69439beb93cSSam Leffler * 1 = do not process received credentials; just pass them over 69539beb93cSSam Leffler * ctrl_iface to external program(s) 69639beb93cSSam Leffler * 2 = process received credentials internally and pass them over 69739beb93cSSam Leffler * ctrl_iface to external program(s) 69839beb93cSSam Leffler */ 69939beb93cSSam Leffler int wps_cred_processing; 700e28a4053SRui Paulo 701f05cddf9SRui Paulo #define MAX_SEC_DEVICE_TYPES 5 702f05cddf9SRui Paulo /** 703f05cddf9SRui Paulo * sec_device_types - Secondary Device Types (P2P) 704f05cddf9SRui Paulo */ 705f05cddf9SRui Paulo u8 sec_device_type[MAX_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN]; 706f05cddf9SRui Paulo int num_sec_device_types; 707f05cddf9SRui Paulo 708f05cddf9SRui Paulo int p2p_listen_reg_class; 709f05cddf9SRui Paulo int p2p_listen_channel; 710f05cddf9SRui Paulo int p2p_oper_reg_class; 711f05cddf9SRui Paulo int p2p_oper_channel; 712f05cddf9SRui Paulo int p2p_go_intent; 713f05cddf9SRui Paulo char *p2p_ssid_postfix; 714f05cddf9SRui Paulo int persistent_reconnect; 715f05cddf9SRui Paulo int p2p_intra_bss; 716f05cddf9SRui Paulo unsigned int num_p2p_pref_chan; 717f05cddf9SRui Paulo struct p2p_channel *p2p_pref_chan; 7185b9c547cSRui Paulo struct wpa_freq_range_list p2p_no_go_freq; 7195b9c547cSRui Paulo int p2p_add_cli_chan; 7205b9c547cSRui Paulo int p2p_ignore_shared_freq; 7215b9c547cSRui Paulo int p2p_optimize_listen_chan; 722f05cddf9SRui Paulo 723f05cddf9SRui Paulo struct wpabuf *wps_vendor_ext_m1; 724f05cddf9SRui Paulo 725f05cddf9SRui Paulo #define MAX_WPS_VENDOR_EXT 10 726f05cddf9SRui Paulo /** 727f05cddf9SRui Paulo * wps_vendor_ext - Vendor extension attributes in WPS 728f05cddf9SRui Paulo */ 729f05cddf9SRui Paulo struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXT]; 730f05cddf9SRui Paulo 731f05cddf9SRui Paulo /** 732f05cddf9SRui Paulo * p2p_group_idle - Maximum idle time in seconds for P2P group 733f05cddf9SRui Paulo * 734f05cddf9SRui Paulo * This value controls how long a P2P group is maintained after there 735f05cddf9SRui Paulo * is no other members in the group. As a GO, this means no associated 736f05cddf9SRui Paulo * stations in the group. As a P2P client, this means no GO seen in 737f05cddf9SRui Paulo * scan results. The maximum idle time is specified in seconds with 0 738f05cddf9SRui Paulo * indicating no time limit, i.e., the P2P group remains in active 739f05cddf9SRui Paulo * state indefinitely until explicitly removed. As a P2P client, the 740f05cddf9SRui Paulo * maximum idle time of P2P_MAX_CLIENT_IDLE seconds is enforced, i.e., 741f05cddf9SRui Paulo * this parameter is mainly meant for GO use and for P2P client, it can 742f05cddf9SRui Paulo * only be used to reduce the default timeout to smaller value. A 743f05cddf9SRui Paulo * special value -1 can be used to configure immediate removal of the 744f05cddf9SRui Paulo * group for P2P client role on any disconnection after the data 745f05cddf9SRui Paulo * connection has been established. 746f05cddf9SRui Paulo */ 747f05cddf9SRui Paulo int p2p_group_idle; 748f05cddf9SRui Paulo 749e28a4053SRui Paulo /** 750325151a3SRui Paulo * p2p_go_freq_change_policy - The GO frequency change policy 751325151a3SRui Paulo * 752325151a3SRui Paulo * This controls the behavior of the GO when there is a change in the 753325151a3SRui Paulo * map of the currently used frequencies in case more than one channel 754325151a3SRui Paulo * is supported. 755325151a3SRui Paulo * 756325151a3SRui Paulo * @P2P_GO_FREQ_MOVE_SCM: Prefer working in a single channel mode if 757325151a3SRui Paulo * possible. In case the GO is the only interface using its frequency 758325151a3SRui Paulo * and there are other station interfaces on other frequencies, the GO 759325151a3SRui Paulo * will migrate to one of these frequencies. 760325151a3SRui Paulo * 761325151a3SRui Paulo * @P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS: Same as P2P_GO_FREQ_MOVE_SCM, 762325151a3SRui Paulo * but a transition is possible only in case one of the other used 763325151a3SRui Paulo * frequencies is one of the frequencies in the intersection of the 764325151a3SRui Paulo * frequency list of the local device and the peer device. 765325151a3SRui Paulo * 766325151a3SRui Paulo * @P2P_GO_FREQ_MOVE_STAY: Prefer to stay on the current frequency. 767*780fb4a2SCy Schubert * 768*780fb4a2SCy Schubert * @P2P_GO_FREQ_MOVE_SCM_ECSA: Same as 769*780fb4a2SCy Schubert * P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS but a transition is possible only 770*780fb4a2SCy Schubert * if all the group members advertise eCSA support. 771325151a3SRui Paulo */ 772325151a3SRui Paulo enum { 773325151a3SRui Paulo P2P_GO_FREQ_MOVE_SCM = 0, 774325151a3SRui Paulo P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS = 1, 775325151a3SRui Paulo P2P_GO_FREQ_MOVE_STAY = 2, 776*780fb4a2SCy Schubert P2P_GO_FREQ_MOVE_SCM_ECSA = 3, 777*780fb4a2SCy Schubert P2P_GO_FREQ_MOVE_MAX = P2P_GO_FREQ_MOVE_SCM_ECSA, 778325151a3SRui Paulo } p2p_go_freq_change_policy; 779325151a3SRui Paulo 780325151a3SRui Paulo #define DEFAULT_P2P_GO_FREQ_MOVE P2P_GO_FREQ_MOVE_STAY 781325151a3SRui Paulo 782325151a3SRui Paulo /** 7835b9c547cSRui Paulo * p2p_passphrase_len - Passphrase length (8..63) for P2P GO 7845b9c547cSRui Paulo * 7855b9c547cSRui Paulo * This parameter controls the length of the random passphrase that is 7865b9c547cSRui Paulo * generated at the GO. 7875b9c547cSRui Paulo */ 7885b9c547cSRui Paulo unsigned int p2p_passphrase_len; 7895b9c547cSRui Paulo 7905b9c547cSRui Paulo /** 791e28a4053SRui Paulo * bss_max_count - Maximum number of BSS entries to keep in memory 792e28a4053SRui Paulo */ 793e28a4053SRui Paulo unsigned int bss_max_count; 794e28a4053SRui Paulo 795e28a4053SRui Paulo /** 796f05cddf9SRui Paulo * bss_expiration_age - BSS entry age after which it can be expired 797f05cddf9SRui Paulo * 798f05cddf9SRui Paulo * This value controls the time in seconds after which a BSS entry 799f05cddf9SRui Paulo * gets removed if it has not been updated or is not in use. 800f05cddf9SRui Paulo */ 801f05cddf9SRui Paulo unsigned int bss_expiration_age; 802f05cddf9SRui Paulo 803f05cddf9SRui Paulo /** 804f05cddf9SRui Paulo * bss_expiration_scan_count - Expire BSS after number of scans 805f05cddf9SRui Paulo * 806f05cddf9SRui Paulo * If the BSS entry has not been seen in this many scans, it will be 807f05cddf9SRui Paulo * removed. A value of 1 means that entry is removed after the first 808f05cddf9SRui Paulo * scan in which the BSSID is not seen. Larger values can be used 809f05cddf9SRui Paulo * to avoid BSS entries disappearing if they are not visible in 810f05cddf9SRui Paulo * every scan (e.g., low signal quality or interference). 811f05cddf9SRui Paulo */ 812f05cddf9SRui Paulo unsigned int bss_expiration_scan_count; 813f05cddf9SRui Paulo 814f05cddf9SRui Paulo /** 815e28a4053SRui Paulo * filter_ssids - SSID-based scan result filtering 816e28a4053SRui Paulo * 817e28a4053SRui Paulo * 0 = do not filter scan results 818e28a4053SRui Paulo * 1 = only include configured SSIDs in scan results/BSS table 819e28a4053SRui Paulo */ 820e28a4053SRui Paulo int filter_ssids; 821f05cddf9SRui Paulo 822f05cddf9SRui Paulo /** 823f05cddf9SRui Paulo * filter_rssi - RSSI-based scan result filtering 824f05cddf9SRui Paulo * 825f05cddf9SRui Paulo * 0 = do not filter scan results 826f05cddf9SRui Paulo * -n = filter scan results below -n dBm 827f05cddf9SRui Paulo */ 828f05cddf9SRui Paulo int filter_rssi; 829f05cddf9SRui Paulo 830f05cddf9SRui Paulo /** 831f05cddf9SRui Paulo * max_num_sta - Maximum number of STAs in an AP/P2P GO 832f05cddf9SRui Paulo */ 833f05cddf9SRui Paulo unsigned int max_num_sta; 834f05cddf9SRui Paulo 835f05cddf9SRui Paulo /** 8365b9c547cSRui Paulo * freq_list - Array of allowed scan frequencies or %NULL for all 8375b9c547cSRui Paulo * 8385b9c547cSRui Paulo * This is an optional zero-terminated array of frequencies in 8395b9c547cSRui Paulo * megahertz (MHz) to allow for narrowing scanning range. 8405b9c547cSRui Paulo */ 8415b9c547cSRui Paulo int *freq_list; 8425b9c547cSRui Paulo 8435b9c547cSRui Paulo /** 8445b9c547cSRui Paulo * scan_cur_freq - Whether to scan only the current channel 8455b9c547cSRui Paulo * 8465b9c547cSRui Paulo * If true, attempt to scan only the current channel if any other 8475b9c547cSRui Paulo * VIFs on this radio are already associated on a particular channel. 8485b9c547cSRui Paulo */ 8495b9c547cSRui Paulo int scan_cur_freq; 8505b9c547cSRui Paulo 8515b9c547cSRui Paulo /** 852f05cddf9SRui Paulo * changed_parameters - Bitmap of changed parameters since last update 853f05cddf9SRui Paulo */ 854f05cddf9SRui Paulo unsigned int changed_parameters; 855f05cddf9SRui Paulo 856f05cddf9SRui Paulo /** 857f05cddf9SRui Paulo * disassoc_low_ack - Disassocicate stations with massive packet loss 858f05cddf9SRui Paulo */ 859f05cddf9SRui Paulo int disassoc_low_ack; 860f05cddf9SRui Paulo 861f05cddf9SRui Paulo /** 862f05cddf9SRui Paulo * interworking - Whether Interworking (IEEE 802.11u) is enabled 863f05cddf9SRui Paulo */ 864f05cddf9SRui Paulo int interworking; 865f05cddf9SRui Paulo 866f05cddf9SRui Paulo /** 867f05cddf9SRui Paulo * access_network_type - Access Network Type 868f05cddf9SRui Paulo * 869f05cddf9SRui Paulo * When Interworking is enabled, scans will be limited to APs that 870f05cddf9SRui Paulo * advertise the specified Access Network Type (0..15; with 15 871f05cddf9SRui Paulo * indicating wildcard match). 872f05cddf9SRui Paulo */ 873f05cddf9SRui Paulo int access_network_type; 874f05cddf9SRui Paulo 875f05cddf9SRui Paulo /** 876f05cddf9SRui Paulo * hessid - Homogenous ESS identifier 877f05cddf9SRui Paulo * 878f05cddf9SRui Paulo * If this is set (any octet is non-zero), scans will be used to 879f05cddf9SRui Paulo * request response only from BSSes belonging to the specified 880f05cddf9SRui Paulo * Homogeneous ESS. This is used only if interworking is enabled. 881f05cddf9SRui Paulo */ 882f05cddf9SRui Paulo u8 hessid[ETH_ALEN]; 883f05cddf9SRui Paulo 884f05cddf9SRui Paulo /** 885f05cddf9SRui Paulo * hs20 - Hotspot 2.0 886f05cddf9SRui Paulo */ 887f05cddf9SRui Paulo int hs20; 888f05cddf9SRui Paulo 889f05cddf9SRui Paulo /** 890f05cddf9SRui Paulo * pbc_in_m1 - AP mode WPS probing workaround for PBC with Windows 7 891f05cddf9SRui Paulo * 892f05cddf9SRui Paulo * Windows 7 uses incorrect way of figuring out AP's WPS capabilities 893f05cddf9SRui Paulo * by acting as a Registrar and using M1 from the AP. The config 894f05cddf9SRui Paulo * methods attribute in that message is supposed to indicate only the 895f05cddf9SRui Paulo * configuration method supported by the AP in Enrollee role, i.e., to 896f05cddf9SRui Paulo * add an external Registrar. For that case, PBC shall not be used and 897f05cddf9SRui Paulo * as such, the PushButton config method is removed from M1 by default. 898f05cddf9SRui Paulo * If pbc_in_m1=1 is included in the configuration file, the PushButton 899f05cddf9SRui Paulo * config method is left in M1 (if included in config_methods 900f05cddf9SRui Paulo * parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from 901f05cddf9SRui Paulo * a label in the AP). 902f05cddf9SRui Paulo */ 903f05cddf9SRui Paulo int pbc_in_m1; 904f05cddf9SRui Paulo 905f05cddf9SRui Paulo /** 906f05cddf9SRui Paulo * autoscan - Automatic scan parameters or %NULL if none 907f05cddf9SRui Paulo * 908f05cddf9SRui Paulo * This is an optional set of parameters for automatic scanning 909f05cddf9SRui Paulo * within an interface in following format: 910f05cddf9SRui Paulo * <autoscan module name>:<module parameters> 911f05cddf9SRui Paulo */ 912f05cddf9SRui Paulo char *autoscan; 913f05cddf9SRui Paulo 914f05cddf9SRui Paulo /** 9155b9c547cSRui Paulo * wps_nfc_pw_from_config - NFC Device Password was read from config 9165b9c547cSRui Paulo * 9175b9c547cSRui Paulo * This parameter can be determined whether the NFC Device Password was 9185b9c547cSRui Paulo * included in the configuration (1) or generated dynamically (0). Only 9195b9c547cSRui Paulo * the former case is re-written back to the configuration file. 9205b9c547cSRui Paulo */ 9215b9c547cSRui Paulo int wps_nfc_pw_from_config; 9225b9c547cSRui Paulo 9235b9c547cSRui Paulo /** 924f05cddf9SRui Paulo * wps_nfc_dev_pw_id - NFC Device Password ID for password token 925f05cddf9SRui Paulo */ 926f05cddf9SRui Paulo int wps_nfc_dev_pw_id; 927f05cddf9SRui Paulo 928f05cddf9SRui Paulo /** 929f05cddf9SRui Paulo * wps_nfc_dh_pubkey - NFC DH Public Key for password token 930f05cddf9SRui Paulo */ 931f05cddf9SRui Paulo struct wpabuf *wps_nfc_dh_pubkey; 932f05cddf9SRui Paulo 933f05cddf9SRui Paulo /** 934f05cddf9SRui Paulo * wps_nfc_dh_privkey - NFC DH Private Key for password token 935f05cddf9SRui Paulo */ 936f05cddf9SRui Paulo struct wpabuf *wps_nfc_dh_privkey; 937f05cddf9SRui Paulo 938f05cddf9SRui Paulo /** 939f05cddf9SRui Paulo * wps_nfc_dev_pw - NFC Device Password for password token 940f05cddf9SRui Paulo */ 941f05cddf9SRui Paulo struct wpabuf *wps_nfc_dev_pw; 942f05cddf9SRui Paulo 943f05cddf9SRui Paulo /** 944f05cddf9SRui Paulo * ext_password_backend - External password backend or %NULL if none 945f05cddf9SRui Paulo * 946f05cddf9SRui Paulo * format: <backend name>[:<optional backend parameters>] 947f05cddf9SRui Paulo */ 948f05cddf9SRui Paulo char *ext_password_backend; 949f05cddf9SRui Paulo 950f05cddf9SRui Paulo /* 951f05cddf9SRui Paulo * p2p_go_max_inactivity - Timeout in seconds to detect STA inactivity 952f05cddf9SRui Paulo * 953f05cddf9SRui Paulo * This timeout value is used in P2P GO mode to clean up 954f05cddf9SRui Paulo * inactive stations. 955f05cddf9SRui Paulo * By default: 300 seconds. 956f05cddf9SRui Paulo */ 957f05cddf9SRui Paulo int p2p_go_max_inactivity; 958f05cddf9SRui Paulo 959f05cddf9SRui Paulo struct hostapd_wmm_ac_params wmm_ac_params[4]; 960f05cddf9SRui Paulo 961f05cddf9SRui Paulo /** 962f05cddf9SRui Paulo * auto_interworking - Whether to use network selection automatically 963f05cddf9SRui Paulo * 964f05cddf9SRui Paulo * 0 = do not automatically go through Interworking network selection 965f05cddf9SRui Paulo * (i.e., require explicit interworking_select command for this) 966f05cddf9SRui Paulo * 1 = perform Interworking network selection if one or more 967f05cddf9SRui Paulo * credentials have been configured and scan did not find a 968f05cddf9SRui Paulo * matching network block 969f05cddf9SRui Paulo */ 970f05cddf9SRui Paulo int auto_interworking; 971f05cddf9SRui Paulo 972f05cddf9SRui Paulo /** 973f05cddf9SRui Paulo * p2p_go_ht40 - Default mode for HT40 enable when operating as GO. 974f05cddf9SRui Paulo * 975f05cddf9SRui Paulo * This will take effect for p2p_group_add, p2p_connect, and p2p_invite. 976f05cddf9SRui Paulo * Note that regulatory constraints and driver capabilities are 977f05cddf9SRui Paulo * consulted anyway, so setting it to 1 can't do real harm. 978f05cddf9SRui Paulo * By default: 0 (disabled) 979f05cddf9SRui Paulo */ 980f05cddf9SRui Paulo int p2p_go_ht40; 981f05cddf9SRui Paulo 982f05cddf9SRui Paulo /** 9835b9c547cSRui Paulo * p2p_go_vht - Default mode for VHT enable when operating as GO 9845b9c547cSRui Paulo * 9855b9c547cSRui Paulo * This will take effect for p2p_group_add, p2p_connect, and p2p_invite. 9865b9c547cSRui Paulo * Note that regulatory constraints and driver capabilities are 9875b9c547cSRui Paulo * consulted anyway, so setting it to 1 can't do real harm. 9885b9c547cSRui Paulo * By default: 0 (disabled) 9895b9c547cSRui Paulo */ 9905b9c547cSRui Paulo int p2p_go_vht; 9915b9c547cSRui Paulo 9925b9c547cSRui Paulo /** 9935b9c547cSRui Paulo * p2p_go_ctwindow - CTWindow to use when operating as GO 9945b9c547cSRui Paulo * 9955b9c547cSRui Paulo * By default: 0 (no CTWindow). Values 0-127 can be used to indicate 9965b9c547cSRui Paulo * the length of the CTWindow in TUs. 9975b9c547cSRui Paulo */ 9985b9c547cSRui Paulo int p2p_go_ctwindow; 9995b9c547cSRui Paulo 10005b9c547cSRui Paulo /** 1001f05cddf9SRui Paulo * p2p_disabled - Whether P2P operations are disabled for this interface 1002f05cddf9SRui Paulo */ 1003f05cddf9SRui Paulo int p2p_disabled; 1004f05cddf9SRui Paulo 1005f05cddf9SRui Paulo /** 1006f05cddf9SRui Paulo * p2p_no_group_iface - Whether group interfaces can be used 1007f05cddf9SRui Paulo * 1008f05cddf9SRui Paulo * By default, wpa_supplicant will create a separate interface for P2P 1009f05cddf9SRui Paulo * group operations if the driver supports this. This functionality can 1010f05cddf9SRui Paulo * be disabled by setting this parameter to 1. In that case, the same 1011f05cddf9SRui Paulo * interface that was used for the P2P management operations is used 1012f05cddf9SRui Paulo * also for the group operation. 1013f05cddf9SRui Paulo */ 1014f05cddf9SRui Paulo int p2p_no_group_iface; 1015f05cddf9SRui Paulo 1016f05cddf9SRui Paulo /** 1017325151a3SRui Paulo * p2p_cli_probe - Enable/disable P2P CLI probe request handling 1018325151a3SRui Paulo * 1019325151a3SRui Paulo * If this parameter is set to 1, a connected P2P Client will receive 1020325151a3SRui Paulo * and handle Probe Request frames. Setting this parameter to 0 1021325151a3SRui Paulo * disables this option. Default value: 0. 1022325151a3SRui Paulo * 1023325151a3SRui Paulo * Note: Setting this property at run time takes effect on the following 1024325151a3SRui Paulo * interface state transition to/from the WPA_COMPLETED state. 1025325151a3SRui Paulo */ 1026325151a3SRui Paulo int p2p_cli_probe; 1027325151a3SRui Paulo 1028325151a3SRui Paulo /** 1029f05cddf9SRui Paulo * okc - Whether to enable opportunistic key caching by default 1030f05cddf9SRui Paulo * 1031f05cddf9SRui Paulo * By default, OKC is disabled unless enabled by the per-network 1032f05cddf9SRui Paulo * proactive_key_caching=1 parameter. okc=1 can be used to change this 1033f05cddf9SRui Paulo * default behavior. 1034f05cddf9SRui Paulo */ 1035f05cddf9SRui Paulo int okc; 1036f05cddf9SRui Paulo 1037f05cddf9SRui Paulo /** 1038f05cddf9SRui Paulo * pmf - Whether to enable/require PMF by default 1039f05cddf9SRui Paulo * 1040f05cddf9SRui Paulo * By default, PMF is disabled unless enabled by the per-network 1041f05cddf9SRui Paulo * ieee80211w=1 or ieee80211w=2 parameter. pmf=1/2 can be used to change 1042*780fb4a2SCy Schubert * this default behavior for RSN network (this is not applicable for 1043*780fb4a2SCy Schubert * non-RSN cases). 1044f05cddf9SRui Paulo */ 1045f05cddf9SRui Paulo enum mfp_options pmf; 10465b9c547cSRui Paulo 10475b9c547cSRui Paulo /** 10485b9c547cSRui Paulo * sae_groups - Preference list of enabled groups for SAE 10495b9c547cSRui Paulo * 10505b9c547cSRui Paulo * By default (if this parameter is not set), the mandatory group 19 10515b9c547cSRui Paulo * (ECC group defined over a 256-bit prime order field) is preferred, 10525b9c547cSRui Paulo * but other groups are also enabled. If this parameter is set, the 10535b9c547cSRui Paulo * groups will be tried in the indicated order. 10545b9c547cSRui Paulo */ 10555b9c547cSRui Paulo int *sae_groups; 10565b9c547cSRui Paulo 10575b9c547cSRui Paulo /** 10585b9c547cSRui Paulo * dtim_period - Default DTIM period in Beacon intervals 10595b9c547cSRui Paulo * 10605b9c547cSRui Paulo * This parameter can be used to set the default value for network 10615b9c547cSRui Paulo * blocks that do not specify dtim_period. 10625b9c547cSRui Paulo */ 10635b9c547cSRui Paulo int dtim_period; 10645b9c547cSRui Paulo 10655b9c547cSRui Paulo /** 10665b9c547cSRui Paulo * beacon_int - Default Beacon interval in TU 10675b9c547cSRui Paulo * 10685b9c547cSRui Paulo * This parameter can be used to set the default value for network 10695b9c547cSRui Paulo * blocks that do not specify beacon_int. 10705b9c547cSRui Paulo */ 10715b9c547cSRui Paulo int beacon_int; 10725b9c547cSRui Paulo 10735b9c547cSRui Paulo /** 10745b9c547cSRui Paulo * ap_vendor_elements: Vendor specific elements for Beacon/ProbeResp 10755b9c547cSRui Paulo * 10765b9c547cSRui Paulo * This parameter can be used to define additional vendor specific 10775b9c547cSRui Paulo * elements for Beacon and Probe Response frames in AP/P2P GO mode. The 10785b9c547cSRui Paulo * format for these element(s) is a hexdump of the raw information 10795b9c547cSRui Paulo * elements (id+len+payload for one or more elements). 10805b9c547cSRui Paulo */ 10815b9c547cSRui Paulo struct wpabuf *ap_vendor_elements; 10825b9c547cSRui Paulo 10835b9c547cSRui Paulo /** 10845b9c547cSRui Paulo * ignore_old_scan_res - Ignore scan results older than request 10855b9c547cSRui Paulo * 10865b9c547cSRui Paulo * The driver may have a cache of scan results that makes it return 10875b9c547cSRui Paulo * information that is older than our scan trigger. This parameter can 10885b9c547cSRui Paulo * be used to configure such old information to be ignored instead of 10895b9c547cSRui Paulo * allowing it to update the internal BSS table. 10905b9c547cSRui Paulo */ 10915b9c547cSRui Paulo int ignore_old_scan_res; 10925b9c547cSRui Paulo 10935b9c547cSRui Paulo /** 10945b9c547cSRui Paulo * sched_scan_interval - schedule scan interval 10955b9c547cSRui Paulo */ 10965b9c547cSRui Paulo unsigned int sched_scan_interval; 10975b9c547cSRui Paulo 10985b9c547cSRui Paulo /** 10995b9c547cSRui Paulo * tdls_external_control - External control for TDLS setup requests 11005b9c547cSRui Paulo * 11015b9c547cSRui Paulo * Enable TDLS mode where external programs are given the control 11025b9c547cSRui Paulo * to specify the TDLS link to get established to the driver. The 11035b9c547cSRui Paulo * driver requests the TDLS setup to the supplicant only for the 11045b9c547cSRui Paulo * specified TDLS peers. 11055b9c547cSRui Paulo */ 11065b9c547cSRui Paulo int tdls_external_control; 11075b9c547cSRui Paulo 11085b9c547cSRui Paulo u8 ip_addr_go[4]; 11095b9c547cSRui Paulo u8 ip_addr_mask[4]; 11105b9c547cSRui Paulo u8 ip_addr_start[4]; 11115b9c547cSRui Paulo u8 ip_addr_end[4]; 11125b9c547cSRui Paulo 11135b9c547cSRui Paulo /** 11145b9c547cSRui Paulo * osu_dir - OSU provider information directory 11155b9c547cSRui Paulo * 11165b9c547cSRui Paulo * If set, allow FETCH_OSU control interface command to be used to fetch 11175b9c547cSRui Paulo * OSU provider information into all APs and store the results in this 11185b9c547cSRui Paulo * directory. 11195b9c547cSRui Paulo */ 11205b9c547cSRui Paulo char *osu_dir; 11215b9c547cSRui Paulo 11225b9c547cSRui Paulo /** 11235b9c547cSRui Paulo * wowlan_triggers - Wake-on-WLAN triggers 11245b9c547cSRui Paulo * 11255b9c547cSRui Paulo * If set, these wowlan triggers will be configured. 11265b9c547cSRui Paulo */ 11275b9c547cSRui Paulo char *wowlan_triggers; 11285b9c547cSRui Paulo 11295b9c547cSRui Paulo /** 11305b9c547cSRui Paulo * p2p_search_delay - Extra delay between concurrent search iterations 11315b9c547cSRui Paulo * 11325b9c547cSRui Paulo * Add extra delay (in milliseconds) between search iterations when 11335b9c547cSRui Paulo * there is a concurrent operation to make p2p_find friendlier to 11345b9c547cSRui Paulo * concurrent operations by avoiding it from taking 100% of radio 11355b9c547cSRui Paulo * resources. 11365b9c547cSRui Paulo */ 11375b9c547cSRui Paulo unsigned int p2p_search_delay; 11385b9c547cSRui Paulo 11395b9c547cSRui Paulo /** 11405b9c547cSRui Paulo * mac_addr - MAC address policy default 11415b9c547cSRui Paulo * 11425b9c547cSRui Paulo * 0 = use permanent MAC address 11435b9c547cSRui Paulo * 1 = use random MAC address for each ESS connection 11445b9c547cSRui Paulo * 2 = like 1, but maintain OUI (with local admin bit set) 11455b9c547cSRui Paulo * 11465b9c547cSRui Paulo * By default, permanent MAC address is used unless policy is changed by 11475b9c547cSRui Paulo * the per-network mac_addr parameter. Global mac_addr=1 can be used to 11485b9c547cSRui Paulo * change this default behavior. 11495b9c547cSRui Paulo */ 11505b9c547cSRui Paulo int mac_addr; 11515b9c547cSRui Paulo 11525b9c547cSRui Paulo /** 11535b9c547cSRui Paulo * rand_addr_lifetime - Lifetime of random MAC address in seconds 11545b9c547cSRui Paulo */ 11555b9c547cSRui Paulo unsigned int rand_addr_lifetime; 11565b9c547cSRui Paulo 11575b9c547cSRui Paulo /** 11585b9c547cSRui Paulo * preassoc_mac_addr - Pre-association MAC address policy 11595b9c547cSRui Paulo * 11605b9c547cSRui Paulo * 0 = use permanent MAC address 11615b9c547cSRui Paulo * 1 = use random MAC address 11625b9c547cSRui Paulo * 2 = like 1, but maintain OUI (with local admin bit set) 11635b9c547cSRui Paulo */ 11645b9c547cSRui Paulo int preassoc_mac_addr; 11655b9c547cSRui Paulo 11665b9c547cSRui Paulo /** 11675b9c547cSRui Paulo * key_mgmt_offload - Use key management offload 11685b9c547cSRui Paulo * 11695b9c547cSRui Paulo * Key management offload should be used if the device supports it. 11705b9c547cSRui Paulo * Key management offload is the capability of a device operating as 11715b9c547cSRui Paulo * a station to do the exchange necessary to establish temporal keys 11725b9c547cSRui Paulo * during initial RSN connection, after roaming, or during a PTK 11735b9c547cSRui Paulo * rekeying operation. 11745b9c547cSRui Paulo */ 11755b9c547cSRui Paulo int key_mgmt_offload; 11765b9c547cSRui Paulo 11775b9c547cSRui Paulo /** 11785b9c547cSRui Paulo * user_mpm - MPM residency 11795b9c547cSRui Paulo * 11805b9c547cSRui Paulo * 0: MPM lives in driver. 11815b9c547cSRui Paulo * 1: wpa_supplicant handles peering and station allocation. 11825b9c547cSRui Paulo * 11835b9c547cSRui Paulo * If AMPE or SAE is enabled, the MPM is always in userspace. 11845b9c547cSRui Paulo */ 11855b9c547cSRui Paulo int user_mpm; 11865b9c547cSRui Paulo 11875b9c547cSRui Paulo /** 11885b9c547cSRui Paulo * max_peer_links - Maximum number of peer links 11895b9c547cSRui Paulo * 11905b9c547cSRui Paulo * Maximum number of mesh peering currently maintained by the STA. 11915b9c547cSRui Paulo */ 11925b9c547cSRui Paulo int max_peer_links; 11935b9c547cSRui Paulo 11945b9c547cSRui Paulo /** 11955b9c547cSRui Paulo * cert_in_cb - Whether to include a peer certificate dump in events 11965b9c547cSRui Paulo * 11975b9c547cSRui Paulo * This controls whether peer certificates for authentication server and 11985b9c547cSRui Paulo * its certificate chain are included in EAP peer certificate events. 11995b9c547cSRui Paulo */ 12005b9c547cSRui Paulo int cert_in_cb; 12015b9c547cSRui Paulo 12025b9c547cSRui Paulo /** 12035b9c547cSRui Paulo * mesh_max_inactivity - Timeout in seconds to detect STA inactivity 12045b9c547cSRui Paulo * 12055b9c547cSRui Paulo * This timeout value is used in mesh STA to clean up inactive stations. 12065b9c547cSRui Paulo * By default: 300 seconds. 12075b9c547cSRui Paulo */ 12085b9c547cSRui Paulo int mesh_max_inactivity; 12095b9c547cSRui Paulo 12105b9c547cSRui Paulo /** 1211325151a3SRui Paulo * dot11RSNASAERetransPeriod - Timeout to retransmit SAE Auth frame 1212325151a3SRui Paulo * 1213325151a3SRui Paulo * This timeout value is used in mesh STA to retransmit 1214325151a3SRui Paulo * SAE Authentication frame. 1215325151a3SRui Paulo * By default: 1000 milliseconds. 1216325151a3SRui Paulo */ 1217325151a3SRui Paulo int dot11RSNASAERetransPeriod; 1218325151a3SRui Paulo 1219325151a3SRui Paulo /** 12205b9c547cSRui Paulo * passive_scan - Whether to force passive scan for network connection 12215b9c547cSRui Paulo * 12225b9c547cSRui Paulo * This parameter can be used to force only passive scanning to be used 12235b9c547cSRui Paulo * for network connection cases. It should be noted that this will slow 12245b9c547cSRui Paulo * down scan operations and reduce likelihood of finding the AP. In 12255b9c547cSRui Paulo * addition, some use cases will override this due to functional 12265b9c547cSRui Paulo * requirements, e.g., for finding an AP that uses hidden SSID 12275b9c547cSRui Paulo * (scan_ssid=1) or P2P device discovery. 12285b9c547cSRui Paulo */ 12295b9c547cSRui Paulo int passive_scan; 12305b9c547cSRui Paulo 12315b9c547cSRui Paulo /** 12325b9c547cSRui Paulo * reassoc_same_bss_optim - Whether to optimize reassoc-to-same-BSS 12335b9c547cSRui Paulo */ 12345b9c547cSRui Paulo int reassoc_same_bss_optim; 1235325151a3SRui Paulo 1236325151a3SRui Paulo /** 1237325151a3SRui Paulo * wps_priority - Priority for the networks added through WPS 1238325151a3SRui Paulo * 1239325151a3SRui Paulo * This priority value will be set to each network profile that is added 1240325151a3SRui Paulo * by executing the WPS protocol. 1241325151a3SRui Paulo */ 1242325151a3SRui Paulo int wps_priority; 1243325151a3SRui Paulo 1244325151a3SRui Paulo /** 1245325151a3SRui Paulo * fst_group_id - FST group ID 1246325151a3SRui Paulo */ 1247325151a3SRui Paulo char *fst_group_id; 1248325151a3SRui Paulo 1249325151a3SRui Paulo /** 1250325151a3SRui Paulo * fst_priority - priority of the interface within the FST group 1251325151a3SRui Paulo */ 1252325151a3SRui Paulo int fst_priority; 1253325151a3SRui Paulo 1254325151a3SRui Paulo /** 1255325151a3SRui Paulo * fst_llt - default FST LLT (Link-Lost Timeout) to be used for the 1256325151a3SRui Paulo * interface. 1257325151a3SRui Paulo */ 1258325151a3SRui Paulo int fst_llt; 1259*780fb4a2SCy Schubert 1260*780fb4a2SCy Schubert /** 1261*780fb4a2SCy Schubert * wpa_rsc_relaxation - RSC relaxation on GTK installation 1262*780fb4a2SCy Schubert * 1263*780fb4a2SCy Schubert * Values: 1264*780fb4a2SCy Schubert * 0 - use the EAPOL-Key RSC value on GTK installation 1265*780fb4a2SCy Schubert * 1 - use the null RSC if a bogus RSC value is detected in message 3 1266*780fb4a2SCy Schubert * of 4-Way Handshake or message 1 of Group Key Handshake. 1267*780fb4a2SCy Schubert */ 1268*780fb4a2SCy Schubert int wpa_rsc_relaxation; 1269*780fb4a2SCy Schubert 1270*780fb4a2SCy Schubert /** 1271*780fb4a2SCy Schubert * sched_scan_plans - Scan plans for scheduled scan 1272*780fb4a2SCy Schubert * 1273*780fb4a2SCy Schubert * Each scan plan specifies the interval between scans and the number of 1274*780fb4a2SCy Schubert * iterations. The last scan plan only specifies the scan interval and 1275*780fb4a2SCy Schubert * will be run infinitely. 1276*780fb4a2SCy Schubert * 1277*780fb4a2SCy Schubert * format: <interval:iterations> <interval2:iterations2> ... <interval> 1278*780fb4a2SCy Schubert */ 1279*780fb4a2SCy Schubert char *sched_scan_plans; 1280*780fb4a2SCy Schubert 1281*780fb4a2SCy Schubert #ifdef CONFIG_MBO 1282*780fb4a2SCy Schubert /** 1283*780fb4a2SCy Schubert * non_pref_chan - Non-preferred channels list, separated by spaces. 1284*780fb4a2SCy Schubert * 1285*780fb4a2SCy Schubert * format: op_class:chan:preference:reason<:detail> 1286*780fb4a2SCy Schubert * Detail is optional. 1287*780fb4a2SCy Schubert */ 1288*780fb4a2SCy Schubert char *non_pref_chan; 1289*780fb4a2SCy Schubert 1290*780fb4a2SCy Schubert /** 1291*780fb4a2SCy Schubert * mbo_cell_capa - Cellular capabilities for MBO 1292*780fb4a2SCy Schubert */ 1293*780fb4a2SCy Schubert enum mbo_cellular_capa mbo_cell_capa; 1294*780fb4a2SCy Schubert #endif /* CONFIG_MBO */ 1295*780fb4a2SCy Schubert 1296*780fb4a2SCy Schubert /** 1297*780fb4a2SCy Schubert * gas_address3 - GAS Address3 field behavior 1298*780fb4a2SCy Schubert * 1299*780fb4a2SCy Schubert * Values: 1300*780fb4a2SCy Schubert * 0 - P2P specification (Address3 = AP BSSID) 1301*780fb4a2SCy Schubert * 1 = IEEE 802.11 standard compliant (Address3 = Wildcard BSSID when 1302*780fb4a2SCy Schubert * sent to not-associated AP; if associated, AP BSSID) 1303*780fb4a2SCy Schubert */ 1304*780fb4a2SCy Schubert int gas_address3; 1305*780fb4a2SCy Schubert 1306*780fb4a2SCy Schubert /** 1307*780fb4a2SCy Schubert * ftm_responder - Publish FTM (fine timing measurement) 1308*780fb4a2SCy Schubert * responder functionality 1309*780fb4a2SCy Schubert * 1310*780fb4a2SCy Schubert * Values: 1311*780fb4a2SCy Schubert * 0 - do not publish FTM responder functionality (Default) 1312*780fb4a2SCy Schubert * 1 - publish FTM responder functionality in 1313*780fb4a2SCy Schubert * bit 70 of Extended Capabilities element 1314*780fb4a2SCy Schubert * Note, actual FTM responder operation is managed outside 1315*780fb4a2SCy Schubert * wpa_supplicant. 1316*780fb4a2SCy Schubert */ 1317*780fb4a2SCy Schubert int ftm_responder; 1318*780fb4a2SCy Schubert 1319*780fb4a2SCy Schubert /** 1320*780fb4a2SCy Schubert * ftm_initiator - Publish FTM (fine timing measurement) 1321*780fb4a2SCy Schubert * initiator functionality 1322*780fb4a2SCy Schubert * 1323*780fb4a2SCy Schubert * Values: 1324*780fb4a2SCy Schubert * 0 - do not publish FTM initiator functionality (Default) 1325*780fb4a2SCy Schubert * 1 - publish FTM initiator functionality in 1326*780fb4a2SCy Schubert * bit 71 of Extended Capabilities element 1327*780fb4a2SCy Schubert * Note, actual FTM initiator operation is managed outside 1328*780fb4a2SCy Schubert * wpa_supplicant. 1329*780fb4a2SCy Schubert */ 1330*780fb4a2SCy Schubert int ftm_initiator; 133139beb93cSSam Leffler }; 133239beb93cSSam Leffler 133339beb93cSSam Leffler 133439beb93cSSam Leffler /* Prototypes for common functions from config.c */ 133539beb93cSSam Leffler 133639beb93cSSam Leffler void wpa_config_free(struct wpa_config *ssid); 133739beb93cSSam Leffler void wpa_config_free_ssid(struct wpa_ssid *ssid); 1338f05cddf9SRui Paulo void wpa_config_foreach_network(struct wpa_config *config, 1339f05cddf9SRui Paulo void (*func)(void *, struct wpa_ssid *), 1340f05cddf9SRui Paulo void *arg); 134139beb93cSSam Leffler struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id); 134239beb93cSSam Leffler struct wpa_ssid * wpa_config_add_network(struct wpa_config *config); 134339beb93cSSam Leffler int wpa_config_remove_network(struct wpa_config *config, int id); 134439beb93cSSam Leffler void wpa_config_set_network_defaults(struct wpa_ssid *ssid); 134539beb93cSSam Leffler int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value, 134639beb93cSSam Leffler int line); 1347f05cddf9SRui Paulo int wpa_config_set_quoted(struct wpa_ssid *ssid, const char *var, 1348f05cddf9SRui Paulo const char *value); 13495b9c547cSRui Paulo int wpa_config_dump_values(struct wpa_config *config, char *buf, 13505b9c547cSRui Paulo size_t buflen); 13515b9c547cSRui Paulo int wpa_config_get_value(const char *name, struct wpa_config *config, 13525b9c547cSRui Paulo char *buf, size_t buflen); 13535b9c547cSRui Paulo 1354e28a4053SRui Paulo char ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys); 135539beb93cSSam Leffler char * wpa_config_get(struct wpa_ssid *ssid, const char *var); 135639beb93cSSam Leffler char * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var); 135739beb93cSSam Leffler void wpa_config_update_psk(struct wpa_ssid *ssid); 135839beb93cSSam Leffler int wpa_config_add_prio_network(struct wpa_config *config, 135939beb93cSSam Leffler struct wpa_ssid *ssid); 1360e28a4053SRui Paulo int wpa_config_update_prio_list(struct wpa_config *config); 136139beb93cSSam Leffler const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config, 136239beb93cSSam Leffler const char *name); 136339beb93cSSam Leffler void wpa_config_set_blob(struct wpa_config *config, 136439beb93cSSam Leffler struct wpa_config_blob *blob); 136539beb93cSSam Leffler void wpa_config_free_blob(struct wpa_config_blob *blob); 136639beb93cSSam Leffler int wpa_config_remove_blob(struct wpa_config *config, const char *name); 13675b9c547cSRui Paulo void wpa_config_flush_blobs(struct wpa_config *config); 136839beb93cSSam Leffler 1369f05cddf9SRui Paulo struct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id); 1370f05cddf9SRui Paulo struct wpa_cred * wpa_config_add_cred(struct wpa_config *config); 1371f05cddf9SRui Paulo int wpa_config_remove_cred(struct wpa_config *config, int id); 1372f05cddf9SRui Paulo void wpa_config_free_cred(struct wpa_cred *cred); 1373f05cddf9SRui Paulo int wpa_config_set_cred(struct wpa_cred *cred, const char *var, 1374f05cddf9SRui Paulo const char *value, int line); 13755b9c547cSRui Paulo char * wpa_config_get_cred_no_key(struct wpa_cred *cred, const char *var); 1376f05cddf9SRui Paulo 137739beb93cSSam Leffler struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface, 137839beb93cSSam Leffler const char *driver_param); 137939beb93cSSam Leffler #ifndef CONFIG_NO_STDOUT_DEBUG 138039beb93cSSam Leffler void wpa_config_debug_dump_networks(struct wpa_config *config); 138139beb93cSSam Leffler #else /* CONFIG_NO_STDOUT_DEBUG */ 138239beb93cSSam Leffler #define wpa_config_debug_dump_networks(c) do { } while (0) 138339beb93cSSam Leffler #endif /* CONFIG_NO_STDOUT_DEBUG */ 138439beb93cSSam Leffler 138539beb93cSSam Leffler 1386f05cddf9SRui Paulo /* Prototypes for common functions from config.c */ 1387f05cddf9SRui Paulo int wpa_config_process_global(struct wpa_config *config, char *pos, int line); 1388f05cddf9SRui Paulo 1389*780fb4a2SCy Schubert int wpa_config_get_num_global_field_names(void); 1390*780fb4a2SCy Schubert 1391*780fb4a2SCy Schubert const char * wpa_config_get_global_field_name(unsigned int i, int *no_var); 1392f05cddf9SRui Paulo 139339beb93cSSam Leffler /* Prototypes for backend specific functions from the selected config_*.c */ 139439beb93cSSam Leffler 139539beb93cSSam Leffler /** 139639beb93cSSam Leffler * wpa_config_read - Read and parse configuration database 139739beb93cSSam Leffler * @name: Name of the configuration (e.g., path and file name for the 139839beb93cSSam Leffler * configuration file) 13995b9c547cSRui Paulo * @cfgp: Pointer to previously allocated configuration data or %NULL if none 140039beb93cSSam Leffler * Returns: Pointer to allocated configuration data or %NULL on failure 140139beb93cSSam Leffler * 140239beb93cSSam Leffler * This function reads configuration data, parses its contents, and allocates 140339beb93cSSam Leffler * data structures needed for storing configuration information. The allocated 140439beb93cSSam Leffler * data can be freed with wpa_config_free(). 140539beb93cSSam Leffler * 140639beb93cSSam Leffler * Each configuration backend needs to implement this function. 140739beb93cSSam Leffler */ 14085b9c547cSRui Paulo struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp); 140939beb93cSSam Leffler 141039beb93cSSam Leffler /** 141139beb93cSSam Leffler * wpa_config_write - Write or update configuration data 141239beb93cSSam Leffler * @name: Name of the configuration (e.g., path and file name for the 141339beb93cSSam Leffler * configuration file) 141439beb93cSSam Leffler * @config: Configuration data from wpa_config_read() 141539beb93cSSam Leffler * Returns: 0 on success, -1 on failure 141639beb93cSSam Leffler * 141739beb93cSSam Leffler * This function write all configuration data into an external database (e.g., 141839beb93cSSam Leffler * a text file) in a format that can be read with wpa_config_read(). This can 141939beb93cSSam Leffler * be used to allow wpa_supplicant to update its configuration, e.g., when a 142039beb93cSSam Leffler * new network is added or a password is changed. 142139beb93cSSam Leffler * 142239beb93cSSam Leffler * Each configuration backend needs to implement this function. 142339beb93cSSam Leffler */ 142439beb93cSSam Leffler int wpa_config_write(const char *name, struct wpa_config *config); 142539beb93cSSam Leffler 142639beb93cSSam Leffler #endif /* CONFIG_H */ 1427