pub struct WinSMBiosData {
pub smbios_data: SMBiosData,
/* private fields */
}
Expand description
§Raw SMBIOS Data
When Windows kernel32 GetSystemFirmwareTable function is called for RSMB, the raw SMBIOS table provider (‘RSMB’) it retrieves the contents of this raw SMBIOS firmware table structure.
Fields§
§smbios_data: SMBiosData
SMBios table data
Implementations§
Source§impl WinSMBiosData
impl WinSMBiosData
Sourcepub const USED20_CALLING_METHOD_OFFSET: usize = 0usize
pub const USED20_CALLING_METHOD_OFFSET: usize = 0usize
Offset of the Used20CallingMethod field (0)
Sourcepub const SMBIOS_MAJOR_VERSION_OFFSET: usize = 1usize
pub const SMBIOS_MAJOR_VERSION_OFFSET: usize = 1usize
Offset of the SMBIOSMajorVersion field (1)
Sourcepub const SMBIOS_MINOR_VERSION_OFFSET: usize = 2usize
pub const SMBIOS_MINOR_VERSION_OFFSET: usize = 2usize
Offset of the SMBIOSMinorVersion field (2)
Sourcepub const DMI_REVISION_OFFSET: usize = 3usize
pub const DMI_REVISION_OFFSET: usize = 3usize
Offset of the DMIRevision field (3)
Sourcepub const TABLE_DATA_LENGTH_OFFSET: usize = 4usize
pub const TABLE_DATA_LENGTH_OFFSET: usize = 4usize
Offset of the Length field (4)
Sourcepub const SMBIOS_TABLE_DATA_OFFSET: usize = 8usize
pub const SMBIOS_TABLE_DATA_OFFSET: usize = 8usize
Offset of the SMBIOSTableData field (8)
Sourcepub fn new(raw_smbios_data: Vec<u8>) -> Result<WinSMBiosData, Error>
pub fn new(raw_smbios_data: Vec<u8>) -> Result<WinSMBiosData, Error>
Creates an instance of WinSMBiosData
To retrieve this structure on a windows system call load_windows_smbios_data().
The new() is provided publicly to allow loading data from other sources such as a file or from memory array as is done with testing.
Sourcepub fn is_valid_win_smbios_data(raw_data: &Vec<u8>) -> bool
pub fn is_valid_win_smbios_data(raw_data: &Vec<u8>) -> bool
Verify if a block of data is a valid WinSMBiosData structure
This only checks if the structure itself is valid and not whether the contained SMBiosData structure is valid or not.
Sourcepub fn raw_smbios_data(&self) -> &[u8] ⓘ
pub fn raw_smbios_data(&self) -> &[u8] ⓘ
The raw SMBIOS data this structure is wrapping
Sourcepub fn used20_calling_method(&self) -> u8
pub fn used20_calling_method(&self) -> u8
Used20CallingMethod
Sourcepub fn smbios_major_version(&self) -> u8
pub fn smbios_major_version(&self) -> u8
SMBIOS major version
Sourcepub fn smbios_minor_version(&self) -> u8
pub fn smbios_minor_version(&self) -> u8
SMBIOS minor version
Sourcepub fn dmi_revision(&self) -> u8
pub fn dmi_revision(&self) -> u8
DMI revision
Sourcepub fn table_data_length(&self) -> u32
pub fn table_data_length(&self) -> u32
Length of the smbios table data