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 21*32a95656SCy Schubert #define DEFAULT_MESH_FWDING 1 22325151a3SRui Paulo /* 23325151a3SRui Paulo * The default dot11RSNASAERetransPeriod is defined as 40 ms in the standard, 24325151a3SRui Paulo * but use 1000 ms in practice to avoid issues on low power CPUs. 25325151a3SRui Paulo */ 26325151a3SRui Paulo #define DEFAULT_DOT11_RSNA_SAE_RETRANS_PERIOD 1000 2739beb93cSSam Leffler #define DEFAULT_FAST_REAUTH 1 28f05cddf9SRui Paulo #define DEFAULT_P2P_GO_INTENT 7 29f05cddf9SRui Paulo #define DEFAULT_P2P_INTRA_BSS 1 30f05cddf9SRui Paulo #define DEFAULT_P2P_GO_MAX_INACTIVITY (5 * 60) 315b9c547cSRui Paulo #define DEFAULT_P2P_OPTIMIZE_LISTEN_CHAN 0 32e28a4053SRui Paulo #define DEFAULT_BSS_MAX_COUNT 200 33f05cddf9SRui Paulo #define DEFAULT_BSS_EXPIRATION_AGE 180 34f05cddf9SRui Paulo #define DEFAULT_BSS_EXPIRATION_SCAN_COUNT 2 35f05cddf9SRui Paulo #define DEFAULT_MAX_NUM_STA 128 3685732ac8SCy Schubert #define DEFAULT_AP_ISOLATE 0 37f05cddf9SRui Paulo #define DEFAULT_ACCESS_NETWORK_TYPE 15 385b9c547cSRui Paulo #define DEFAULT_SCAN_CUR_FREQ 0 395b9c547cSRui Paulo #define DEFAULT_P2P_SEARCH_DELAY 500 405b9c547cSRui Paulo #define DEFAULT_RAND_ADDR_LIFETIME 60 415b9c547cSRui Paulo #define DEFAULT_KEY_MGMT_OFFLOAD 1 425b9c547cSRui Paulo #define DEFAULT_CERT_IN_CB 1 435b9c547cSRui Paulo #define DEFAULT_P2P_GO_CTWINDOW 0 44780fb4a2SCy Schubert #define DEFAULT_WPA_RSC_RELAXATION 1 45780fb4a2SCy Schubert #define DEFAULT_MBO_CELL_CAPA MBO_CELL_CAPA_NOT_SUPPORTED 4685732ac8SCy Schubert #define DEFAULT_DISASSOC_IMMINENT_RSSI_THRESHOLD -75 4785732ac8SCy Schubert #define DEFAULT_OCE_SUPPORT OCE_STA 48c1d255d3SCy Schubert #define DEFAULT_EXTENDED_KEY_ID 0 49c1d255d3SCy Schubert #define DEFAULT_SCAN_RES_VALID_FOR_CONNECT 5 5039beb93cSSam Leffler 5139beb93cSSam Leffler #include "config_ssid.h" 52f05cddf9SRui Paulo #include "wps/wps.h" 53325151a3SRui Paulo #include "common/ieee802_11_defs.h" 54f05cddf9SRui Paulo #include "common/ieee802_11_common.h" 5539beb93cSSam Leffler 5639beb93cSSam Leffler 5785732ac8SCy Schubert #define MAX_ROAMING_CONS 36 5885732ac8SCy Schubert #define MAX_ROAMING_CONS_OI_LEN 15 5985732ac8SCy Schubert 60f05cddf9SRui Paulo struct wpa_cred { 61f05cddf9SRui Paulo /** 62f05cddf9SRui Paulo * next - Next credential in the list 63f05cddf9SRui Paulo * 64f05cddf9SRui Paulo * This pointer can be used to iterate over all credentials. The head 65f05cddf9SRui Paulo * of this list is stored in the cred field of struct wpa_config. 66f05cddf9SRui Paulo */ 67f05cddf9SRui Paulo struct wpa_cred *next; 68f05cddf9SRui Paulo 69f05cddf9SRui Paulo /** 70f05cddf9SRui Paulo * id - Unique id for the credential 71f05cddf9SRui Paulo * 72f05cddf9SRui Paulo * This identifier is used as a unique identifier for each credential 73f05cddf9SRui Paulo * block when using the control interface. Each credential is allocated 74f05cddf9SRui Paulo * an id when it is being created, either when reading the 75f05cddf9SRui Paulo * configuration file or when a new credential is added through the 76f05cddf9SRui Paulo * control interface. 77f05cddf9SRui Paulo */ 78f05cddf9SRui Paulo int id; 79f05cddf9SRui Paulo 80f05cddf9SRui Paulo /** 815b9c547cSRui Paulo * temporary - Whether this credential is temporary and not to be saved 825b9c547cSRui Paulo */ 835b9c547cSRui Paulo int temporary; 845b9c547cSRui Paulo 855b9c547cSRui Paulo /** 86f05cddf9SRui Paulo * priority - Priority group 87f05cddf9SRui Paulo * 88f05cddf9SRui Paulo * By default, all networks and credentials get the same priority group 89f05cddf9SRui Paulo * (0). This field can be used to give higher priority for credentials 90f05cddf9SRui Paulo * (and similarly in struct wpa_ssid for network blocks) to change the 91f05cddf9SRui Paulo * Interworking automatic networking selection behavior. The matching 92f05cddf9SRui Paulo * network (based on either an enabled network block or a credential) 93f05cddf9SRui Paulo * with the highest priority value will be selected. 94f05cddf9SRui Paulo */ 95f05cddf9SRui Paulo int priority; 96f05cddf9SRui Paulo 97f05cddf9SRui Paulo /** 98f05cddf9SRui Paulo * pcsc - Use PC/SC and SIM/USIM card 99f05cddf9SRui Paulo */ 100f05cddf9SRui Paulo int pcsc; 101f05cddf9SRui Paulo 102f05cddf9SRui Paulo /** 103f05cddf9SRui Paulo * realm - Home Realm for Interworking 104f05cddf9SRui Paulo */ 105f05cddf9SRui Paulo char *realm; 106f05cddf9SRui Paulo 107f05cddf9SRui Paulo /** 108f05cddf9SRui Paulo * username - Username for Interworking network selection 109f05cddf9SRui Paulo */ 110f05cddf9SRui Paulo char *username; 111f05cddf9SRui Paulo 112f05cddf9SRui Paulo /** 113f05cddf9SRui Paulo * password - Password for Interworking network selection 114f05cddf9SRui Paulo */ 115f05cddf9SRui Paulo char *password; 116f05cddf9SRui Paulo 117f05cddf9SRui Paulo /** 118f05cddf9SRui Paulo * ext_password - Whether password is a name for external storage 119f05cddf9SRui Paulo */ 120f05cddf9SRui Paulo int ext_password; 121f05cddf9SRui Paulo 122f05cddf9SRui Paulo /** 123f05cddf9SRui Paulo * ca_cert - CA certificate for Interworking network selection 124f05cddf9SRui Paulo */ 125f05cddf9SRui Paulo char *ca_cert; 126f05cddf9SRui Paulo 127f05cddf9SRui Paulo /** 128f05cddf9SRui Paulo * client_cert - File path to client certificate file (PEM/DER) 129f05cddf9SRui Paulo * 130f05cddf9SRui Paulo * This field is used with Interworking networking selection for a case 131f05cddf9SRui Paulo * where client certificate/private key is used for authentication 132f05cddf9SRui Paulo * (EAP-TLS). Full path to the file should be used since working 133f05cddf9SRui Paulo * directory may change when wpa_supplicant is run in the background. 134f05cddf9SRui Paulo * 135f05cddf9SRui Paulo * Alternatively, a named configuration blob can be used by setting 136f05cddf9SRui Paulo * this to blob://blob_name. 137f05cddf9SRui Paulo */ 138f05cddf9SRui Paulo char *client_cert; 139f05cddf9SRui Paulo 140f05cddf9SRui Paulo /** 141f05cddf9SRui Paulo * private_key - File path to client private key file (PEM/DER/PFX) 142f05cddf9SRui Paulo * 143f05cddf9SRui Paulo * When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be 144f05cddf9SRui Paulo * commented out. Both the private key and certificate will be read 145f05cddf9SRui Paulo * from the PKCS#12 file in this case. Full path to the file should be 146f05cddf9SRui Paulo * used since working directory may change when wpa_supplicant is run 147f05cddf9SRui Paulo * in the background. 148f05cddf9SRui Paulo * 149f05cddf9SRui Paulo * Windows certificate store can be used by leaving client_cert out and 150f05cddf9SRui Paulo * configuring private_key in one of the following formats: 151f05cddf9SRui Paulo * 152f05cddf9SRui Paulo * cert://substring_to_match 153f05cddf9SRui Paulo * 154f05cddf9SRui Paulo * hash://certificate_thumbprint_in_hex 155f05cddf9SRui Paulo * 156f05cddf9SRui Paulo * For example: private_key="hash://63093aa9c47f56ae88334c7b65a4" 157f05cddf9SRui Paulo * 158f05cddf9SRui Paulo * Note that when running wpa_supplicant as an application, the user 159f05cddf9SRui Paulo * certificate store (My user account) is used, whereas computer store 160f05cddf9SRui Paulo * (Computer account) is used when running wpasvc as a service. 161f05cddf9SRui Paulo * 162f05cddf9SRui Paulo * Alternatively, a named configuration blob can be used by setting 163f05cddf9SRui Paulo * this to blob://blob_name. 164f05cddf9SRui Paulo */ 165f05cddf9SRui Paulo char *private_key; 166f05cddf9SRui Paulo 167f05cddf9SRui Paulo /** 168f05cddf9SRui Paulo * private_key_passwd - Password for private key file 169f05cddf9SRui Paulo */ 170f05cddf9SRui Paulo char *private_key_passwd; 171f05cddf9SRui Paulo 172f05cddf9SRui Paulo /** 173f05cddf9SRui Paulo * imsi - IMSI in <MCC> | <MNC> | '-' | <MSIN> format 174f05cddf9SRui Paulo */ 175f05cddf9SRui Paulo char *imsi; 176f05cddf9SRui Paulo 177f05cddf9SRui Paulo /** 178f05cddf9SRui Paulo * milenage - Milenage parameters for SIM/USIM simulator in 179f05cddf9SRui Paulo * <Ki>:<OPc>:<SQN> format 180f05cddf9SRui Paulo */ 181f05cddf9SRui Paulo char *milenage; 182f05cddf9SRui Paulo 183f05cddf9SRui Paulo /** 184*32a95656SCy Schubert * engine - Use an engine for private key operations 185*32a95656SCy Schubert */ 186*32a95656SCy Schubert int engine; 187*32a95656SCy Schubert 188*32a95656SCy Schubert /** 189*32a95656SCy Schubert * engine_id - String identifying the engine to use 190*32a95656SCy Schubert */ 191*32a95656SCy Schubert char *engine_id; 192*32a95656SCy Schubert 193*32a95656SCy Schubert /** 194*32a95656SCy Schubert * ca_cert_id - The CA certificate identifier when using an engine 195*32a95656SCy Schubert */ 196*32a95656SCy Schubert char *ca_cert_id; 197*32a95656SCy Schubert 198*32a95656SCy Schubert /** 199*32a95656SCy Schubert * cert_id - The certificate identifier when using an engine 200*32a95656SCy Schubert */ 201*32a95656SCy Schubert char *cert_id; 202*32a95656SCy Schubert 203*32a95656SCy Schubert /** 204*32a95656SCy Schubert * key_id - The private key identifier when using an engine 205*32a95656SCy Schubert */ 206*32a95656SCy Schubert char *key_id; 207*32a95656SCy Schubert 208*32a95656SCy Schubert /** 2095b9c547cSRui Paulo * domain_suffix_match - Constraint for server domain name 2105b9c547cSRui Paulo * 2115b9c547cSRui Paulo * If set, this FQDN is used as a suffix match requirement for the AAA 2125b9c547cSRui Paulo * server certificate in SubjectAltName dNSName element(s). If a 2135b9c547cSRui Paulo * matching dNSName is found, this constraint is met. If no dNSName 2145b9c547cSRui Paulo * values are present, this constraint is matched against SubjectName CN 2155b9c547cSRui Paulo * using same suffix match comparison. Suffix match here means that the 2165b9c547cSRui Paulo * host/domain name is compared one label at a time starting from the 2175b9c547cSRui Paulo * top-level domain and all the labels in @domain_suffix_match shall be 2185b9c547cSRui Paulo * included in the certificate. The certificate may include additional 2195b9c547cSRui Paulo * sub-level labels in addition to the required labels. 2205b9c547cSRui Paulo * 2215b9c547cSRui Paulo * For example, domain_suffix_match=example.com would match 2225b9c547cSRui Paulo * test.example.com but would not match test-example.com. 2235b9c547cSRui Paulo */ 2245b9c547cSRui Paulo char *domain_suffix_match; 2255b9c547cSRui Paulo 2265b9c547cSRui Paulo /** 2275b9c547cSRui Paulo * domain - Home service provider FQDN(s) 228f05cddf9SRui Paulo * 229f05cddf9SRui Paulo * This is used to compare against the Domain Name List to figure out 2305b9c547cSRui Paulo * whether the AP is operated by the Home SP. Multiple domain entries 2315b9c547cSRui Paulo * can be used to configure alternative FQDNs that will be considered 2325b9c547cSRui Paulo * home networks. 233f05cddf9SRui Paulo */ 2345b9c547cSRui Paulo char **domain; 2355b9c547cSRui Paulo 2365b9c547cSRui Paulo /** 2375b9c547cSRui Paulo * num_domain - Number of FQDNs in the domain array 2385b9c547cSRui Paulo */ 2395b9c547cSRui Paulo size_t num_domain; 240f05cddf9SRui Paulo 241f05cddf9SRui Paulo /** 242f05cddf9SRui Paulo * roaming_consortium - Roaming Consortium OI 243f05cddf9SRui Paulo * 244f05cddf9SRui Paulo * If roaming_consortium_len is non-zero, this field contains the 245f05cddf9SRui Paulo * Roaming Consortium OI that can be used to determine which access 246f05cddf9SRui Paulo * points support authentication with this credential. This is an 247f05cddf9SRui Paulo * alternative to the use of the realm parameter. When using Roaming 248f05cddf9SRui Paulo * Consortium to match the network, the EAP parameters need to be 249f05cddf9SRui Paulo * pre-configured with the credential since the NAI Realm information 250f05cddf9SRui Paulo * may not be available or fetched. 251f05cddf9SRui Paulo */ 252f05cddf9SRui Paulo u8 roaming_consortium[15]; 253f05cddf9SRui Paulo 254f05cddf9SRui Paulo /** 255f05cddf9SRui Paulo * roaming_consortium_len - Length of roaming_consortium 256f05cddf9SRui Paulo */ 257f05cddf9SRui Paulo size_t roaming_consortium_len; 258f05cddf9SRui Paulo 25985732ac8SCy Schubert /** 26085732ac8SCy Schubert * required_roaming_consortium - Required Roaming Consortium OI 26185732ac8SCy Schubert * 26285732ac8SCy Schubert * If required_roaming_consortium_len is non-zero, this field contains 26385732ac8SCy Schubert * the Roaming Consortium OI that is required to be advertised by the AP 26485732ac8SCy Schubert * for the credential to be considered matching. 26585732ac8SCy Schubert */ 2665b9c547cSRui Paulo u8 required_roaming_consortium[15]; 26785732ac8SCy Schubert 26885732ac8SCy Schubert /** 26985732ac8SCy Schubert * required_roaming_consortium_len - Length of required_roaming_consortium 27085732ac8SCy Schubert */ 2715b9c547cSRui Paulo size_t required_roaming_consortium_len; 2725b9c547cSRui Paulo 273f05cddf9SRui Paulo /** 27485732ac8SCy Schubert * roaming_consortiums - Roaming Consortium OI(s) memberships 27585732ac8SCy Schubert * 27685732ac8SCy Schubert * This field contains one or more OIs identifying the roaming 27785732ac8SCy Schubert * consortiums of which the provider is a member. The list is sorted 27885732ac8SCy Schubert * from the most preferred one to the least preferred one. A match 27985732ac8SCy Schubert * between the Roaming Consortium OIs advertised by an AP and the OIs 28085732ac8SCy Schubert * in this list indicates that successful authentication is possible. 28185732ac8SCy Schubert * (Hotspot 2.0 PerProviderSubscription/<X+>/HomeSP/RoamingConsortiumOI) 28285732ac8SCy Schubert */ 28385732ac8SCy Schubert u8 roaming_consortiums[MAX_ROAMING_CONS][MAX_ROAMING_CONS_OI_LEN]; 28485732ac8SCy Schubert 28585732ac8SCy Schubert /** 28685732ac8SCy Schubert * roaming_consortiums_len - Length on roaming_consortiums[i] 28785732ac8SCy Schubert */ 28885732ac8SCy Schubert size_t roaming_consortiums_len[MAX_ROAMING_CONS]; 28985732ac8SCy Schubert 29085732ac8SCy Schubert /** 29185732ac8SCy Schubert * num_roaming_consortiums - Number of entries in roaming_consortiums 29285732ac8SCy Schubert */ 29385732ac8SCy Schubert unsigned int num_roaming_consortiums; 29485732ac8SCy Schubert 29585732ac8SCy Schubert /** 296f05cddf9SRui Paulo * eap_method - EAP method to use 297f05cddf9SRui Paulo * 298f05cddf9SRui Paulo * Pre-configured EAP method to use with this credential or %NULL to 299f05cddf9SRui Paulo * indicate no EAP method is selected, i.e., the method will be 300f05cddf9SRui Paulo * selected automatically based on ANQP information. 301f05cddf9SRui Paulo */ 302f05cddf9SRui Paulo struct eap_method_type *eap_method; 303f05cddf9SRui Paulo 304f05cddf9SRui Paulo /** 305f05cddf9SRui Paulo * phase1 - Phase 1 (outer authentication) parameters 306f05cddf9SRui Paulo * 307f05cddf9SRui Paulo * Pre-configured EAP parameters or %NULL. 308f05cddf9SRui Paulo */ 309f05cddf9SRui Paulo char *phase1; 310f05cddf9SRui Paulo 311f05cddf9SRui Paulo /** 312f05cddf9SRui Paulo * phase2 - Phase 2 (inner authentication) parameters 313f05cddf9SRui Paulo * 314f05cddf9SRui Paulo * Pre-configured EAP parameters or %NULL. 315f05cddf9SRui Paulo */ 316f05cddf9SRui Paulo char *phase2; 317f05cddf9SRui Paulo 318f05cddf9SRui Paulo struct excluded_ssid { 319325151a3SRui Paulo u8 ssid[SSID_MAX_LEN]; 320f05cddf9SRui Paulo size_t ssid_len; 321f05cddf9SRui Paulo } *excluded_ssid; 322f05cddf9SRui Paulo size_t num_excluded_ssid; 3235b9c547cSRui Paulo 3245b9c547cSRui Paulo struct roaming_partner { 3255b9c547cSRui Paulo char fqdn[128]; 3265b9c547cSRui Paulo int exact_match; 3275b9c547cSRui Paulo u8 priority; 3285b9c547cSRui Paulo char country[3]; 3295b9c547cSRui Paulo } *roaming_partner; 3305b9c547cSRui Paulo size_t num_roaming_partner; 3315b9c547cSRui Paulo 3325b9c547cSRui Paulo int update_identifier; 3335b9c547cSRui Paulo 3345b9c547cSRui Paulo /** 3355b9c547cSRui Paulo * provisioning_sp - FQDN of the SP that provisioned the credential 3365b9c547cSRui Paulo */ 3375b9c547cSRui Paulo char *provisioning_sp; 3385b9c547cSRui Paulo 3395b9c547cSRui Paulo /** 3405b9c547cSRui Paulo * sp_priority - Credential priority within a provisioning SP 3415b9c547cSRui Paulo * 3425b9c547cSRui Paulo * This is the priority of the credential among all credentials 3435b9c547cSRui Paulo * provisionined by the same SP (i.e., for entries that have identical 3445b9c547cSRui Paulo * provisioning_sp value). The range of this priority is 0-255 with 0 3455b9c547cSRui Paulo * being the highest and 255 the lower priority. 3465b9c547cSRui Paulo */ 3475b9c547cSRui Paulo int sp_priority; 3485b9c547cSRui Paulo 3495b9c547cSRui Paulo unsigned int min_dl_bandwidth_home; 3505b9c547cSRui Paulo unsigned int min_ul_bandwidth_home; 3515b9c547cSRui Paulo unsigned int min_dl_bandwidth_roaming; 3525b9c547cSRui Paulo unsigned int min_ul_bandwidth_roaming; 3535b9c547cSRui Paulo 3545b9c547cSRui Paulo /** 3555b9c547cSRui Paulo * max_bss_load - Maximum BSS Load Channel Utilization (1..255) 3565b9c547cSRui Paulo * This value is used as the maximum channel utilization for network 3575b9c547cSRui Paulo * selection purposes for home networks. If the AP does not advertise 3585b9c547cSRui Paulo * BSS Load or if the limit would prevent any connection, this 3595b9c547cSRui Paulo * constraint will be ignored. 3605b9c547cSRui Paulo */ 3615b9c547cSRui Paulo unsigned int max_bss_load; 3625b9c547cSRui Paulo 363c1d255d3SCy Schubert size_t num_req_conn_capab; 3645b9c547cSRui Paulo u8 *req_conn_capab_proto; 3655b9c547cSRui Paulo int **req_conn_capab_port; 3665b9c547cSRui Paulo 3675b9c547cSRui Paulo /** 3685b9c547cSRui Paulo * ocsp - Whether to use/require OCSP to check server certificate 3695b9c547cSRui Paulo * 3705b9c547cSRui Paulo * 0 = do not use OCSP stapling (TLS certificate status extension) 3715b9c547cSRui Paulo * 1 = try to use OCSP stapling, but not require response 3725b9c547cSRui Paulo * 2 = require valid OCSP stapling response 3735b9c547cSRui Paulo */ 3745b9c547cSRui Paulo int ocsp; 3755b9c547cSRui Paulo 3765b9c547cSRui Paulo /** 3775b9c547cSRui Paulo * sim_num - User selected SIM identifier 3785b9c547cSRui Paulo * 3795b9c547cSRui Paulo * This variable is used for identifying which SIM is used if the system 3805b9c547cSRui Paulo * has more than one. 3815b9c547cSRui Paulo */ 3825b9c547cSRui Paulo int sim_num; 383f05cddf9SRui Paulo }; 384f05cddf9SRui Paulo 385f05cddf9SRui Paulo 386f05cddf9SRui Paulo #define CFG_CHANGED_DEVICE_NAME BIT(0) 387f05cddf9SRui Paulo #define CFG_CHANGED_CONFIG_METHODS BIT(1) 388f05cddf9SRui Paulo #define CFG_CHANGED_DEVICE_TYPE BIT(2) 389f05cddf9SRui Paulo #define CFG_CHANGED_OS_VERSION BIT(3) 390f05cddf9SRui Paulo #define CFG_CHANGED_UUID BIT(4) 391f05cddf9SRui Paulo #define CFG_CHANGED_COUNTRY BIT(5) 392f05cddf9SRui Paulo #define CFG_CHANGED_SEC_DEVICE_TYPE BIT(6) 393f05cddf9SRui Paulo #define CFG_CHANGED_P2P_SSID_POSTFIX BIT(7) 394f05cddf9SRui Paulo #define CFG_CHANGED_WPS_STRING BIT(8) 395f05cddf9SRui Paulo #define CFG_CHANGED_P2P_INTRA_BSS BIT(9) 396f05cddf9SRui Paulo #define CFG_CHANGED_VENDOR_EXTENSION BIT(10) 397f05cddf9SRui Paulo #define CFG_CHANGED_P2P_LISTEN_CHANNEL BIT(11) 398f05cddf9SRui Paulo #define CFG_CHANGED_P2P_OPER_CHANNEL BIT(12) 399f05cddf9SRui Paulo #define CFG_CHANGED_P2P_PREF_CHAN BIT(13) 400f05cddf9SRui Paulo #define CFG_CHANGED_EXT_PW_BACKEND BIT(14) 4015b9c547cSRui Paulo #define CFG_CHANGED_NFC_PASSWORD_TOKEN BIT(15) 4025b9c547cSRui Paulo #define CFG_CHANGED_P2P_PASSPHRASE_LEN BIT(16) 403780fb4a2SCy Schubert #define CFG_CHANGED_SCHED_SCAN_PLANS BIT(17) 40485732ac8SCy Schubert #define CFG_CHANGED_WOWLAN_TRIGGERS BIT(18) 405206b73d0SCy Schubert #define CFG_CHANGED_DISABLE_BTM BIT(19) 406c1d255d3SCy Schubert #define CFG_CHANGED_BGSCAN BIT(20) 407f05cddf9SRui Paulo 40839beb93cSSam Leffler /** 40939beb93cSSam Leffler * struct wpa_config - wpa_supplicant configuration data 41039beb93cSSam Leffler * 41139beb93cSSam Leffler * This data structure is presents the per-interface (radio) configuration 41239beb93cSSam Leffler * data. In many cases, there is only one struct wpa_config instance, but if 41339beb93cSSam Leffler * more than one network interface is being controlled, one instance is used 41439beb93cSSam Leffler * for each. 41539beb93cSSam Leffler */ 41639beb93cSSam Leffler struct wpa_config { 41739beb93cSSam Leffler /** 41839beb93cSSam Leffler * ssid - Head of the global network list 41939beb93cSSam Leffler * 42039beb93cSSam Leffler * This is the head for the list of all the configured networks. 42139beb93cSSam Leffler */ 42239beb93cSSam Leffler struct wpa_ssid *ssid; 42339beb93cSSam Leffler 42439beb93cSSam Leffler /** 42539beb93cSSam Leffler * pssid - Per-priority network lists (in priority order) 42639beb93cSSam Leffler */ 42739beb93cSSam Leffler struct wpa_ssid **pssid; 42839beb93cSSam Leffler 42939beb93cSSam Leffler /** 43039beb93cSSam Leffler * num_prio - Number of different priorities used in the pssid lists 43139beb93cSSam Leffler * 43239beb93cSSam Leffler * This indicates how many per-priority network lists are included in 43339beb93cSSam Leffler * pssid. 43439beb93cSSam Leffler */ 435c1d255d3SCy Schubert size_t num_prio; 43639beb93cSSam Leffler 43739beb93cSSam Leffler /** 438f05cddf9SRui Paulo * cred - Head of the credential list 439f05cddf9SRui Paulo * 440f05cddf9SRui Paulo * This is the head for the list of all the configured credentials. 441f05cddf9SRui Paulo */ 442f05cddf9SRui Paulo struct wpa_cred *cred; 443f05cddf9SRui Paulo 444f05cddf9SRui Paulo /** 44539beb93cSSam Leffler * eapol_version - IEEE 802.1X/EAPOL version number 44639beb93cSSam Leffler * 44739beb93cSSam Leffler * wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which 44839beb93cSSam Leffler * defines EAPOL version 2. However, there are many APs that do not 44939beb93cSSam Leffler * handle the new version number correctly (they seem to drop the 45039beb93cSSam Leffler * frames completely). In order to make wpa_supplicant interoperate 45139beb93cSSam Leffler * with these APs, the version number is set to 1 by default. This 45239beb93cSSam Leffler * configuration value can be used to set it to the new version (2). 45339beb93cSSam Leffler */ 45439beb93cSSam Leffler int eapol_version; 45539beb93cSSam Leffler 45639beb93cSSam Leffler /** 45739beb93cSSam Leffler * ap_scan - AP scanning/selection 45839beb93cSSam Leffler * 45939beb93cSSam Leffler * By default, wpa_supplicant requests driver to perform AP 46039beb93cSSam Leffler * scanning and then uses the scan results to select a 46139beb93cSSam Leffler * suitable AP. Another alternative is to allow the driver to 46239beb93cSSam Leffler * take care of AP scanning and selection and use 46339beb93cSSam Leffler * wpa_supplicant just to process EAPOL frames based on IEEE 46439beb93cSSam Leffler * 802.11 association information from the driver. 46539beb93cSSam Leffler * 46639beb93cSSam Leffler * 1: wpa_supplicant initiates scanning and AP selection (default). 46739beb93cSSam Leffler * 46839beb93cSSam Leffler * 0: Driver takes care of scanning, AP selection, and IEEE 802.11 46939beb93cSSam Leffler * association parameters (e.g., WPA IE generation); this mode can 47039beb93cSSam Leffler * also be used with non-WPA drivers when using IEEE 802.1X mode; 47139beb93cSSam Leffler * do not try to associate with APs (i.e., external program needs 47239beb93cSSam Leffler * to control association). This mode must also be used when using 47339beb93cSSam Leffler * wired Ethernet drivers. 47439beb93cSSam Leffler * 47539beb93cSSam Leffler * 2: like 0, but associate with APs using security policy and SSID 47639beb93cSSam Leffler * (but not BSSID); this can be used, e.g., with ndiswrapper and NDIS 47739beb93cSSam Leffler * drivers to enable operation with hidden SSIDs and optimized roaming; 47839beb93cSSam Leffler * in this mode, the network blocks in the configuration are tried 47939beb93cSSam Leffler * one by one until the driver reports successful association; each 48039beb93cSSam Leffler * network block should have explicit security policy (i.e., only one 48139beb93cSSam Leffler * option in the lists) for key_mgmt, pairwise, group, proto variables. 482325151a3SRui Paulo * 483325151a3SRui Paulo * Note: ap_scan=2 should not be used with the nl80211 driver interface 484325151a3SRui Paulo * (the current Linux interface). ap_scan=1 is optimized work working 485325151a3SRui Paulo * with nl80211. For finding networks using hidden SSID, scan_ssid=1 in 486325151a3SRui Paulo * the network block can be used with nl80211. 48739beb93cSSam Leffler */ 48839beb93cSSam Leffler int ap_scan; 48939beb93cSSam Leffler 49039beb93cSSam Leffler /** 4915b9c547cSRui Paulo * bgscan - Background scan and roaming parameters or %NULL if none 4925b9c547cSRui Paulo * 4935b9c547cSRui Paulo * This is an optional set of parameters for background scanning and 4945b9c547cSRui Paulo * roaming within a network (ESS). For more detailed information see 4955b9c547cSRui Paulo * ssid block documentation. 4965b9c547cSRui Paulo * 4975b9c547cSRui Paulo * The variable defines default bgscan behavior for all BSS station 4985b9c547cSRui Paulo * networks except for those which have their own bgscan configuration. 4995b9c547cSRui Paulo */ 5005b9c547cSRui Paulo char *bgscan; 5015b9c547cSRui Paulo 5025b9c547cSRui Paulo /** 503f05cddf9SRui Paulo * disable_scan_offload - Disable automatic offloading of scan requests 504f05cddf9SRui Paulo * 505f05cddf9SRui Paulo * By default, %wpa_supplicant tries to offload scanning if the driver 506f05cddf9SRui Paulo * indicates support for this (sched_scan). This configuration 507f05cddf9SRui Paulo * parameter can be used to disable this offloading mechanism. 508f05cddf9SRui Paulo */ 509f05cddf9SRui Paulo int disable_scan_offload; 510f05cddf9SRui Paulo 511f05cddf9SRui Paulo /** 51239beb93cSSam Leffler * ctrl_interface - Parameters for the control interface 51339beb93cSSam Leffler * 51439beb93cSSam Leffler * If this is specified, %wpa_supplicant will open a control interface 51539beb93cSSam Leffler * that is available for external programs to manage %wpa_supplicant. 51639beb93cSSam Leffler * The meaning of this string depends on which control interface 517f05cddf9SRui Paulo * mechanism is used. For all cases, the existence of this parameter 51839beb93cSSam Leffler * in configuration is used to determine whether the control interface 51939beb93cSSam Leffler * is enabled. 52039beb93cSSam Leffler * 52139beb93cSSam Leffler * For UNIX domain sockets (default on Linux and BSD): This is a 52239beb93cSSam Leffler * directory that will be created for UNIX domain sockets for listening 52339beb93cSSam Leffler * to requests from external programs (CLI/GUI, etc.) for status 52439beb93cSSam Leffler * information and configuration. The socket file will be named based 52539beb93cSSam Leffler * on the interface name, so multiple %wpa_supplicant processes can be 52639beb93cSSam Leffler * run at the same time if more than one interface is used. 52739beb93cSSam Leffler * /var/run/wpa_supplicant is the recommended directory for sockets and 52839beb93cSSam Leffler * by default, wpa_cli will use it when trying to connect with 52939beb93cSSam Leffler * %wpa_supplicant. 53039beb93cSSam Leffler * 53139beb93cSSam Leffler * Access control for the control interface can be configured 53239beb93cSSam Leffler * by setting the directory to allow only members of a group 53339beb93cSSam Leffler * to use sockets. This way, it is possible to run 53439beb93cSSam Leffler * %wpa_supplicant as root (since it needs to change network 53539beb93cSSam Leffler * configuration and open raw sockets) and still allow GUI/CLI 53639beb93cSSam Leffler * components to be run as non-root users. However, since the 53739beb93cSSam Leffler * control interface can be used to change the network 53839beb93cSSam Leffler * configuration, this access needs to be protected in many 53939beb93cSSam Leffler * cases. By default, %wpa_supplicant is configured to use gid 54039beb93cSSam Leffler * 0 (root). If you want to allow non-root users to use the 54139beb93cSSam Leffler * control interface, add a new group and change this value to 54239beb93cSSam Leffler * match with that group. Add users that should have control 54339beb93cSSam Leffler * interface access to this group. 54439beb93cSSam Leffler * 54539beb93cSSam Leffler * When configuring both the directory and group, use following format: 54639beb93cSSam Leffler * DIR=/var/run/wpa_supplicant GROUP=wheel 54739beb93cSSam Leffler * DIR=/var/run/wpa_supplicant GROUP=0 54839beb93cSSam Leffler * (group can be either group name or gid) 54939beb93cSSam Leffler * 55039beb93cSSam Leffler * For UDP connections (default on Windows): The value will be ignored. 55139beb93cSSam Leffler * This variable is just used to select that the control interface is 55239beb93cSSam Leffler * to be created. The value can be set to, e.g., udp 55339beb93cSSam Leffler * (ctrl_interface=udp). 55439beb93cSSam Leffler * 55539beb93cSSam Leffler * For Windows Named Pipe: This value can be used to set the security 55639beb93cSSam Leffler * descriptor for controlling access to the control interface. Security 55739beb93cSSam Leffler * descriptor can be set using Security Descriptor String Format (see 55839beb93cSSam Leffler * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/security_descriptor_string_format.asp). 55939beb93cSSam Leffler * The descriptor string needs to be prefixed with SDDL=. For example, 56039beb93cSSam Leffler * ctrl_interface=SDDL=D: would set an empty DACL (which will reject 56139beb93cSSam Leffler * all connections). 56239beb93cSSam Leffler */ 56339beb93cSSam Leffler char *ctrl_interface; 56439beb93cSSam Leffler 56539beb93cSSam Leffler /** 56639beb93cSSam Leffler * ctrl_interface_group - Control interface group (DEPRECATED) 56739beb93cSSam Leffler * 56839beb93cSSam Leffler * This variable is only used for backwards compatibility. Group for 56939beb93cSSam Leffler * UNIX domain sockets should now be specified using GROUP=group in 57039beb93cSSam Leffler * ctrl_interface variable. 57139beb93cSSam Leffler */ 57239beb93cSSam Leffler char *ctrl_interface_group; 57339beb93cSSam Leffler 57439beb93cSSam Leffler /** 57539beb93cSSam Leffler * fast_reauth - EAP fast re-authentication (session resumption) 57639beb93cSSam Leffler * 57739beb93cSSam Leffler * By default, fast re-authentication is enabled for all EAP methods 57839beb93cSSam Leffler * that support it. This variable can be used to disable fast 57939beb93cSSam Leffler * re-authentication (by setting fast_reauth=0). Normally, there is no 58039beb93cSSam Leffler * need to disable fast re-authentication. 58139beb93cSSam Leffler */ 58239beb93cSSam Leffler int fast_reauth; 58339beb93cSSam Leffler 58439beb93cSSam Leffler /** 58539beb93cSSam Leffler * opensc_engine_path - Path to the OpenSSL engine for opensc 58639beb93cSSam Leffler * 58739beb93cSSam Leffler * This is an OpenSSL specific configuration option for loading OpenSC 58839beb93cSSam Leffler * engine (engine_opensc.so); if %NULL, this engine is not loaded. 58939beb93cSSam Leffler */ 59039beb93cSSam Leffler char *opensc_engine_path; 59139beb93cSSam Leffler 59239beb93cSSam Leffler /** 59339beb93cSSam Leffler * pkcs11_engine_path - Path to the OpenSSL engine for PKCS#11 59439beb93cSSam Leffler * 59539beb93cSSam Leffler * This is an OpenSSL specific configuration option for loading PKCS#11 59639beb93cSSam Leffler * engine (engine_pkcs11.so); if %NULL, this engine is not loaded. 59739beb93cSSam Leffler */ 59839beb93cSSam Leffler char *pkcs11_engine_path; 59939beb93cSSam Leffler 60039beb93cSSam Leffler /** 60139beb93cSSam Leffler * pkcs11_module_path - Path to the OpenSSL OpenSC/PKCS#11 module 60239beb93cSSam Leffler * 60339beb93cSSam Leffler * This is an OpenSSL specific configuration option for configuring 60439beb93cSSam Leffler * path to OpenSC/PKCS#11 engine (opensc-pkcs11.so); if %NULL, this 60539beb93cSSam Leffler * module is not loaded. 60639beb93cSSam Leffler */ 60739beb93cSSam Leffler char *pkcs11_module_path; 60839beb93cSSam Leffler 60939beb93cSSam Leffler /** 6105b9c547cSRui Paulo * openssl_ciphers - OpenSSL cipher string 6115b9c547cSRui Paulo * 6125b9c547cSRui Paulo * This is an OpenSSL specific configuration option for configuring the 6135b9c547cSRui Paulo * default ciphers. If not set, "DEFAULT:!EXP:!LOW" is used as the 6145b9c547cSRui Paulo * default. 6155b9c547cSRui Paulo */ 6165b9c547cSRui Paulo char *openssl_ciphers; 6175b9c547cSRui Paulo 6185b9c547cSRui Paulo /** 619f05cddf9SRui Paulo * pcsc_reader - PC/SC reader name prefix 620f05cddf9SRui Paulo * 621f05cddf9SRui Paulo * If not %NULL, PC/SC reader with a name that matches this prefix is 622f05cddf9SRui Paulo * initialized for SIM/USIM access. Empty string can be used to match 623f05cddf9SRui Paulo * the first available reader. 624f05cddf9SRui Paulo */ 625f05cddf9SRui Paulo char *pcsc_reader; 626f05cddf9SRui Paulo 627f05cddf9SRui Paulo /** 628f05cddf9SRui Paulo * pcsc_pin - PIN for USIM, GSM SIM, and smartcards 629f05cddf9SRui Paulo * 630f05cddf9SRui Paulo * This field is used to configure PIN for SIM/USIM for EAP-SIM and 631f05cddf9SRui Paulo * EAP-AKA. If left out, this will be asked through control interface. 632f05cddf9SRui Paulo */ 633f05cddf9SRui Paulo char *pcsc_pin; 634f05cddf9SRui Paulo 635f05cddf9SRui Paulo /** 6365b9c547cSRui Paulo * external_sim - Use external processing for SIM/USIM operations 6375b9c547cSRui Paulo */ 6385b9c547cSRui Paulo int external_sim; 6395b9c547cSRui Paulo 6405b9c547cSRui Paulo /** 64139beb93cSSam Leffler * driver_param - Driver interface parameters 64239beb93cSSam Leffler * 64339beb93cSSam Leffler * This text string is passed to the selected driver interface with the 64439beb93cSSam Leffler * optional struct wpa_driver_ops::set_param() handler. This can be 64539beb93cSSam Leffler * used to configure driver specific options without having to add new 64639beb93cSSam Leffler * driver interface functionality. 64739beb93cSSam Leffler */ 64839beb93cSSam Leffler char *driver_param; 64939beb93cSSam Leffler 65039beb93cSSam Leffler /** 65139beb93cSSam Leffler * dot11RSNAConfigPMKLifetime - Maximum lifetime of a PMK 65239beb93cSSam Leffler * 65339beb93cSSam Leffler * dot11 MIB variable for the maximum lifetime of a PMK in the PMK 65439beb93cSSam Leffler * cache (unit: seconds). 65539beb93cSSam Leffler */ 65639beb93cSSam Leffler unsigned int dot11RSNAConfigPMKLifetime; 65739beb93cSSam Leffler 65839beb93cSSam Leffler /** 65939beb93cSSam Leffler * dot11RSNAConfigPMKReauthThreshold - PMK re-authentication threshold 66039beb93cSSam Leffler * 66139beb93cSSam Leffler * dot11 MIB variable for the percentage of the PMK lifetime 66239beb93cSSam Leffler * that should expire before an IEEE 802.1X reauthentication occurs. 66339beb93cSSam Leffler */ 66439beb93cSSam Leffler unsigned int dot11RSNAConfigPMKReauthThreshold; 66539beb93cSSam Leffler 66639beb93cSSam Leffler /** 66739beb93cSSam Leffler * dot11RSNAConfigSATimeout - Security association timeout 66839beb93cSSam Leffler * 66939beb93cSSam Leffler * dot11 MIB variable for the maximum time a security association 67039beb93cSSam Leffler * shall take to set up (unit: seconds). 67139beb93cSSam Leffler */ 67239beb93cSSam Leffler unsigned int dot11RSNAConfigSATimeout; 67339beb93cSSam Leffler 67439beb93cSSam Leffler /** 67539beb93cSSam Leffler * update_config - Is wpa_supplicant allowed to update configuration 67639beb93cSSam Leffler * 67739beb93cSSam Leffler * This variable control whether wpa_supplicant is allow to re-write 67839beb93cSSam Leffler * its configuration with wpa_config_write(). If this is zero, 67939beb93cSSam Leffler * configuration data is only changed in memory and the external data 680c1d255d3SCy Schubert * is not overridden. If this is non-zero, wpa_supplicant will update 68139beb93cSSam Leffler * the configuration data (e.g., a file) whenever configuration is 68239beb93cSSam Leffler * changed. This update may replace the old configuration which can 68339beb93cSSam Leffler * remove comments from it in case of a text file configuration. 68439beb93cSSam Leffler */ 68539beb93cSSam Leffler int update_config; 68639beb93cSSam Leffler 68739beb93cSSam Leffler /** 68839beb93cSSam Leffler * blobs - Configuration blobs 68939beb93cSSam Leffler */ 69039beb93cSSam Leffler struct wpa_config_blob *blobs; 69139beb93cSSam Leffler 69239beb93cSSam Leffler /** 69339beb93cSSam Leffler * uuid - Universally Unique IDentifier (UUID; see RFC 4122) for WPS 69439beb93cSSam Leffler */ 69539beb93cSSam Leffler u8 uuid[16]; 69639beb93cSSam Leffler 69739beb93cSSam Leffler /** 69885732ac8SCy Schubert * auto_uuid - Automatic UUID behavior 69985732ac8SCy Schubert * 0 = generate static value based on the local MAC address (default) 70085732ac8SCy Schubert * 1 = generate a random UUID every time wpa_supplicant starts 70185732ac8SCy Schubert */ 70285732ac8SCy Schubert int auto_uuid; 70385732ac8SCy Schubert 70485732ac8SCy Schubert /** 70539beb93cSSam Leffler * device_name - Device Name (WPS) 70639beb93cSSam Leffler * User-friendly description of device; up to 32 octets encoded in 70739beb93cSSam Leffler * UTF-8 70839beb93cSSam Leffler */ 70939beb93cSSam Leffler char *device_name; 71039beb93cSSam Leffler 71139beb93cSSam Leffler /** 71239beb93cSSam Leffler * manufacturer - Manufacturer (WPS) 71339beb93cSSam Leffler * The manufacturer of the device (up to 64 ASCII characters) 71439beb93cSSam Leffler */ 71539beb93cSSam Leffler char *manufacturer; 71639beb93cSSam Leffler 71739beb93cSSam Leffler /** 71839beb93cSSam Leffler * model_name - Model Name (WPS) 71939beb93cSSam Leffler * Model of the device (up to 32 ASCII characters) 72039beb93cSSam Leffler */ 72139beb93cSSam Leffler char *model_name; 72239beb93cSSam Leffler 72339beb93cSSam Leffler /** 72439beb93cSSam Leffler * model_number - Model Number (WPS) 72539beb93cSSam Leffler * Additional device description (up to 32 ASCII characters) 72639beb93cSSam Leffler */ 72739beb93cSSam Leffler char *model_number; 72839beb93cSSam Leffler 72939beb93cSSam Leffler /** 73039beb93cSSam Leffler * serial_number - Serial Number (WPS) 73139beb93cSSam Leffler * Serial number of the device (up to 32 characters) 73239beb93cSSam Leffler */ 73339beb93cSSam Leffler char *serial_number; 73439beb93cSSam Leffler 73539beb93cSSam Leffler /** 73639beb93cSSam Leffler * device_type - Primary Device Type (WPS) 73739beb93cSSam Leffler */ 738f05cddf9SRui Paulo u8 device_type[WPS_DEV_TYPE_LEN]; 73939beb93cSSam Leffler 74039beb93cSSam Leffler /** 741e28a4053SRui Paulo * config_methods - Config Methods 742e28a4053SRui Paulo * 743e28a4053SRui Paulo * This is a space-separated list of supported WPS configuration 744f05cddf9SRui Paulo * methods. For example, "label virtual_display virtual_push_button 745f05cddf9SRui Paulo * keypad". 746e28a4053SRui Paulo * Available methods: usba ethernet label display ext_nfc_token 747f05cddf9SRui Paulo * int_nfc_token nfc_interface push_button keypad 748f05cddf9SRui Paulo * virtual_display physical_display 749f05cddf9SRui Paulo * virtual_push_button physical_push_button. 750e28a4053SRui Paulo */ 751e28a4053SRui Paulo char *config_methods; 752e28a4053SRui Paulo 753e28a4053SRui Paulo /** 75439beb93cSSam Leffler * os_version - OS Version (WPS) 75539beb93cSSam Leffler * 4-octet operating system version number 75639beb93cSSam Leffler */ 75739beb93cSSam Leffler u8 os_version[4]; 75839beb93cSSam Leffler 75939beb93cSSam Leffler /** 76039beb93cSSam Leffler * country - Country code 76139beb93cSSam Leffler * 76239beb93cSSam Leffler * This is the ISO/IEC alpha2 country code for which we are operating 76339beb93cSSam Leffler * in 76439beb93cSSam Leffler */ 76539beb93cSSam Leffler char country[2]; 76639beb93cSSam Leffler 76739beb93cSSam Leffler /** 76839beb93cSSam Leffler * wps_cred_processing - Credential processing 76939beb93cSSam Leffler * 77039beb93cSSam Leffler * 0 = process received credentials internally 77139beb93cSSam Leffler * 1 = do not process received credentials; just pass them over 77239beb93cSSam Leffler * ctrl_iface to external program(s) 77339beb93cSSam Leffler * 2 = process received credentials internally and pass them over 77439beb93cSSam Leffler * ctrl_iface to external program(s) 77539beb93cSSam Leffler */ 77639beb93cSSam Leffler int wps_cred_processing; 777e28a4053SRui Paulo 7784bc52338SCy Schubert /** 7794bc52338SCy Schubert * wps_cred_add_sae - Whether to enable SAE automatically for WPS 7804bc52338SCy Schubert * 7814bc52338SCy Schubert * 0 = only add the explicitly listed WPA2-PSK configuration 7824bc52338SCy Schubert * 1 = add both the WPA2-PSK and SAE configuration and enable PMF so 7834bc52338SCy Schubert * that the station gets configured in WPA3-Personal transition mode 7844bc52338SCy Schubert * (supports both WPA2-Personal (PSK) and WPA3-Personal (SAE) APs). 7854bc52338SCy Schubert */ 7864bc52338SCy Schubert int wps_cred_add_sae; 7874bc52338SCy Schubert 788f05cddf9SRui Paulo #define MAX_SEC_DEVICE_TYPES 5 789f05cddf9SRui Paulo /** 790f05cddf9SRui Paulo * sec_device_types - Secondary Device Types (P2P) 791f05cddf9SRui Paulo */ 792f05cddf9SRui Paulo u8 sec_device_type[MAX_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN]; 793f05cddf9SRui Paulo int num_sec_device_types; 794f05cddf9SRui Paulo 795f05cddf9SRui Paulo int p2p_listen_reg_class; 796f05cddf9SRui Paulo int p2p_listen_channel; 797f05cddf9SRui Paulo int p2p_oper_reg_class; 798f05cddf9SRui Paulo int p2p_oper_channel; 799f05cddf9SRui Paulo int p2p_go_intent; 800f05cddf9SRui Paulo char *p2p_ssid_postfix; 801f05cddf9SRui Paulo int persistent_reconnect; 802f05cddf9SRui Paulo int p2p_intra_bss; 803f05cddf9SRui Paulo unsigned int num_p2p_pref_chan; 804f05cddf9SRui Paulo struct p2p_channel *p2p_pref_chan; 8055b9c547cSRui Paulo struct wpa_freq_range_list p2p_no_go_freq; 8065b9c547cSRui Paulo int p2p_add_cli_chan; 8075b9c547cSRui Paulo int p2p_ignore_shared_freq; 8085b9c547cSRui Paulo int p2p_optimize_listen_chan; 809f05cddf9SRui Paulo 810c1d255d3SCy Schubert int p2p_6ghz_disable; 811c1d255d3SCy Schubert 812f05cddf9SRui Paulo struct wpabuf *wps_vendor_ext_m1; 813f05cddf9SRui Paulo 814f05cddf9SRui Paulo #define MAX_WPS_VENDOR_EXT 10 815f05cddf9SRui Paulo /** 816f05cddf9SRui Paulo * wps_vendor_ext - Vendor extension attributes in WPS 817f05cddf9SRui Paulo */ 818f05cddf9SRui Paulo struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXT]; 819f05cddf9SRui Paulo 820f05cddf9SRui Paulo /** 821f05cddf9SRui Paulo * p2p_group_idle - Maximum idle time in seconds for P2P group 822f05cddf9SRui Paulo * 823f05cddf9SRui Paulo * This value controls how long a P2P group is maintained after there 824f05cddf9SRui Paulo * is no other members in the group. As a GO, this means no associated 825f05cddf9SRui Paulo * stations in the group. As a P2P client, this means no GO seen in 826f05cddf9SRui Paulo * scan results. The maximum idle time is specified in seconds with 0 827f05cddf9SRui Paulo * indicating no time limit, i.e., the P2P group remains in active 828f05cddf9SRui Paulo * state indefinitely until explicitly removed. As a P2P client, the 829f05cddf9SRui Paulo * maximum idle time of P2P_MAX_CLIENT_IDLE seconds is enforced, i.e., 830f05cddf9SRui Paulo * this parameter is mainly meant for GO use and for P2P client, it can 831f05cddf9SRui Paulo * only be used to reduce the default timeout to smaller value. A 832f05cddf9SRui Paulo * special value -1 can be used to configure immediate removal of the 833f05cddf9SRui Paulo * group for P2P client role on any disconnection after the data 834f05cddf9SRui Paulo * connection has been established. 835f05cddf9SRui Paulo */ 836f05cddf9SRui Paulo int p2p_group_idle; 837f05cddf9SRui Paulo 838e28a4053SRui Paulo /** 839325151a3SRui Paulo * p2p_go_freq_change_policy - The GO frequency change policy 840325151a3SRui Paulo * 841325151a3SRui Paulo * This controls the behavior of the GO when there is a change in the 842325151a3SRui Paulo * map of the currently used frequencies in case more than one channel 843325151a3SRui Paulo * is supported. 844325151a3SRui Paulo * 845325151a3SRui Paulo * @P2P_GO_FREQ_MOVE_SCM: Prefer working in a single channel mode if 846325151a3SRui Paulo * possible. In case the GO is the only interface using its frequency 847325151a3SRui Paulo * and there are other station interfaces on other frequencies, the GO 848325151a3SRui Paulo * will migrate to one of these frequencies. 849325151a3SRui Paulo * 850325151a3SRui Paulo * @P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS: Same as P2P_GO_FREQ_MOVE_SCM, 851325151a3SRui Paulo * but a transition is possible only in case one of the other used 852325151a3SRui Paulo * frequencies is one of the frequencies in the intersection of the 853325151a3SRui Paulo * frequency list of the local device and the peer device. 854325151a3SRui Paulo * 855325151a3SRui Paulo * @P2P_GO_FREQ_MOVE_STAY: Prefer to stay on the current frequency. 856780fb4a2SCy Schubert * 857780fb4a2SCy Schubert * @P2P_GO_FREQ_MOVE_SCM_ECSA: Same as 858780fb4a2SCy Schubert * P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS but a transition is possible only 859780fb4a2SCy Schubert * if all the group members advertise eCSA support. 860325151a3SRui Paulo */ 861325151a3SRui Paulo enum { 862325151a3SRui Paulo P2P_GO_FREQ_MOVE_SCM = 0, 863325151a3SRui Paulo P2P_GO_FREQ_MOVE_SCM_PEER_SUPPORTS = 1, 864325151a3SRui Paulo P2P_GO_FREQ_MOVE_STAY = 2, 865780fb4a2SCy Schubert P2P_GO_FREQ_MOVE_SCM_ECSA = 3, 866780fb4a2SCy Schubert P2P_GO_FREQ_MOVE_MAX = P2P_GO_FREQ_MOVE_SCM_ECSA, 867325151a3SRui Paulo } p2p_go_freq_change_policy; 868325151a3SRui Paulo 869325151a3SRui Paulo #define DEFAULT_P2P_GO_FREQ_MOVE P2P_GO_FREQ_MOVE_STAY 870325151a3SRui Paulo 871325151a3SRui Paulo /** 8725b9c547cSRui Paulo * p2p_passphrase_len - Passphrase length (8..63) for P2P GO 8735b9c547cSRui Paulo * 8745b9c547cSRui Paulo * This parameter controls the length of the random passphrase that is 8755b9c547cSRui Paulo * generated at the GO. 8765b9c547cSRui Paulo */ 8775b9c547cSRui Paulo unsigned int p2p_passphrase_len; 8785b9c547cSRui Paulo 8795b9c547cSRui Paulo /** 880e28a4053SRui Paulo * bss_max_count - Maximum number of BSS entries to keep in memory 881e28a4053SRui Paulo */ 882e28a4053SRui Paulo unsigned int bss_max_count; 883e28a4053SRui Paulo 884e28a4053SRui Paulo /** 885f05cddf9SRui Paulo * bss_expiration_age - BSS entry age after which it can be expired 886f05cddf9SRui Paulo * 887f05cddf9SRui Paulo * This value controls the time in seconds after which a BSS entry 888f05cddf9SRui Paulo * gets removed if it has not been updated or is not in use. 889f05cddf9SRui Paulo */ 890f05cddf9SRui Paulo unsigned int bss_expiration_age; 891f05cddf9SRui Paulo 892f05cddf9SRui Paulo /** 893f05cddf9SRui Paulo * bss_expiration_scan_count - Expire BSS after number of scans 894f05cddf9SRui Paulo * 895f05cddf9SRui Paulo * If the BSS entry has not been seen in this many scans, it will be 896f05cddf9SRui Paulo * removed. A value of 1 means that entry is removed after the first 897f05cddf9SRui Paulo * scan in which the BSSID is not seen. Larger values can be used 898f05cddf9SRui Paulo * to avoid BSS entries disappearing if they are not visible in 899f05cddf9SRui Paulo * every scan (e.g., low signal quality or interference). 900f05cddf9SRui Paulo */ 901f05cddf9SRui Paulo unsigned int bss_expiration_scan_count; 902f05cddf9SRui Paulo 903f05cddf9SRui Paulo /** 904e28a4053SRui Paulo * filter_ssids - SSID-based scan result filtering 905e28a4053SRui Paulo * 906e28a4053SRui Paulo * 0 = do not filter scan results 907e28a4053SRui Paulo * 1 = only include configured SSIDs in scan results/BSS table 908e28a4053SRui Paulo */ 909e28a4053SRui Paulo int filter_ssids; 910f05cddf9SRui Paulo 911f05cddf9SRui Paulo /** 912f05cddf9SRui Paulo * filter_rssi - RSSI-based scan result filtering 913f05cddf9SRui Paulo * 914f05cddf9SRui Paulo * 0 = do not filter scan results 915f05cddf9SRui Paulo * -n = filter scan results below -n dBm 916f05cddf9SRui Paulo */ 917f05cddf9SRui Paulo int filter_rssi; 918f05cddf9SRui Paulo 919f05cddf9SRui Paulo /** 920f05cddf9SRui Paulo * max_num_sta - Maximum number of STAs in an AP/P2P GO 921f05cddf9SRui Paulo */ 922f05cddf9SRui Paulo unsigned int max_num_sta; 923f05cddf9SRui Paulo 924f05cddf9SRui Paulo /** 92585732ac8SCy Schubert * ap_isolate - Whether to use client isolation feature 92685732ac8SCy Schubert * 92785732ac8SCy Schubert * Client isolation can be used to prevent low-level bridging of 92885732ac8SCy Schubert * frames between associated stations in the BSS. By default, 92985732ac8SCy Schubert * this bridging is allowed (ap_isolate=0); except in P2P GO case, 93085732ac8SCy Schubert * where p2p_intra_bss parameter is used to determine whether to allow 93185732ac8SCy Schubert * intra-BSS forwarding (ap_isolate = !p2p_intra_bss). 93285732ac8SCy Schubert * 93385732ac8SCy Schubert * 0 = do not enable AP isolation 93485732ac8SCy Schubert * 1 = enable AP isolation 93585732ac8SCy Schubert */ 93685732ac8SCy Schubert int ap_isolate; 93785732ac8SCy Schubert 93885732ac8SCy Schubert /** 9395b9c547cSRui Paulo * freq_list - Array of allowed scan frequencies or %NULL for all 9405b9c547cSRui Paulo * 9415b9c547cSRui Paulo * This is an optional zero-terminated array of frequencies in 9425b9c547cSRui Paulo * megahertz (MHz) to allow for narrowing scanning range. 9435b9c547cSRui Paulo */ 9445b9c547cSRui Paulo int *freq_list; 9455b9c547cSRui Paulo 9465b9c547cSRui Paulo /** 947c1d255d3SCy Schubert * initial_freq_list - like freq_list but for initial scan 948c1d255d3SCy Schubert * 949c1d255d3SCy Schubert * This is an optional zero-terminated array of frequencies in 950c1d255d3SCy Schubert * megahertz (MHz) to allow for narrowing scanning range when 951c1d255d3SCy Schubert * the application is started. 952c1d255d3SCy Schubert * 953c1d255d3SCy Schubert * This can be used to speed up initial connection time if the 954c1d255d3SCy Schubert * channel is known ahead of time, without limiting the scanned 955c1d255d3SCy Schubert * frequencies during normal use. 956c1d255d3SCy Schubert */ 957c1d255d3SCy Schubert int *initial_freq_list; 958c1d255d3SCy Schubert 959c1d255d3SCy Schubert /** 9605b9c547cSRui Paulo * scan_cur_freq - Whether to scan only the current channel 9615b9c547cSRui Paulo * 9625b9c547cSRui Paulo * If true, attempt to scan only the current channel if any other 9635b9c547cSRui Paulo * VIFs on this radio are already associated on a particular channel. 9645b9c547cSRui Paulo */ 9655b9c547cSRui Paulo int scan_cur_freq; 9665b9c547cSRui Paulo 9675b9c547cSRui Paulo /** 968c1d255d3SCy Schubert * scan_res_valid_for_connect - Seconds scans are valid for association 969c1d255d3SCy Schubert * 970c1d255d3SCy Schubert * This configures the number of seconds old scan results are considered 971c1d255d3SCy Schubert * valid for association. When scan results are older than this value 972c1d255d3SCy Schubert * a new scan is triggered prior to the association. 973c1d255d3SCy Schubert */ 974c1d255d3SCy Schubert int scan_res_valid_for_connect; 975c1d255d3SCy Schubert 976c1d255d3SCy Schubert /** 977f05cddf9SRui Paulo * changed_parameters - Bitmap of changed parameters since last update 978f05cddf9SRui Paulo */ 979f05cddf9SRui Paulo unsigned int changed_parameters; 980f05cddf9SRui Paulo 981f05cddf9SRui Paulo /** 98285732ac8SCy Schubert * disassoc_low_ack - Disassociate stations with massive packet loss 983f05cddf9SRui Paulo */ 984f05cddf9SRui Paulo int disassoc_low_ack; 985f05cddf9SRui Paulo 986f05cddf9SRui Paulo /** 987f05cddf9SRui Paulo * interworking - Whether Interworking (IEEE 802.11u) is enabled 988f05cddf9SRui Paulo */ 989f05cddf9SRui Paulo int interworking; 990f05cddf9SRui Paulo 991f05cddf9SRui Paulo /** 992f05cddf9SRui Paulo * access_network_type - Access Network Type 993f05cddf9SRui Paulo * 994f05cddf9SRui Paulo * When Interworking is enabled, scans will be limited to APs that 995f05cddf9SRui Paulo * advertise the specified Access Network Type (0..15; with 15 996f05cddf9SRui Paulo * indicating wildcard match). 997f05cddf9SRui Paulo */ 998f05cddf9SRui Paulo int access_network_type; 999f05cddf9SRui Paulo 1000f05cddf9SRui Paulo /** 100185732ac8SCy Schubert * go_interworking - Whether Interworking for P2P GO is enabled 100285732ac8SCy Schubert */ 100385732ac8SCy Schubert int go_interworking; 100485732ac8SCy Schubert 100585732ac8SCy Schubert /** 100685732ac8SCy Schubert * go_access_network_type - P2P GO Access Network Type 100785732ac8SCy Schubert * 100885732ac8SCy Schubert * This indicates which access network type to advertise if Interworking 100985732ac8SCy Schubert * is enabled for P2P GO. 101085732ac8SCy Schubert */ 101185732ac8SCy Schubert int go_access_network_type; 101285732ac8SCy Schubert 101385732ac8SCy Schubert /** 101485732ac8SCy Schubert * go_internet - Interworking: Internet connectivity (0 or 1) 101585732ac8SCy Schubert */ 101685732ac8SCy Schubert int go_internet; 101785732ac8SCy Schubert 101885732ac8SCy Schubert /** 101985732ac8SCy Schubert * go_venue_group - Interworking: Venue group 102085732ac8SCy Schubert */ 102185732ac8SCy Schubert int go_venue_group; 102285732ac8SCy Schubert 102385732ac8SCy Schubert /** 102485732ac8SCy Schubert * go_venue_type: Interworking: Venue type 102585732ac8SCy Schubert */ 102685732ac8SCy Schubert int go_venue_type; 102785732ac8SCy Schubert 102885732ac8SCy Schubert /** 1029c1d255d3SCy Schubert * hessid - Homogeneous ESS identifier 1030f05cddf9SRui Paulo * 1031f05cddf9SRui Paulo * If this is set (any octet is non-zero), scans will be used to 1032f05cddf9SRui Paulo * request response only from BSSes belonging to the specified 1033f05cddf9SRui Paulo * Homogeneous ESS. This is used only if interworking is enabled. 1034f05cddf9SRui Paulo */ 1035f05cddf9SRui Paulo u8 hessid[ETH_ALEN]; 1036f05cddf9SRui Paulo 1037f05cddf9SRui Paulo /** 1038f05cddf9SRui Paulo * hs20 - Hotspot 2.0 1039f05cddf9SRui Paulo */ 1040f05cddf9SRui Paulo int hs20; 1041f05cddf9SRui Paulo 1042f05cddf9SRui Paulo /** 1043f05cddf9SRui Paulo * pbc_in_m1 - AP mode WPS probing workaround for PBC with Windows 7 1044f05cddf9SRui Paulo * 1045f05cddf9SRui Paulo * Windows 7 uses incorrect way of figuring out AP's WPS capabilities 1046f05cddf9SRui Paulo * by acting as a Registrar and using M1 from the AP. The config 1047f05cddf9SRui Paulo * methods attribute in that message is supposed to indicate only the 1048f05cddf9SRui Paulo * configuration method supported by the AP in Enrollee role, i.e., to 1049f05cddf9SRui Paulo * add an external Registrar. For that case, PBC shall not be used and 1050f05cddf9SRui Paulo * as such, the PushButton config method is removed from M1 by default. 1051f05cddf9SRui Paulo * If pbc_in_m1=1 is included in the configuration file, the PushButton 1052f05cddf9SRui Paulo * config method is left in M1 (if included in config_methods 1053f05cddf9SRui Paulo * parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from 1054f05cddf9SRui Paulo * a label in the AP). 1055f05cddf9SRui Paulo */ 1056f05cddf9SRui Paulo int pbc_in_m1; 1057f05cddf9SRui Paulo 1058f05cddf9SRui Paulo /** 1059f05cddf9SRui Paulo * autoscan - Automatic scan parameters or %NULL if none 1060f05cddf9SRui Paulo * 1061f05cddf9SRui Paulo * This is an optional set of parameters for automatic scanning 1062f05cddf9SRui Paulo * within an interface in following format: 1063f05cddf9SRui Paulo * <autoscan module name>:<module parameters> 1064f05cddf9SRui Paulo */ 1065f05cddf9SRui Paulo char *autoscan; 1066f05cddf9SRui Paulo 1067f05cddf9SRui Paulo /** 10685b9c547cSRui Paulo * wps_nfc_pw_from_config - NFC Device Password was read from config 10695b9c547cSRui Paulo * 10705b9c547cSRui Paulo * This parameter can be determined whether the NFC Device Password was 10715b9c547cSRui Paulo * included in the configuration (1) or generated dynamically (0). Only 10725b9c547cSRui Paulo * the former case is re-written back to the configuration file. 10735b9c547cSRui Paulo */ 10745b9c547cSRui Paulo int wps_nfc_pw_from_config; 10755b9c547cSRui Paulo 10765b9c547cSRui Paulo /** 1077f05cddf9SRui Paulo * wps_nfc_dev_pw_id - NFC Device Password ID for password token 1078f05cddf9SRui Paulo */ 1079f05cddf9SRui Paulo int wps_nfc_dev_pw_id; 1080f05cddf9SRui Paulo 1081f05cddf9SRui Paulo /** 1082f05cddf9SRui Paulo * wps_nfc_dh_pubkey - NFC DH Public Key for password token 1083f05cddf9SRui Paulo */ 1084f05cddf9SRui Paulo struct wpabuf *wps_nfc_dh_pubkey; 1085f05cddf9SRui Paulo 1086f05cddf9SRui Paulo /** 1087f05cddf9SRui Paulo * wps_nfc_dh_privkey - NFC DH Private Key for password token 1088f05cddf9SRui Paulo */ 1089f05cddf9SRui Paulo struct wpabuf *wps_nfc_dh_privkey; 1090f05cddf9SRui Paulo 1091f05cddf9SRui Paulo /** 1092f05cddf9SRui Paulo * wps_nfc_dev_pw - NFC Device Password for password token 1093f05cddf9SRui Paulo */ 1094f05cddf9SRui Paulo struct wpabuf *wps_nfc_dev_pw; 1095f05cddf9SRui Paulo 1096f05cddf9SRui Paulo /** 1097f05cddf9SRui Paulo * ext_password_backend - External password backend or %NULL if none 1098f05cddf9SRui Paulo * 1099f05cddf9SRui Paulo * format: <backend name>[:<optional backend parameters>] 1100f05cddf9SRui Paulo */ 1101f05cddf9SRui Paulo char *ext_password_backend; 1102f05cddf9SRui Paulo 1103f05cddf9SRui Paulo /* 1104f05cddf9SRui Paulo * p2p_go_max_inactivity - Timeout in seconds to detect STA inactivity 1105f05cddf9SRui Paulo * 1106f05cddf9SRui Paulo * This timeout value is used in P2P GO mode to clean up 1107f05cddf9SRui Paulo * inactive stations. 1108f05cddf9SRui Paulo * By default: 300 seconds. 1109f05cddf9SRui Paulo */ 1110f05cddf9SRui Paulo int p2p_go_max_inactivity; 1111f05cddf9SRui Paulo 1112f05cddf9SRui Paulo struct hostapd_wmm_ac_params wmm_ac_params[4]; 1113c1d255d3SCy Schubert struct hostapd_tx_queue_params tx_queue[4]; 1114f05cddf9SRui Paulo 1115f05cddf9SRui Paulo /** 1116f05cddf9SRui Paulo * auto_interworking - Whether to use network selection automatically 1117f05cddf9SRui Paulo * 1118f05cddf9SRui Paulo * 0 = do not automatically go through Interworking network selection 1119f05cddf9SRui Paulo * (i.e., require explicit interworking_select command for this) 1120f05cddf9SRui Paulo * 1 = perform Interworking network selection if one or more 1121f05cddf9SRui Paulo * credentials have been configured and scan did not find a 1122f05cddf9SRui Paulo * matching network block 1123f05cddf9SRui Paulo */ 1124f05cddf9SRui Paulo int auto_interworking; 1125f05cddf9SRui Paulo 1126f05cddf9SRui Paulo /** 1127f05cddf9SRui Paulo * p2p_go_ht40 - Default mode for HT40 enable when operating as GO. 1128f05cddf9SRui Paulo * 1129f05cddf9SRui Paulo * This will take effect for p2p_group_add, p2p_connect, and p2p_invite. 1130f05cddf9SRui Paulo * Note that regulatory constraints and driver capabilities are 1131f05cddf9SRui Paulo * consulted anyway, so setting it to 1 can't do real harm. 1132f05cddf9SRui Paulo * By default: 0 (disabled) 1133f05cddf9SRui Paulo */ 1134f05cddf9SRui Paulo int p2p_go_ht40; 1135f05cddf9SRui Paulo 1136f05cddf9SRui Paulo /** 11375b9c547cSRui Paulo * p2p_go_vht - Default mode for VHT enable when operating as GO 11385b9c547cSRui Paulo * 11395b9c547cSRui Paulo * This will take effect for p2p_group_add, p2p_connect, and p2p_invite. 11405b9c547cSRui Paulo * Note that regulatory constraints and driver capabilities are 11415b9c547cSRui Paulo * consulted anyway, so setting it to 1 can't do real harm. 11425b9c547cSRui Paulo * By default: 0 (disabled) 11435b9c547cSRui Paulo */ 11445b9c547cSRui Paulo int p2p_go_vht; 11455b9c547cSRui Paulo 11465b9c547cSRui Paulo /** 1147c1d255d3SCy Schubert * p2p_go_edmg - Default mode for EDMG enable when operating as GO 1148c1d255d3SCy Schubert * 1149c1d255d3SCy Schubert * This will take effect for p2p_group_add, p2p_connect, and p2p_invite. 1150c1d255d3SCy Schubert * Note that regulatory constraints and driver capabilities are 1151c1d255d3SCy Schubert * consulted anyway, so setting it to 1 can't do real harm. 1152c1d255d3SCy Schubert * By default: 0 (disabled) 1153c1d255d3SCy Schubert */ 1154c1d255d3SCy Schubert int p2p_go_edmg; 1155c1d255d3SCy Schubert 1156c1d255d3SCy Schubert /** 11574bc52338SCy Schubert * p2p_go_he - Default mode for 11ax HE enable when operating as GO 11584bc52338SCy Schubert * 11594bc52338SCy Schubert * This will take effect for p2p_group_add, p2p_connect, and p2p_invite. 11604bc52338SCy Schubert * Note that regulatory constraints and driver capabilities are 11614bc52338SCy Schubert * consulted anyway, so setting it to 1 can't do real harm. 11624bc52338SCy Schubert * By default: 0 (disabled) 11634bc52338SCy Schubert */ 11644bc52338SCy Schubert int p2p_go_he; 11654bc52338SCy Schubert 11664bc52338SCy Schubert /** 11675b9c547cSRui Paulo * p2p_go_ctwindow - CTWindow to use when operating as GO 11685b9c547cSRui Paulo * 11695b9c547cSRui Paulo * By default: 0 (no CTWindow). Values 0-127 can be used to indicate 11705b9c547cSRui Paulo * the length of the CTWindow in TUs. 11715b9c547cSRui Paulo */ 11725b9c547cSRui Paulo int p2p_go_ctwindow; 11735b9c547cSRui Paulo 11745b9c547cSRui Paulo /** 1175f05cddf9SRui Paulo * p2p_disabled - Whether P2P operations are disabled for this interface 1176f05cddf9SRui Paulo */ 1177f05cddf9SRui Paulo int p2p_disabled; 1178f05cddf9SRui Paulo 1179f05cddf9SRui Paulo /** 1180f05cddf9SRui Paulo * p2p_no_group_iface - Whether group interfaces can be used 1181f05cddf9SRui Paulo * 1182f05cddf9SRui Paulo * By default, wpa_supplicant will create a separate interface for P2P 1183f05cddf9SRui Paulo * group operations if the driver supports this. This functionality can 1184f05cddf9SRui Paulo * be disabled by setting this parameter to 1. In that case, the same 1185f05cddf9SRui Paulo * interface that was used for the P2P management operations is used 1186f05cddf9SRui Paulo * also for the group operation. 1187f05cddf9SRui Paulo */ 1188f05cddf9SRui Paulo int p2p_no_group_iface; 1189f05cddf9SRui Paulo 1190f05cddf9SRui Paulo /** 1191325151a3SRui Paulo * p2p_cli_probe - Enable/disable P2P CLI probe request handling 1192325151a3SRui Paulo * 1193325151a3SRui Paulo * If this parameter is set to 1, a connected P2P Client will receive 1194325151a3SRui Paulo * and handle Probe Request frames. Setting this parameter to 0 1195325151a3SRui Paulo * disables this option. Default value: 0. 1196325151a3SRui Paulo * 1197325151a3SRui Paulo * Note: Setting this property at run time takes effect on the following 1198325151a3SRui Paulo * interface state transition to/from the WPA_COMPLETED state. 1199325151a3SRui Paulo */ 1200325151a3SRui Paulo int p2p_cli_probe; 1201325151a3SRui Paulo 1202325151a3SRui Paulo /** 1203f05cddf9SRui Paulo * okc - Whether to enable opportunistic key caching by default 1204f05cddf9SRui Paulo * 1205f05cddf9SRui Paulo * By default, OKC is disabled unless enabled by the per-network 1206f05cddf9SRui Paulo * proactive_key_caching=1 parameter. okc=1 can be used to change this 1207f05cddf9SRui Paulo * default behavior. 1208f05cddf9SRui Paulo */ 1209f05cddf9SRui Paulo int okc; 1210f05cddf9SRui Paulo 1211f05cddf9SRui Paulo /** 1212f05cddf9SRui Paulo * pmf - Whether to enable/require PMF by default 1213f05cddf9SRui Paulo * 1214f05cddf9SRui Paulo * By default, PMF is disabled unless enabled by the per-network 1215f05cddf9SRui Paulo * ieee80211w=1 or ieee80211w=2 parameter. pmf=1/2 can be used to change 1216780fb4a2SCy Schubert * this default behavior for RSN network (this is not applicable for 1217780fb4a2SCy Schubert * non-RSN cases). 1218f05cddf9SRui Paulo */ 1219f05cddf9SRui Paulo enum mfp_options pmf; 12205b9c547cSRui Paulo 12215b9c547cSRui Paulo /** 12225b9c547cSRui Paulo * sae_groups - Preference list of enabled groups for SAE 12235b9c547cSRui Paulo * 12245b9c547cSRui Paulo * By default (if this parameter is not set), the mandatory group 19 12255b9c547cSRui Paulo * (ECC group defined over a 256-bit prime order field) is preferred, 12265b9c547cSRui Paulo * but other groups are also enabled. If this parameter is set, the 12275b9c547cSRui Paulo * groups will be tried in the indicated order. 12285b9c547cSRui Paulo */ 12295b9c547cSRui Paulo int *sae_groups; 12305b9c547cSRui Paulo 12315b9c547cSRui Paulo /** 1232c1d255d3SCy Schubert * sae_pwe - SAE mechanism for PWE derivation 1233c1d255d3SCy Schubert * 0 = hunting-and-pecking loop only 1234c1d255d3SCy Schubert * 1 = hash-to-element only 1235c1d255d3SCy Schubert * 2 = both hunting-and-pecking loop and hash-to-element enabled 1236c1d255d3SCy Schubert */ 1237c1d255d3SCy Schubert int sae_pwe; 1238c1d255d3SCy Schubert 1239c1d255d3SCy Schubert /** 1240c1d255d3SCy Schubert * sae_pmkid_in_assoc - Whether to include PMKID in SAE Assoc Req 1241c1d255d3SCy Schubert */ 1242c1d255d3SCy Schubert int sae_pmkid_in_assoc; 1243c1d255d3SCy Schubert 1244c1d255d3SCy Schubert /** 12455b9c547cSRui Paulo * dtim_period - Default DTIM period in Beacon intervals 12465b9c547cSRui Paulo * 12475b9c547cSRui Paulo * This parameter can be used to set the default value for network 12485b9c547cSRui Paulo * blocks that do not specify dtim_period. 12495b9c547cSRui Paulo */ 12505b9c547cSRui Paulo int dtim_period; 12515b9c547cSRui Paulo 12525b9c547cSRui Paulo /** 12535b9c547cSRui Paulo * beacon_int - Default Beacon interval in TU 12545b9c547cSRui Paulo * 12555b9c547cSRui Paulo * This parameter can be used to set the default value for network 12565b9c547cSRui Paulo * blocks that do not specify beacon_int. 12575b9c547cSRui Paulo */ 12585b9c547cSRui Paulo int beacon_int; 12595b9c547cSRui Paulo 12605b9c547cSRui Paulo /** 12615b9c547cSRui Paulo * ap_vendor_elements: Vendor specific elements for Beacon/ProbeResp 12625b9c547cSRui Paulo * 12635b9c547cSRui Paulo * This parameter can be used to define additional vendor specific 12645b9c547cSRui Paulo * elements for Beacon and Probe Response frames in AP/P2P GO mode. The 12655b9c547cSRui Paulo * format for these element(s) is a hexdump of the raw information 12665b9c547cSRui Paulo * elements (id+len+payload for one or more elements). 12675b9c547cSRui Paulo */ 12685b9c547cSRui Paulo struct wpabuf *ap_vendor_elements; 12695b9c547cSRui Paulo 12705b9c547cSRui Paulo /** 12714b72b91aSCy Schubert * ap_assocresp_elements: Vendor specific elements for (Re)Association 12724b72b91aSCy Schubert * Response frames 12734b72b91aSCy Schubert * 12744b72b91aSCy Schubert * This parameter can be used to define additional vendor specific 12754b72b91aSCy Schubert * elements for (Re)Association Response frames in AP/P2P GO mode. The 12764b72b91aSCy Schubert * format for these element(s) is a hexdump of the raw information 12774b72b91aSCy Schubert * elements (id+len+payload for one or more elements). 12784b72b91aSCy Schubert */ 12794b72b91aSCy Schubert struct wpabuf *ap_assocresp_elements; 12804b72b91aSCy Schubert 12814b72b91aSCy Schubert /** 12825b9c547cSRui Paulo * ignore_old_scan_res - Ignore scan results older than request 12835b9c547cSRui Paulo * 12845b9c547cSRui Paulo * The driver may have a cache of scan results that makes it return 12855b9c547cSRui Paulo * information that is older than our scan trigger. This parameter can 12865b9c547cSRui Paulo * be used to configure such old information to be ignored instead of 12875b9c547cSRui Paulo * allowing it to update the internal BSS table. 12885b9c547cSRui Paulo */ 12895b9c547cSRui Paulo int ignore_old_scan_res; 12905b9c547cSRui Paulo 12915b9c547cSRui Paulo /** 12925b9c547cSRui Paulo * sched_scan_interval - schedule scan interval 12935b9c547cSRui Paulo */ 12945b9c547cSRui Paulo unsigned int sched_scan_interval; 12955b9c547cSRui Paulo 12965b9c547cSRui Paulo /** 129785732ac8SCy Schubert * sched_scan_start_delay - Schedule scan start delay before first scan 129885732ac8SCy Schubert * 129985732ac8SCy Schubert * Delay (in seconds) before scheduling first scan plan cycle. The 130085732ac8SCy Schubert * driver may ignore this parameter and start immediately (or at any 130185732ac8SCy Schubert * other time), if this feature is not supported. 130285732ac8SCy Schubert */ 130385732ac8SCy Schubert unsigned int sched_scan_start_delay; 130485732ac8SCy Schubert 130585732ac8SCy Schubert /** 13065b9c547cSRui Paulo * tdls_external_control - External control for TDLS setup requests 13075b9c547cSRui Paulo * 13085b9c547cSRui Paulo * Enable TDLS mode where external programs are given the control 13095b9c547cSRui Paulo * to specify the TDLS link to get established to the driver. The 13105b9c547cSRui Paulo * driver requests the TDLS setup to the supplicant only for the 13115b9c547cSRui Paulo * specified TDLS peers. 13125b9c547cSRui Paulo */ 13135b9c547cSRui Paulo int tdls_external_control; 13145b9c547cSRui Paulo 13155b9c547cSRui Paulo u8 ip_addr_go[4]; 13165b9c547cSRui Paulo u8 ip_addr_mask[4]; 13175b9c547cSRui Paulo u8 ip_addr_start[4]; 13185b9c547cSRui Paulo u8 ip_addr_end[4]; 13195b9c547cSRui Paulo 13205b9c547cSRui Paulo /** 13215b9c547cSRui Paulo * osu_dir - OSU provider information directory 13225b9c547cSRui Paulo * 13235b9c547cSRui Paulo * If set, allow FETCH_OSU control interface command to be used to fetch 13245b9c547cSRui Paulo * OSU provider information into all APs and store the results in this 13255b9c547cSRui Paulo * directory. 13265b9c547cSRui Paulo */ 13275b9c547cSRui Paulo char *osu_dir; 13285b9c547cSRui Paulo 13295b9c547cSRui Paulo /** 13305b9c547cSRui Paulo * wowlan_triggers - Wake-on-WLAN triggers 13315b9c547cSRui Paulo * 13325b9c547cSRui Paulo * If set, these wowlan triggers will be configured. 13335b9c547cSRui Paulo */ 13345b9c547cSRui Paulo char *wowlan_triggers; 13355b9c547cSRui Paulo 13365b9c547cSRui Paulo /** 13375b9c547cSRui Paulo * p2p_search_delay - Extra delay between concurrent search iterations 13385b9c547cSRui Paulo * 13395b9c547cSRui Paulo * Add extra delay (in milliseconds) between search iterations when 13405b9c547cSRui Paulo * there is a concurrent operation to make p2p_find friendlier to 13415b9c547cSRui Paulo * concurrent operations by avoiding it from taking 100% of radio 13425b9c547cSRui Paulo * resources. 13435b9c547cSRui Paulo */ 13445b9c547cSRui Paulo unsigned int p2p_search_delay; 13455b9c547cSRui Paulo 13465b9c547cSRui Paulo /** 13475b9c547cSRui Paulo * mac_addr - MAC address policy default 13485b9c547cSRui Paulo * 13495b9c547cSRui Paulo * 0 = use permanent MAC address 13505b9c547cSRui Paulo * 1 = use random MAC address for each ESS connection 13515b9c547cSRui Paulo * 2 = like 1, but maintain OUI (with local admin bit set) 13525b9c547cSRui Paulo * 13535b9c547cSRui Paulo * By default, permanent MAC address is used unless policy is changed by 13545b9c547cSRui Paulo * the per-network mac_addr parameter. Global mac_addr=1 can be used to 13555b9c547cSRui Paulo * change this default behavior. 13565b9c547cSRui Paulo */ 13575b9c547cSRui Paulo int mac_addr; 13585b9c547cSRui Paulo 13595b9c547cSRui Paulo /** 13605b9c547cSRui Paulo * rand_addr_lifetime - Lifetime of random MAC address in seconds 13615b9c547cSRui Paulo */ 13625b9c547cSRui Paulo unsigned int rand_addr_lifetime; 13635b9c547cSRui Paulo 13645b9c547cSRui Paulo /** 13655b9c547cSRui Paulo * preassoc_mac_addr - Pre-association MAC address policy 13665b9c547cSRui Paulo * 13675b9c547cSRui Paulo * 0 = use permanent MAC address 13685b9c547cSRui Paulo * 1 = use random MAC address 13695b9c547cSRui Paulo * 2 = like 1, but maintain OUI (with local admin bit set) 13705b9c547cSRui Paulo */ 13715b9c547cSRui Paulo int preassoc_mac_addr; 13725b9c547cSRui Paulo 13735b9c547cSRui Paulo /** 13745b9c547cSRui Paulo * key_mgmt_offload - Use key management offload 13755b9c547cSRui Paulo * 13765b9c547cSRui Paulo * Key management offload should be used if the device supports it. 13775b9c547cSRui Paulo * Key management offload is the capability of a device operating as 13785b9c547cSRui Paulo * a station to do the exchange necessary to establish temporal keys 13795b9c547cSRui Paulo * during initial RSN connection, after roaming, or during a PTK 13805b9c547cSRui Paulo * rekeying operation. 13815b9c547cSRui Paulo */ 13825b9c547cSRui Paulo int key_mgmt_offload; 13835b9c547cSRui Paulo 13845b9c547cSRui Paulo /** 13855b9c547cSRui Paulo * user_mpm - MPM residency 13865b9c547cSRui Paulo * 13875b9c547cSRui Paulo * 0: MPM lives in driver. 13885b9c547cSRui Paulo * 1: wpa_supplicant handles peering and station allocation. 13895b9c547cSRui Paulo * 13905b9c547cSRui Paulo * If AMPE or SAE is enabled, the MPM is always in userspace. 13915b9c547cSRui Paulo */ 13925b9c547cSRui Paulo int user_mpm; 13935b9c547cSRui Paulo 13945b9c547cSRui Paulo /** 13955b9c547cSRui Paulo * max_peer_links - Maximum number of peer links 13965b9c547cSRui Paulo * 13975b9c547cSRui Paulo * Maximum number of mesh peering currently maintained by the STA. 13985b9c547cSRui Paulo */ 13995b9c547cSRui Paulo int max_peer_links; 14005b9c547cSRui Paulo 14015b9c547cSRui Paulo /** 14025b9c547cSRui Paulo * cert_in_cb - Whether to include a peer certificate dump in events 14035b9c547cSRui Paulo * 14045b9c547cSRui Paulo * This controls whether peer certificates for authentication server and 14055b9c547cSRui Paulo * its certificate chain are included in EAP peer certificate events. 14065b9c547cSRui Paulo */ 14075b9c547cSRui Paulo int cert_in_cb; 14085b9c547cSRui Paulo 14095b9c547cSRui Paulo /** 14105b9c547cSRui Paulo * mesh_max_inactivity - Timeout in seconds to detect STA inactivity 14115b9c547cSRui Paulo * 14125b9c547cSRui Paulo * This timeout value is used in mesh STA to clean up inactive stations. 14135b9c547cSRui Paulo * By default: 300 seconds. 14145b9c547cSRui Paulo */ 14155b9c547cSRui Paulo int mesh_max_inactivity; 14165b9c547cSRui Paulo 14175b9c547cSRui Paulo /** 1418*32a95656SCy Schubert * mesh_fwding - Mesh network layer-2 forwarding (dot11MeshForwarding) 1419*32a95656SCy Schubert * 1420*32a95656SCy Schubert * This controls whether to enable layer-2 forwarding. 1421*32a95656SCy Schubert * By default: 1: enabled 1422*32a95656SCy Schubert */ 1423*32a95656SCy Schubert int mesh_fwding; 1424*32a95656SCy Schubert 1425*32a95656SCy Schubert /** 1426325151a3SRui Paulo * dot11RSNASAERetransPeriod - Timeout to retransmit SAE Auth frame 1427325151a3SRui Paulo * 1428325151a3SRui Paulo * This timeout value is used in mesh STA to retransmit 1429325151a3SRui Paulo * SAE Authentication frame. 1430325151a3SRui Paulo * By default: 1000 milliseconds. 1431325151a3SRui Paulo */ 1432325151a3SRui Paulo int dot11RSNASAERetransPeriod; 1433325151a3SRui Paulo 1434325151a3SRui Paulo /** 14355b9c547cSRui Paulo * passive_scan - Whether to force passive scan for network connection 14365b9c547cSRui Paulo * 14375b9c547cSRui Paulo * This parameter can be used to force only passive scanning to be used 14385b9c547cSRui Paulo * for network connection cases. It should be noted that this will slow 14395b9c547cSRui Paulo * down scan operations and reduce likelihood of finding the AP. In 14405b9c547cSRui Paulo * addition, some use cases will override this due to functional 14415b9c547cSRui Paulo * requirements, e.g., for finding an AP that uses hidden SSID 14425b9c547cSRui Paulo * (scan_ssid=1) or P2P device discovery. 14435b9c547cSRui Paulo */ 14445b9c547cSRui Paulo int passive_scan; 14455b9c547cSRui Paulo 14465b9c547cSRui Paulo /** 14475b9c547cSRui Paulo * reassoc_same_bss_optim - Whether to optimize reassoc-to-same-BSS 14485b9c547cSRui Paulo */ 14495b9c547cSRui Paulo int reassoc_same_bss_optim; 1450325151a3SRui Paulo 1451325151a3SRui Paulo /** 1452325151a3SRui Paulo * wps_priority - Priority for the networks added through WPS 1453325151a3SRui Paulo * 1454325151a3SRui Paulo * This priority value will be set to each network profile that is added 1455325151a3SRui Paulo * by executing the WPS protocol. 1456325151a3SRui Paulo */ 1457325151a3SRui Paulo int wps_priority; 1458325151a3SRui Paulo 1459325151a3SRui Paulo /** 1460325151a3SRui Paulo * fst_group_id - FST group ID 1461325151a3SRui Paulo */ 1462325151a3SRui Paulo char *fst_group_id; 1463325151a3SRui Paulo 1464325151a3SRui Paulo /** 1465325151a3SRui Paulo * fst_priority - priority of the interface within the FST group 1466325151a3SRui Paulo */ 1467325151a3SRui Paulo int fst_priority; 1468325151a3SRui Paulo 1469325151a3SRui Paulo /** 1470325151a3SRui Paulo * fst_llt - default FST LLT (Link-Lost Timeout) to be used for the 1471325151a3SRui Paulo * interface. 1472325151a3SRui Paulo */ 1473325151a3SRui Paulo int fst_llt; 1474780fb4a2SCy Schubert 1475780fb4a2SCy Schubert /** 1476780fb4a2SCy Schubert * wpa_rsc_relaxation - RSC relaxation on GTK installation 1477780fb4a2SCy Schubert * 1478780fb4a2SCy Schubert * Values: 1479780fb4a2SCy Schubert * 0 - use the EAPOL-Key RSC value on GTK installation 1480780fb4a2SCy Schubert * 1 - use the null RSC if a bogus RSC value is detected in message 3 1481780fb4a2SCy Schubert * of 4-Way Handshake or message 1 of Group Key Handshake. 1482780fb4a2SCy Schubert */ 1483780fb4a2SCy Schubert int wpa_rsc_relaxation; 1484780fb4a2SCy Schubert 1485780fb4a2SCy Schubert /** 1486780fb4a2SCy Schubert * sched_scan_plans - Scan plans for scheduled scan 1487780fb4a2SCy Schubert * 1488780fb4a2SCy Schubert * Each scan plan specifies the interval between scans and the number of 1489780fb4a2SCy Schubert * iterations. The last scan plan only specifies the scan interval and 1490780fb4a2SCy Schubert * will be run infinitely. 1491780fb4a2SCy Schubert * 1492780fb4a2SCy Schubert * format: <interval:iterations> <interval2:iterations2> ... <interval> 1493780fb4a2SCy Schubert */ 1494780fb4a2SCy Schubert char *sched_scan_plans; 1495780fb4a2SCy Schubert 1496780fb4a2SCy Schubert #ifdef CONFIG_MBO 1497780fb4a2SCy Schubert /** 1498780fb4a2SCy Schubert * non_pref_chan - Non-preferred channels list, separated by spaces. 1499780fb4a2SCy Schubert * 1500780fb4a2SCy Schubert * format: op_class:chan:preference:reason<:detail> 1501780fb4a2SCy Schubert * Detail is optional. 1502780fb4a2SCy Schubert */ 1503780fb4a2SCy Schubert char *non_pref_chan; 1504780fb4a2SCy Schubert 1505780fb4a2SCy Schubert /** 1506780fb4a2SCy Schubert * mbo_cell_capa - Cellular capabilities for MBO 1507780fb4a2SCy Schubert */ 1508780fb4a2SCy Schubert enum mbo_cellular_capa mbo_cell_capa; 150985732ac8SCy Schubert 151085732ac8SCy Schubert /** 151185732ac8SCy Schubert * disassoc_imminent_rssi_threshold - RSSI threshold of candidate AP 151285732ac8SCy Schubert * when disassociation imminent is set. 151385732ac8SCy Schubert */ 151485732ac8SCy Schubert int disassoc_imminent_rssi_threshold; 151585732ac8SCy Schubert 151685732ac8SCy Schubert /** 151785732ac8SCy Schubert * oce - Enable OCE in STA and/or STA-CFON mode 151885732ac8SCy Schubert * - Set BIT(0) to enable OCE in non-AP STA mode 151985732ac8SCy Schubert * - Set BIT(1) to enable OCE in STA-CFON mode 152085732ac8SCy Schubert */ 152185732ac8SCy Schubert unsigned int oce; 1522780fb4a2SCy Schubert #endif /* CONFIG_MBO */ 1523780fb4a2SCy Schubert 1524780fb4a2SCy Schubert /** 1525780fb4a2SCy Schubert * gas_address3 - GAS Address3 field behavior 1526780fb4a2SCy Schubert * 1527780fb4a2SCy Schubert * Values: 1528780fb4a2SCy Schubert * 0 - P2P specification (Address3 = AP BSSID) 1529780fb4a2SCy Schubert * 1 = IEEE 802.11 standard compliant (Address3 = Wildcard BSSID when 1530780fb4a2SCy Schubert * sent to not-associated AP; if associated, AP BSSID) 1531780fb4a2SCy Schubert */ 1532780fb4a2SCy Schubert int gas_address3; 1533780fb4a2SCy Schubert 1534780fb4a2SCy Schubert /** 1535780fb4a2SCy Schubert * ftm_responder - Publish FTM (fine timing measurement) 1536780fb4a2SCy Schubert * responder functionality 1537780fb4a2SCy Schubert * 1538780fb4a2SCy Schubert * Values: 1539780fb4a2SCy Schubert * 0 - do not publish FTM responder functionality (Default) 1540780fb4a2SCy Schubert * 1 - publish FTM responder functionality in 1541780fb4a2SCy Schubert * bit 70 of Extended Capabilities element 1542780fb4a2SCy Schubert * Note, actual FTM responder operation is managed outside 1543780fb4a2SCy Schubert * wpa_supplicant. 1544780fb4a2SCy Schubert */ 1545780fb4a2SCy Schubert int ftm_responder; 1546780fb4a2SCy Schubert 1547780fb4a2SCy Schubert /** 1548780fb4a2SCy Schubert * ftm_initiator - Publish FTM (fine timing measurement) 1549780fb4a2SCy Schubert * initiator functionality 1550780fb4a2SCy Schubert * 1551780fb4a2SCy Schubert * Values: 1552780fb4a2SCy Schubert * 0 - do not publish FTM initiator functionality (Default) 1553780fb4a2SCy Schubert * 1 - publish FTM initiator functionality in 1554780fb4a2SCy Schubert * bit 71 of Extended Capabilities element 1555780fb4a2SCy Schubert * Note, actual FTM initiator operation is managed outside 1556780fb4a2SCy Schubert * wpa_supplicant. 1557780fb4a2SCy Schubert */ 1558780fb4a2SCy Schubert int ftm_initiator; 155985732ac8SCy Schubert 156085732ac8SCy Schubert /** 156185732ac8SCy Schubert * gas_rand_addr_lifetime - Lifetime of random MAC address for ANQP in 156285732ac8SCy Schubert * seconds 156385732ac8SCy Schubert */ 156485732ac8SCy Schubert unsigned int gas_rand_addr_lifetime; 156585732ac8SCy Schubert 156685732ac8SCy Schubert /** 156785732ac8SCy Schubert * gas_rand_mac_addr - GAS MAC address policy 156885732ac8SCy Schubert * 156985732ac8SCy Schubert * 0 = use permanent MAC address 157085732ac8SCy Schubert * 1 = use random MAC address 157185732ac8SCy Schubert * 2 = like 1, but maintain OUI (with local admin bit set) 157285732ac8SCy Schubert */ 157385732ac8SCy Schubert int gas_rand_mac_addr; 157485732ac8SCy Schubert 157585732ac8SCy Schubert /** 157685732ac8SCy Schubert * dpp_config_processing - How to process DPP configuration 157785732ac8SCy Schubert * 157885732ac8SCy Schubert * 0 = report received configuration to an external program for 157985732ac8SCy Schubert * processing; do not generate any network profile internally 158085732ac8SCy Schubert * 1 = report received configuration to an external program and generate 158185732ac8SCy Schubert * a network profile internally, but do not automatically connect 158285732ac8SCy Schubert * to the created (disabled) profile; the network profile id is 158385732ac8SCy Schubert * reported to external programs 158485732ac8SCy Schubert * 2 = report received configuration to an external program, generate 158585732ac8SCy Schubert * a network profile internally, try to connect to the created 158685732ac8SCy Schubert * profile automatically 158785732ac8SCy Schubert */ 158885732ac8SCy Schubert int dpp_config_processing; 158985732ac8SCy Schubert 159085732ac8SCy Schubert /** 1591c1d255d3SCy Schubert * dpp_name - Name for Enrollee's DPP Configuration Request 1592c1d255d3SCy Schubert */ 1593c1d255d3SCy Schubert char *dpp_name; 1594c1d255d3SCy Schubert 1595c1d255d3SCy Schubert /** 1596c1d255d3SCy Schubert * dpp_mud_url - MUD URL for Enrollee's DPP Configuration Request 1597c1d255d3SCy Schubert */ 1598c1d255d3SCy Schubert char *dpp_mud_url; 1599c1d255d3SCy Schubert 1600c1d255d3SCy Schubert /** 160185732ac8SCy Schubert * coloc_intf_reporting - Colocated interference reporting 160285732ac8SCy Schubert * 160385732ac8SCy Schubert * dot11CoLocIntfReportingActivated 160485732ac8SCy Schubert * 0 = disabled (false) 160585732ac8SCy Schubert * 1 = enabled (true) 160685732ac8SCy Schubert */ 160785732ac8SCy Schubert int coloc_intf_reporting; 16084bc52338SCy Schubert 16094bc52338SCy Schubert /** 16104bc52338SCy Schubert * p2p_device_random_mac_addr - P2P Device MAC address policy default 16114bc52338SCy Schubert * 1612c1d255d3SCy Schubert * 0 = use permanent MAC address (the one set by default by the device 1613c1d255d3SCy Schubert * driver). Notice that, if the device driver is configured to 1614c1d255d3SCy Schubert * always use random MAC addresses, this flag breaks reinvoking a 1615c1d255d3SCy Schubert * persistent group, so flags 1 or 2 should be used instead with 1616c1d255d3SCy Schubert * such drivers if persistent groups are used. 16174bc52338SCy Schubert * 1 = use random MAC address on creating the interface if there is no 1618c1d255d3SCy Schubert * persistent group. Besides, if a persistent group is created, 1619c1d255d3SCy Schubert * p2p_device_persistent_mac_addr is set to the MAC address of the 1620c1d255d3SCy Schubert * P2P Device interface, so that this address will be subsequently 1621c1d255d3SCy Schubert * used to change the MAC address of the P2P Device interface. With 1622c1d255d3SCy Schubert * no persistent group, the random MAC address is created by 1623c1d255d3SCy Schubert * wpa_supplicant, changing the one set by the device driver. 1624c1d255d3SCy Schubert * The device driver shall support SIOCGIFFLAGS/SIOCSIFFLAGS ioctl 1625c1d255d3SCy Schubert * interface control operations. 1626c1d255d3SCy Schubert * 2 = this flag should be used when the device driver uses random MAC 1627c1d255d3SCy Schubert * addresses by default when a P2P Device interface is created. 1628c1d255d3SCy Schubert * If p2p_device_persistent_mac_addr is set, use this MAC address 1629c1d255d3SCy Schubert * on creating the P2P Device interface. If not set, use the 1630c1d255d3SCy Schubert * default method adopted by the device driver (e.g., random MAC 1631c1d255d3SCy Schubert * address). Besides, if a persistent group is created, 1632c1d255d3SCy Schubert * p2p_device_persistent_mac_addr is set to the MAC address of the 1633c1d255d3SCy Schubert * P2P Device interface, so that this address will be subsequently 1634c1d255d3SCy Schubert * used in place of the default address set by the device driver. 1635c1d255d3SCy Schubert * (This option does not need support of SIOCGIFFLAGS/SIOCSIFFLAGS 1636c1d255d3SCy Schubert * ioctl interface control operations and uses NL80211_ATTR_MAC). 16374bc52338SCy Schubert * 16384bc52338SCy Schubert * By default, permanent MAC address is used. 16394bc52338SCy Schubert */ 16404bc52338SCy Schubert int p2p_device_random_mac_addr; 16414bc52338SCy Schubert 16424bc52338SCy Schubert /** 16434bc52338SCy Schubert * p2p_device_persistent_mac_addr - Record last used MAC address 16444bc52338SCy Schubert * 16454bc52338SCy Schubert * If there are saved persistent groups, P2P cannot generate another 16464bc52338SCy Schubert * random MAC address, and need to restore to last used MAC address. 16474bc52338SCy Schubert */ 16484bc52338SCy Schubert u8 p2p_device_persistent_mac_addr[ETH_ALEN]; 16494bc52338SCy Schubert 16504bc52338SCy Schubert /** 16514bc52338SCy Schubert * p2p_interface_random_mac_addr - P2P Interface MAC address policy default 16524bc52338SCy Schubert * 16534bc52338SCy Schubert * 0 = use permanent MAC address 16544bc52338SCy Schubert * 1 = use random MAC address on creating the interface. 16554bc52338SCy Schubert * 16564bc52338SCy Schubert * By default, permanent MAC address is used. 16574bc52338SCy Schubert */ 16584bc52338SCy Schubert int p2p_interface_random_mac_addr; 1659206b73d0SCy Schubert 1660206b73d0SCy Schubert /** 1661206b73d0SCy Schubert * disable_btm - Disable BSS transition management in STA 1662206b73d0SCy Schubert * - Set to 0 to enable BSS transition management 1663206b73d0SCy Schubert * - Set to 1 to disable BSS transition management 1664206b73d0SCy Schubert * 1665206b73d0SCy Schubert * By default BSS transition management is enabled 1666206b73d0SCy Schubert */ 1667206b73d0SCy Schubert int disable_btm; 1668c1d255d3SCy Schubert 1669c1d255d3SCy Schubert /** 1670c1d255d3SCy Schubert * extended_key_id - Extended Key ID support 1671c1d255d3SCy Schubert * 1672c1d255d3SCy Schubert * IEEE Std 802.11-2016 optionally allows to use Key ID 0 and 1 for PTK 1673c1d255d3SCy Schubert * keys with Extended Key ID. 1674c1d255d3SCy Schubert * 1675c1d255d3SCy Schubert * 0 = don't use Extended Key ID 1676c1d255d3SCy Schubert * 1 = use Extended Key ID when possible 1677c1d255d3SCy Schubert */ 1678c1d255d3SCy Schubert int extended_key_id; 1679c1d255d3SCy Schubert 1680c1d255d3SCy Schubert /** 1681c1d255d3SCy Schubert * wowlan_disconnect_on_deinit - Trigger disconnect on wpa_supplicant 1682c1d255d3SCy Schubert * interface deinit even if the driver has enabled WoWLAN. 1683c1d255d3SCy Schubert * 1684c1d255d3SCy Schubert * 0 = Do not disconnect 1685c1d255d3SCy Schubert * 1 = Trigger disconnection 1686c1d255d3SCy Schubert */ 1687c1d255d3SCy Schubert int wowlan_disconnect_on_deinit; 1688c1d255d3SCy Schubert 1689c1d255d3SCy Schubert #ifdef CONFIG_PASN 1690c1d255d3SCy Schubert #ifdef CONFIG_TESTING_OPTIONS 1691c1d255d3SCy Schubert /* 1692c1d255d3SCy Schubert * Normally, KDK should be derived if and only if both sides support 1693c1d255d3SCy Schubert * secure LTF. Allow forcing KDK derivation for testing purposes. 1694c1d255d3SCy Schubert */ 1695c1d255d3SCy Schubert int force_kdk_derivation; 1696c1d255d3SCy Schubert 1697c1d255d3SCy Schubert /* If set, corrupt the MIC in the 3rd Authentication frame of PASN */ 1698c1d255d3SCy Schubert int pasn_corrupt_mic; 1699c1d255d3SCy Schubert 1700c1d255d3SCy Schubert #endif /* CONFIG_TESTING_OPTIONS */ 1701c1d255d3SCy Schubert #endif /* CONFIG_PASN*/ 170239beb93cSSam Leffler }; 170339beb93cSSam Leffler 170439beb93cSSam Leffler 170539beb93cSSam Leffler /* Prototypes for common functions from config.c */ 170639beb93cSSam Leffler 170739beb93cSSam Leffler void wpa_config_free(struct wpa_config *ssid); 170839beb93cSSam Leffler void wpa_config_free_ssid(struct wpa_ssid *ssid); 1709f05cddf9SRui Paulo void wpa_config_foreach_network(struct wpa_config *config, 1710f05cddf9SRui Paulo void (*func)(void *, struct wpa_ssid *), 1711f05cddf9SRui Paulo void *arg); 171239beb93cSSam Leffler struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id); 171339beb93cSSam Leffler struct wpa_ssid * wpa_config_add_network(struct wpa_config *config); 171439beb93cSSam Leffler int wpa_config_remove_network(struct wpa_config *config, int id); 171539beb93cSSam Leffler void wpa_config_set_network_defaults(struct wpa_ssid *ssid); 171639beb93cSSam Leffler int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value, 171739beb93cSSam Leffler int line); 1718f05cddf9SRui Paulo int wpa_config_set_quoted(struct wpa_ssid *ssid, const char *var, 1719f05cddf9SRui Paulo const char *value); 17205b9c547cSRui Paulo int wpa_config_dump_values(struct wpa_config *config, char *buf, 17215b9c547cSRui Paulo size_t buflen); 17225b9c547cSRui Paulo int wpa_config_get_value(const char *name, struct wpa_config *config, 17235b9c547cSRui Paulo char *buf, size_t buflen); 17245b9c547cSRui Paulo 1725e28a4053SRui Paulo char ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys); 172639beb93cSSam Leffler char * wpa_config_get(struct wpa_ssid *ssid, const char *var); 172739beb93cSSam Leffler char * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var); 172839beb93cSSam Leffler void wpa_config_update_psk(struct wpa_ssid *ssid); 172939beb93cSSam Leffler int wpa_config_add_prio_network(struct wpa_config *config, 173039beb93cSSam Leffler struct wpa_ssid *ssid); 1731e28a4053SRui Paulo int wpa_config_update_prio_list(struct wpa_config *config); 173239beb93cSSam Leffler const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config, 173339beb93cSSam Leffler const char *name); 173439beb93cSSam Leffler void wpa_config_set_blob(struct wpa_config *config, 173539beb93cSSam Leffler struct wpa_config_blob *blob); 173639beb93cSSam Leffler void wpa_config_free_blob(struct wpa_config_blob *blob); 173739beb93cSSam Leffler int wpa_config_remove_blob(struct wpa_config *config, const char *name); 17385b9c547cSRui Paulo void wpa_config_flush_blobs(struct wpa_config *config); 173939beb93cSSam Leffler 1740f05cddf9SRui Paulo struct wpa_cred * wpa_config_get_cred(struct wpa_config *config, int id); 1741f05cddf9SRui Paulo struct wpa_cred * wpa_config_add_cred(struct wpa_config *config); 1742f05cddf9SRui Paulo int wpa_config_remove_cred(struct wpa_config *config, int id); 1743f05cddf9SRui Paulo void wpa_config_free_cred(struct wpa_cred *cred); 1744f05cddf9SRui Paulo int wpa_config_set_cred(struct wpa_cred *cred, const char *var, 1745f05cddf9SRui Paulo const char *value, int line); 17465b9c547cSRui Paulo char * wpa_config_get_cred_no_key(struct wpa_cred *cred, const char *var); 1747f05cddf9SRui Paulo 174839beb93cSSam Leffler struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface, 174939beb93cSSam Leffler const char *driver_param); 175039beb93cSSam Leffler #ifndef CONFIG_NO_STDOUT_DEBUG 175139beb93cSSam Leffler void wpa_config_debug_dump_networks(struct wpa_config *config); 175239beb93cSSam Leffler #else /* CONFIG_NO_STDOUT_DEBUG */ 175339beb93cSSam Leffler #define wpa_config_debug_dump_networks(c) do { } while (0) 175439beb93cSSam Leffler #endif /* CONFIG_NO_STDOUT_DEBUG */ 175539beb93cSSam Leffler 175639beb93cSSam Leffler 1757f05cddf9SRui Paulo /* Prototypes for common functions from config.c */ 1758f05cddf9SRui Paulo int wpa_config_process_global(struct wpa_config *config, char *pos, int line); 1759f05cddf9SRui Paulo 1760780fb4a2SCy Schubert int wpa_config_get_num_global_field_names(void); 1761780fb4a2SCy Schubert 1762780fb4a2SCy Schubert const char * wpa_config_get_global_field_name(unsigned int i, int *no_var); 1763f05cddf9SRui Paulo 176439beb93cSSam Leffler /* Prototypes for backend specific functions from the selected config_*.c */ 176539beb93cSSam Leffler 176639beb93cSSam Leffler /** 176739beb93cSSam Leffler * wpa_config_read - Read and parse configuration database 176839beb93cSSam Leffler * @name: Name of the configuration (e.g., path and file name for the 176939beb93cSSam Leffler * configuration file) 17705b9c547cSRui Paulo * @cfgp: Pointer to previously allocated configuration data or %NULL if none 177139beb93cSSam Leffler * Returns: Pointer to allocated configuration data or %NULL on failure 177239beb93cSSam Leffler * 177339beb93cSSam Leffler * This function reads configuration data, parses its contents, and allocates 177439beb93cSSam Leffler * data structures needed for storing configuration information. The allocated 177539beb93cSSam Leffler * data can be freed with wpa_config_free(). 177639beb93cSSam Leffler * 177739beb93cSSam Leffler * Each configuration backend needs to implement this function. 177839beb93cSSam Leffler */ 17795b9c547cSRui Paulo struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp); 178039beb93cSSam Leffler 178139beb93cSSam Leffler /** 178239beb93cSSam Leffler * wpa_config_write - Write or update configuration data 178339beb93cSSam Leffler * @name: Name of the configuration (e.g., path and file name for the 178439beb93cSSam Leffler * configuration file) 178539beb93cSSam Leffler * @config: Configuration data from wpa_config_read() 178639beb93cSSam Leffler * Returns: 0 on success, -1 on failure 178739beb93cSSam Leffler * 178839beb93cSSam Leffler * This function write all configuration data into an external database (e.g., 178939beb93cSSam Leffler * a text file) in a format that can be read with wpa_config_read(). This can 179039beb93cSSam Leffler * be used to allow wpa_supplicant to update its configuration, e.g., when a 179139beb93cSSam Leffler * new network is added or a password is changed. 179239beb93cSSam Leffler * 179339beb93cSSam Leffler * Each configuration backend needs to implement this function. 179439beb93cSSam Leffler */ 179539beb93cSSam Leffler int wpa_config_write(const char *name, struct wpa_config *config); 179639beb93cSSam Leffler 179739beb93cSSam Leffler #endif /* CONFIG_H */ 1798