Use dedicated variables to control shutdown of parallel threads like keypress and...
[hashcat.git] / include / types.h
index ba53862..a1b0144 100644 (file)
@@ -283,6 +283,12 @@ typedef struct
 
 } zip2_t;
 
+typedef struct
+{
+  uint salt_buf[32];
+
+} win8phone_t;
+
 typedef struct
 {
   uint P[256];
@@ -643,8 +649,7 @@ typedef struct
 
 typedef struct
 {
-  u32 KEK[5];
-
+  u32 KEK[4];
   u32 lsb[4];
   u32 cipher[4];
 
@@ -931,7 +936,6 @@ struct __hc_device_param
   uint    kernel_exec_timeout;
 
   uint    device_processors;
-  uint    device_processor_cores;
   u64     device_maxmem_alloc;
   u64     device_global_mem;
   u32     device_maxclock_frequency;
@@ -947,6 +951,7 @@ struct __hc_device_param
   uint    kernel_accel_min;
   uint    kernel_accel_max;
   uint    kernel_power;
+  uint    hardware_power;
 
   size_t  size_pws;
   size_t  size_tmps;
@@ -983,6 +988,12 @@ struct __hc_device_param
   uint    exec_pos;
   double  exec_ms[EXEC_CACHE];
 
+  // workaround cpu spinning
+
+  double  exec_us_prev1[EXPECTED_ITERATIONS];
+  double  exec_us_prev2[EXPECTED_ITERATIONS];
+  double  exec_us_prev3[EXPECTED_ITERATIONS];
+
   // this is "current" speed
 
   uint    speed_pos;
@@ -1001,6 +1012,8 @@ struct __hc_device_param
 
   bool    opencl_v12;
 
+  double  nvidia_spin_damp;
+
   cl_uint device_vendor_id;
   cl_uint platform_vendor_id;
 
@@ -1085,24 +1098,15 @@ typedef struct __hc_device_param hc_device_param_t;
 #ifdef HAVE_HWMON
 typedef struct
 {
-  union
-  {
-    HM_ADAPTER_ADL   adl;
-    HM_ADAPTER_NVML  nvml;
-    HM_ADAPTER_NVAPI nvapi;
-
-  } adapter_index;
+  HM_ADAPTER_ADL     adl;
+  HM_ADAPTER_NVML    nvml;
+  HM_ADAPTER_NVAPI   nvapi;
+  HM_ADAPTER_XNVCTRL xnvctrl;
 
-  int   od_version;
+  int od_version;
 
-  int   fan_get_supported;
-  int   fan_set_supported;
-
-  int   gpu_temp_threshold_slowdown;
-  int   gpu_temp_threshold_shutdown;
-
-  // int     busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
-  // int     devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
+  int fan_get_supported;
+  int fan_set_supported;
 
 } hm_attrs_t;
 #endif // HAVE_HWMON
@@ -1119,12 +1123,16 @@ typedef struct
 
   hc_device_param_t *devices_param;
 
+  uint    shutdown_inner;
+  uint    shutdown_outer;
+
   /**
    * workload specific
    */
 
+  uint    hardware_power_all;
   uint    kernel_power_all;
-  float   kernel_power_div;
+  u64     kernel_power_final; // we save that so that all divisions are done from the same base
 
   /**
    * attack specific
@@ -1169,9 +1177,10 @@ typedef struct
    */
 
   #ifdef HAVE_HWMON
-  void   *hm_adl;
-  void   *hm_nvml;
-  void   *hm_nvapi;
+  void      *hm_adl;
+  void      *hm_nvml;
+  void      *hm_nvapi;
+  void      *hm_xnvctrl;
   hm_attrs_t hm_device[DEVICES_MAX];
   #endif
 
@@ -1249,7 +1258,6 @@ typedef struct
   uint    quiet;
   uint    force;
   uint    benchmark;
-  uint    benchmark_repeats;
   uint    runtime;
   uint    remove;
   uint    remove_timer;
@@ -1345,3 +1353,4 @@ typedef struct
 extern hc_global_data_t data;
 
 #endif
+