dmi_additional_info

Synopsis

#include <opendmi/entity/additional-info.h>

typedef struct dmi_additional_info {
    size_t                       entry_count;
    dmi_additional_info_entry_t *entries;
} dmi_additional_info_t;

Description

The dmi_additional_info_t structure holds the decoded additional information structure (type 40) of SMBIOS. It carries values for fields of other structures which the specification could not express yet: enumerated values which have not been published, or updated contents of a field. Each entry names a structure by its handle and a field by its offset, and gives the value of the field, along with an optional string describing it.

The library applies the entries to the structures they refer to: before one of these structures is decoded, the bytes of the values replace the bytes of the fields they refer to, later entries overriding earlier ones, so that its decoded information already reflects them. An entry which refers to a structure the table does not have, or which reaches past the end of the structure, is reported as an error and left out; in strict mode, it makes the table fail to decode.

The structure is returned by dmi_entity_info for the structures of type DMI_TYPE(additional_info), and lives as long as the context it has been decoded in.

Fields

entry_count

Number of elements of entries, as the structure declares it.

entries

Array of the additional information entries, see dmi_additional_info_entry.

Examples

dmi_registry_t        *registry = dmi_get_registry(context);
dmi_entity_t          *entity   = dmi_registry_lookup_first(registry,
                                      DMI_TYPE(additional_info), false);
dmi_additional_info_t *info     = dmi_entity_info(entity,
                                      DMI_TYPE(additional_info));

if (info != nullptr) {
    for (size_t i = 0; i < info->entry_count; i++) {
        const dmi_additional_info_entry_t *entry = &info->entries[i];

        printf("Structure 0x%04x, offset 0x%02x: %zu bytes (%s)\n",
               (unsigned)entry->ref_handle, entry->ref_offset,
               entry->value.length,
               entry->string != nullptr ? entry->string : "no string");
    }
}

Standards

DMTF SMBIOS Specification (DSP0134), version 2.6 or newer.