-
Notifications
You must be signed in to change notification settings - Fork 17
/
bios.hpp
50 lines (43 loc) · 857 Bytes
/
bios.hpp
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
40
41
42
43
44
45
46
47
48
49
50
#pragma once
#include <string>
#include <vector>
#include <xstd/result.hpp>
#include <xstd/hashable.hpp>
namespace hwid
{
struct bios_device
{
std::string model = {};
std::string serial = {};
};
struct option_rom
{
uint32_t address;
xstd::fnv64 hash;
};
struct dci_table
{
uint32_t address;
std::string anchor;
};
struct bios_identifiers
{
// Detections.
//
std::string is_vm = {};
bool is_tampered = false;
// Identifiers.
//
std::string sys_guid = {};
std::string sys_serial = {};
bios_device baseboard = {};
std::vector<bios_device> memory_devices = {};
std::string cmos_serial = {};
// Asset tags.
//
std::vector<std::string> asset_tags = {};
};
// Gets the DCI/BIOS identifiers.
//
xstd::result<bios_identifiers> get_bios_identifiers();
};