dmi_baseboard
Synopsis
#include <opendmi/entity/baseboard.h>
typedef struct dmi_baseboard {
const char *vendor;
const char *product;
const char *version;
const char *serial_number;
const char *asset_tag;
dmi_baseboard_features_t features;
const char *location;
dmi_handle_t chassis_handle;
dmi_entity_t *chassis;
dmi_baseboard_type_t type;
size_t object_count;
dmi_handle_t *object_handles;
dmi_entity_t **objects;
} dmi_baseboard_t;
Description
The dmi_baseboard_t structure holds the decoded baseboard or module
information structure (type 2) of SMBIOS: the identity and the properties of a
board of the system, such as the motherboard, a server blade or a module
plugged into the system.
A table has one such structure per board it describes. When there are several of them, each one lists the structures of the elements mounted on the board. When there is only one and it lists no elements, or when there is none, every element of the table belongs to a single motherboard.
The structure is returned by dmi_entity_info for the structures of type
DMI_TYPE(baseboard), and lives as long as the context it has been decoded in.
Fields
vendor-
Name of the manufacturer of the board, or
nullptrif the structure does not name one. product-
Product name of the board, or
nullptr. version-
Version of the board, or
nullptr. serial_number-
Serial number of the board, or
nullptr. asset_tag-
Asset tag of the board, or
nullptrif the structure carries none or is too short to hold it. features-
Feature flags of the board, see
dmi_baseboard_features. All the flags are clear if the structure is too short to hold them. location-
Location of the board within the chassis it resides in, or
nullptr. chassis_handle-
Handle of the chassis structure (type 3) the board resides in.
DMI_HANDLE_INVALIDif the structure is too short to hold it. chassis-
Chassis the board resides in, resolved from
chassis_handleonce the table has been linked.nullptrif the handle isDMI_HANDLE_INVALIDorDMI_HANDLE_UNSUPPORTED, or does not refer to a chassis structure. type-
Type of the board, see
dmi_baseboard_type.DMI_BASEBOARD_TYPE_UNSPECif the structure is too short to hold it. object_count-
Number of the elements of
object_handlesand ofobjects, which is the number of the handles of the contained elements the structure holds in full. Zero if the structure lists no elements, or is too short to hold the list. object_handles-
Handles of the structures describing the elements the board contains, such as other boards, processors, ports, system slots or memory devices, or
nullptrif there are none. objects-
Structures
object_handlesrefer to, in the same order, resolved once the table has been linked. An element isnullptrif its handle does not refer to a structure of the table. The array isnullptrif there are no elements.
Examples
dmi_registry_t *registry = dmi_get_registry(context);
dmi_entity_t *entity = dmi_registry_lookup_first(registry,
DMI_TYPE(baseboard),
false);
dmi_baseboard_t *board = dmi_entity_info(entity, DMI_TYPE(baseboard));
if ((board != nullptr) && (board->product != nullptr))
printf("%s, %zu contained elements\n", board->product,
board->object_count);