]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/config.h
Interworking: Fix failed GAS query processing
[thirdparty/hostap.git] / wpa_supplicant / config.h
index 9bdc29e22b5f113a22ea0fe3012c509ffb0f37f1..b889ab814ed250e028da8cbd620e6f2f29489e08 100644 (file)
@@ -18,6 +18,7 @@
 #define DEFAULT_FAST_REAUTH 1
 #define DEFAULT_P2P_GO_INTENT 7
 #define DEFAULT_P2P_INTRA_BSS 1
+#define DEFAULT_P2P_GO_MAX_INACTIVITY (5 * 60)
 #define DEFAULT_BSS_MAX_COUNT 200
 #define DEFAULT_BSS_EXPIRATION_AGE 180
 #define DEFAULT_BSS_EXPIRATION_SCAN_COUNT 2
@@ -26,6 +27,7 @@
 
 #include "config_ssid.h"
 #include "wps/wps.h"
+#include "common/ieee802_11_common.h"
 
 
 struct wpa_cred {
@@ -80,6 +82,11 @@ struct wpa_cred {
         */
        char *password;
 
+       /**
+        * ext_password - Whether password is a name for external storage
+        */
+       int ext_password;
+
        /**
         * ca_cert - CA certificate for Interworking network selection
         */
@@ -148,6 +155,47 @@ struct wpa_cred {
         * whether the AP is operated by the Home SP.
         */
        char *domain;
+
+       /**
+        * roaming_consortium - Roaming Consortium OI
+        *
+        * If roaming_consortium_len is non-zero, this field contains the
+        * Roaming Consortium OI that can be used to determine which access
+        * points support authentication with this credential. This is an
+        * alternative to the use of the realm parameter. When using Roaming
+        * Consortium to match the network, the EAP parameters need to be
+        * pre-configured with the credential since the NAI Realm information
+        * may not be available or fetched.
+        */
+       u8 roaming_consortium[15];
+
+       /**
+        * roaming_consortium_len - Length of roaming_consortium
+        */
+       size_t roaming_consortium_len;
+
+       /**
+        * eap_method - EAP method to use
+        *
+        * Pre-configured EAP method to use with this credential or %NULL to
+        * indicate no EAP method is selected, i.e., the method will be
+        * selected automatically based on ANQP information.
+        */
+       struct eap_method_type *eap_method;
+
+       /**
+        * phase1 - Phase 1 (outer authentication) parameters
+        *
+        * Pre-configured EAP parameters or %NULL.
+        */
+       char *phase1;
+
+       /**
+        * phase2 - Phase 2 (inner authentication) parameters
+        *
+        * Pre-configured EAP parameters or %NULL.
+        */
+       char *phase2;
 };
 
 
@@ -165,6 +213,7 @@ struct wpa_cred {
 #define CFG_CHANGED_P2P_LISTEN_CHANNEL BIT(11)
 #define CFG_CHANGED_P2P_OPER_CHANNEL BIT(12)
 #define CFG_CHANGED_P2P_PREF_CHAN BIT(13)
+#define CFG_CHANGED_EXT_PW_BACKEND BIT(14)
 
 /**
  * struct wpa_config - wpa_supplicant configuration data
@@ -243,6 +292,15 @@ struct wpa_config {
         */
        int ap_scan;
 
+       /**
+        * disable_scan_offload - Disable automatic offloading of scan requests
+        *
+        * By default, %wpa_supplicant tries to offload scanning if the driver
+        * indicates support for this (sched_scan). This configuration
+        * parameter can be used to disable this offloading mechanism.
+        */
+       int disable_scan_offload;
+
        /**
         * ctrl_interface - Parameters for the control interface
         *
@@ -526,9 +584,12 @@ struct wpa_config {
         * state indefinitely until explicitly removed. As a P2P client, the
         * maximum idle time of P2P_MAX_CLIENT_IDLE seconds is enforced, i.e.,
         * this parameter is mainly meant for GO use and for P2P client, it can
-        * only be used to reduce the default timeout to smaller value.
+        * only be used to reduce the default timeout to smaller value. A
+        * special value -1 can be used to configure immediate removal of the
+        * group for P2P client role on any disconnection after the data
+        * connection has been established.
         */
-       unsigned int p2p_group_idle;
+       int p2p_group_idle;
 
        /**
         * bss_max_count - Maximum number of BSS entries to keep in memory
@@ -562,6 +623,14 @@ struct wpa_config {
         */
        int filter_ssids;
 
+       /**
+        * filter_rssi - RSSI-based scan result filtering
+        *
+        * 0 = do not filter scan results
+        * -n = filter scan results below -n dBm
+        */
+       int filter_rssi;
+
        /**
         * max_num_sta - Maximum number of STAs in an AP/P2P GO
         */
@@ -599,6 +668,85 @@ struct wpa_config {
         * Homogeneous ESS. This is used only if interworking is enabled.
         */
        u8 hessid[ETH_ALEN];
+
+       /**
+        * hs20 - Hotspot 2.0
+        */
+       int hs20;
+
+       /**
+        * pbc_in_m1 - AP mode WPS probing workaround for PBC with Windows 7
+        *
+        * Windows 7 uses incorrect way of figuring out AP's WPS capabilities
+        * by acting as a Registrar and using M1 from the AP. The config
+        * methods attribute in that message is supposed to indicate only the
+        * configuration method supported by the AP in Enrollee role, i.e., to
+        * add an external Registrar. For that case, PBC shall not be used and
+        * as such, the PushButton config method is removed from M1 by default.
+        * If pbc_in_m1=1 is included in the configuration file, the PushButton
+        * config method is left in M1 (if included in config_methods
+        * parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from
+        * a label in the AP).
+        */
+       int pbc_in_m1;
+
+       /**
+        * autoscan - Automatic scan parameters or %NULL if none
+        *
+        * This is an optional set of parameters for automatic scanning
+        * within an interface in following format:
+        * <autoscan module name>:<module parameters>
+        */
+       char *autoscan;
+
+       /**
+        * wps_nfc_dev_pw_id - NFC Device Password ID for password token
+        */
+       int wps_nfc_dev_pw_id;
+
+       /**
+        * wps_nfc_dh_pubkey - NFC DH Public Key for password token
+        */
+       struct wpabuf *wps_nfc_dh_pubkey;
+
+       /**
+        * wps_nfc_dh_pubkey - NFC DH Private Key for password token
+        */
+       struct wpabuf *wps_nfc_dh_privkey;
+
+       /**
+        * wps_nfc_dh_pubkey - NFC Device Password for password token
+        */
+       struct wpabuf *wps_nfc_dev_pw;
+
+       /**
+        * ext_password_backend - External password backend or %NULL if none
+        *
+        * format: <backend name>[:<optional backend parameters>]
+        */
+       char *ext_password_backend;
+
+       /*
+        * p2p_go_max_inactivity - Timeout in seconds to detect STA inactivity
+        *
+        * This timeout value is used in P2P GO mode to clean up
+        * inactive stations.
+        * By default: 300 seconds.
+        */
+       int p2p_go_max_inactivity;
+
+       struct hostapd_wmm_ac_params wmm_ac_params[4];
+
+       /**
+        * auto_interworking - Whether to use network selection automatically
+        *
+        * 0 = do not automatically go through Interworking network selection
+        *     (i.e., require explicit interworking_select command for this)
+        * 1 = perform Interworking network selection if one or more
+        *     credentials have been configured and scan did not find a
+        *     matching network block
+        */
+       int auto_interworking;
 };