File: ext_sysfs_intelgpu.h

package info (click to toggle)
hashcat 7.1.2%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 75,920 kB
  • sloc: lisp: 627,107; ansic: 431,312; perl: 30,157; cpp: 11,400; sh: 5,250; python: 2,504; makefile: 1,188
file content (39 lines) | stat: -rw-r--r-- 1,598 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
 * Author......: See docs/credits.txt
 * License.....: MIT
 */

#ifndef HC_EXT_SYSFS_INTELGPU_H
#define HC_EXT_SYSFS_INTELGPU_H

#include <stdbool.h>

static const char SYS_BUS_PCI_DEVICES_INTEL[] = "/sys/bus/pci/devices";

typedef int HM_ADAPTER_SYSFS_INTELGPU;

typedef void *SYSFS_INTELGPU_LIB;

typedef struct hm_sysfs_intelgpu_lib
{
  // currently not using libudev, because it can only read values, not set them, so using /sys instead

  SYSFS_INTELGPU_LIB lib;

} hm_sysfs_intelgpu_lib_t;

typedef hm_sysfs_intelgpu_lib_t SYSFS_INTELGPU_PTR;

bool sysfs_intelgpu_init (void *hashcat_ctx);
void sysfs_intelgpu_close (void *hashcat_ctx);
char *hm_SYSFS_INTELGPU_get_syspath_device (void *hashcat_ctx, const int backend_device_idx);
char *hm_SYSFS_INTELGPU_get_syspath_hwmon (void *hashcat_ctx, const int backend_device_idx);
int hm_SYSFS_INTELGPU_get_fan_speed_current (void *hashcat_ctx, const int backend_device_idx, int *val);
int hm_SYSFS_INTELGPU_get_temperature_current (void *hashcat_ctx, const int backend_device_idx, int *val);
//int hm_SYSFS_INTELGPU_get_pp_dpm_sclk (void *hashcat_ctx, const int backend_device_idx, int *val);
//int hm_SYSFS_INTELGPU_get_pp_dpm_mclk (void *hashcat_ctx, const int backend_device_idx, int *val);
//int hm_SYSFS_INTELGPU_get_pp_dpm_pcie (void *hashcat_ctx, const int backend_device_idx, int *val);
//int hm_SYSFS_INTELGPU_get_gpu_busy_percent (void *hashcat_ctx, const int backend_device_idx, int *val);
//int hm_SYSFS_INTELGPU_get_mem_info_vram_used (void *hashcat_ctx, const int backend_device_idx, u64 *val);

#endif // HC_EXT_SYSFS_INTELGPU_H