EXT PW: Allow Interwork cred block to use external storage for password
[mech_eap.git] / wpa_supplicant / config.h
index 9bdc29e..080c0cd 100644 (file)
@@ -81,6 +81,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
         */
        char *ca_cert;
@@ -148,6 +153,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 +211,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
@@ -244,6 +291,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
         *
         * If this is specified, %wpa_supplicant will open a control interface
@@ -526,9 +582,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
@@ -563,6 +622,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
         */
        unsigned int max_num_sta;
@@ -599,6 +666,63 @@ 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;
 };