fu-smbios: fwupd Reference Manual

## fu-smbios fu-smbios |

## Functions

FuSmbios * | fu_smbios_new ()
gchar * | fu_smbios_to_string ()
const gchar * | fu_smbios_get_string ()
guint | fu_smbios_get_integer ()
GBytes * | fu_smbios_get_data ()

## Types and Values

#define | FU_TYPE_SMBIOS
#define | FU_SMBIOS_STRUCTURE_TYPE_BIOS
#define | FU_SMBIOS_STRUCTURE_TYPE_SYSTEM
#define | FU_SMBIOS_STRUCTURE_TYPE_BASEBOARD
#define | FU_SMBIOS_STRUCTURE_TYPE_CHASSIS
#define | FU_SMBIOS_STRUCTURE_TYPE_LAST
enum | FuSmbiosChassisKind
| FuSmbios

## Description

## Functions

### fu_smbios_new ()

    FuSmbios *
    fu_smbios_new (void);

Creates a new object to parse SMBIOS data.

#### Returns

a FuSmbios

Since: 1.0.0

### fu_smbios_to_string ()

    gchar *
    fu_smbios_to_string (FuSmbios *self);

Dumps the parsed SMBIOS data to a string.

#### Parameters

self | a FuSmbios |

#### Returns

a UTF-8 string

Since: 1.0.0

### fu_smbios_get_string ()

    const gchar *
    fu_smbios_get_string (FuSmbios *self,
                          guint8 type,
                          guint8 offset,
                          GError **error);

Reads a string from the SMBIOS string table of a specific structure.

The `type` and `offset` can be referenced from the DMTF SMBIOS specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.1.1.pdf

#### Parameters

self | a FuSmbios |
type | a structure type, e.g. `FU_SMBIOS_STRUCTURE_TYPE_BIOS` |
offset | a structure offset |
error | optional return location for an error. | [nullable]

#### Returns

a string, or `NULL` if invalid or not found

Since: 1.0.0

### fu_smbios_get_integer ()

    guint
    fu_smbios_get_integer (FuSmbios *self,
                           guint8 type,
                           guint8 offset,
                           GError **error);

Reads an integer value from the SMBIOS string table of a specific structure.

The `type` and `offset` can be referenced from the DMTF SMBIOS specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.1.1.pdf

#### Parameters

self | a FuSmbios |
type | a structure type, e.g. `FU_SMBIOS_STRUCTURE_TYPE_BIOS` |
offset | a structure offset |
error | optional return location for an error. | [nullable]

#### Returns

an integer, or `G_MAXUINT` if invalid or not found

Since: 1.5.0

### fu_smbios_get_data ()

    GBytes *
    fu_smbios_get_data (FuSmbios *self,
                        guint8 type,
                        GError **error);

Reads a SMBIOS data blob, which includes the SMBIOS section header.

#### Parameters

self | a FuSmbios |
type | a structure type, e.g. `FU_SMBIOS_STRUCTURE_TYPE_BIOS` |
error | optional return location for an error. | [nullable]

#### Returns

a GBytes, or `NULL` if invalid or not found.

[transfer full]

Since: 1.0.0

## Types and Values

### FU_TYPE_SMBIOS

    #define FU_TYPE_SMBIOS (fu_smbios_get_type ())

### FU_SMBIOS_STRUCTURE_TYPE_BIOS

    #define FU_SMBIOS_STRUCTURE_TYPE_BIOS		0x00

The SMBIOS structure type for the BIOS.

Since: 1.5.5

### FU_SMBIOS_STRUCTURE_TYPE_SYSTEM

    #define FU_SMBIOS_STRUCTURE_TYPE_SYSTEM		0x01

The SMBIOS structure type for the system as a whole.

Since: 1.5.5

### FU_SMBIOS_STRUCTURE_TYPE_BASEBOARD

    #define FU_SMBIOS_STRUCTURE_TYPE_BASEBOARD 0x02

The SMBIOS structure type for the baseboard (motherboard).

Since: 1.5.5

### FU_SMBIOS_STRUCTURE_TYPE_CHASSIS

    #define FU_SMBIOS_STRUCTURE_TYPE_CHASSIS 0x03

The SMBIOS structure type for the chassis.

Since: 1.5.5

### FU_SMBIOS_STRUCTURE_TYPE_LAST

    #define FU_SMBIOS_STRUCTURE_TYPE_LAST		0x04

The last possible SMBIOS structure type.

Since: 1.5.5

### enum FuSmbiosChassisKind

The system chassis kind.

#### Members

FU_SMBIOS_CHASSIS_KIND_OTHER |  |
FU_SMBIOS_CHASSIS_KIND_UNKNOWN |  |
FU_SMBIOS_CHASSIS_KIND_DESKTOP |  |
FU_SMBIOS_CHASSIS_KIND_LOW_PROFILE_DESKTOP |  |
FU_SMBIOS_CHASSIS_KIND_PIZZA_BOX |  |
FU_SMBIOS_CHASSIS_KIND_MINI_TOWER |  |
FU_SMBIOS_CHASSIS_KIND_TOWER |  |
FU_SMBIOS_CHASSIS_KIND_PORTABLE |  |
FU_SMBIOS_CHASSIS_KIND_LAPTOP |  |
FU_SMBIOS_CHASSIS_KIND_NOTEBOOK |  |
FU_SMBIOS_CHASSIS_KIND_HAND_HELD |  |
FU_SMBIOS_CHASSIS_KIND_DOCKING_STATION |  |
FU_SMBIOS_CHASSIS_KIND_ALL_IN_ONE |  |
FU_SMBIOS_CHASSIS_KIND_SUB_NOTEBOOK |  |
FU_SMBIOS_CHASSIS_KIND_SPACE_SAVING |  |
FU_SMBIOS_CHASSIS_KIND_LUNCH_BOX |  |
FU_SMBIOS_CHASSIS_KIND_MAIN_SERVER |  |
FU_SMBIOS_CHASSIS_KIND_EXPANSION |  |
FU_SMBIOS_CHASSIS_KIND_SUBCHASSIS |  |
FU_SMBIOS_CHASSIS_KIND_BUS_EXPANSION |  |
FU_SMBIOS_CHASSIS_KIND_PERIPHERAL |  |
FU_SMBIOS_CHASSIS_KIND_RAID |  |
FU_SMBIOS_CHASSIS_KIND_RACK_MOUNT |  |
FU_SMBIOS_CHASSIS_KIND_SEALED_CASE_PC |  |
FU_SMBIOS_CHASSIS_KIND_MULTI_SYSTEM |  |
FU_SMBIOS_CHASSIS_KIND_COMPACT_PCI |  |
FU_SMBIOS_CHASSIS_KIND_ADVANCED_TCA |  |
FU_SMBIOS_CHASSIS_KIND_BLADE |  |
FU_SMBIOS_CHASSIS_KIND_TABLET |  |
FU_SMBIOS_CHASSIS_KIND_CONVERTIBLE |  |
FU_SMBIOS_CHASSIS_KIND_DETACHABLE |  |
FU_SMBIOS_CHASSIS_KIND_IOT_GATEWAY |  |
FU_SMBIOS_CHASSIS_KIND_EMBEDDED_PC |  |
FU_SMBIOS_CHASSIS_KIND_MINI_PC |  |
FU_SMBIOS_CHASSIS_KIND_STICK_PC |  |

### FuSmbios

    typedef struct _FuSmbios FuSmbios;

Enumerate the SMBIOS data on the system, either using DMI or Device Tree.

See also: [class`FuHwids` ]