Add support for using random local MAC address
[mech_eap.git] / wpa_supplicant / config.h
index 3c2fc4a..75257c5 100644 (file)
@@ -27,6 +27,7 @@
 #define DEFAULT_ACCESS_NETWORK_TYPE 15
 #define DEFAULT_SCAN_CUR_FREQ 0
 #define DEFAULT_P2P_SEARCH_DELAY 500
+#define DEFAULT_RAND_ADDR_LIFETIME 60
 
 #include "config_ssid.h"
 #include "wps/wps.h"
@@ -317,6 +318,7 @@ struct wpa_cred {
 #define CFG_CHANGED_P2P_PREF_CHAN BIT(13)
 #define CFG_CHANGED_EXT_PW_BACKEND BIT(14)
 #define CFG_CHANGED_NFC_PASSWORD_TOKEN BIT(15)
+#define CFG_CHANGED_P2P_PASSPHRASE_LEN BIT(16)
 
 /**
  * struct wpa_config - wpa_supplicant configuration data
@@ -716,6 +718,14 @@ struct wpa_config {
        int p2p_group_idle;
 
        /**
+        * p2p_passphrase_len - Passphrase length (8..63) for P2P GO
+        *
+        * This parameter controls the length of the random passphrase that is
+        * generated at the GO.
+        */
+       unsigned int p2p_passphrase_len;
+
+       /**
         * bss_max_count - Maximum number of BSS entries to keep in memory
         */
        unsigned int bss_max_count;
@@ -1042,6 +1052,31 @@ struct wpa_config {
         * resources.
         */
        unsigned int p2p_search_delay;
+
+       /**
+        * mac_addr - MAC address policy default
+        *
+        * 0 = use permanent MAC address
+        * 1 = use random MAC address for each ESS connection
+        *
+        * By default, permanent MAC address is used unless policy is changed by
+        * the per-network mac_addr parameter. Global mac_addr=1 can be used to
+        * change this default behavior.
+        */
+       int mac_addr;
+
+       /**
+        * rand_addr_lifetime - Lifetime of random MAC address in seconds
+        */
+       unsigned int rand_addr_lifetime;
+
+       /**
+        * preassoc_mac_addr - Pre-association MAC address policy
+        *
+        * 0 = use permanent MAC address
+        * 1 = use random MAC address
+        */
+       int preassoc_mac_addr;
 };