dmi_entity_type

Synopsis

#include <opendmi/entity.h>

const dmi_type_t *dmi_entity_type(const dmi_entity_t *entity);

Description

The dmi_entity_type function returns the structure type of the given entity, see dmi_type: the type of the specification the entity is decoded by, or would be decoded by if it has not been decoded yet. The type tells the C type dmi_entity_info returns, and is compared to the constants the library and the extension modules declare, e.g. DMI_TYPE(system).

The type number the entity is found at is given by dmi_entity_type_id, which may differ from the number of its type, e.g. for the structures a vendor places at type numbers of its own.

Parameters

entity

Entity descriptor.

Return value

Returns the structure type of the entity. Returns nullptr if entity is nullptr, or if no specification of the enabled modules describes the structures found at its type number.

Errors

None.

Examples

if (dmi_entity_type(entity) == DMI_TYPE(intel_vpro))
    printf("Intel vPro information at handle 0x%04X\n", dmi_entity_handle(entity));