aboutsummaryrefslogtreecommitdiff
path: root/includes/dmi_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/dmi_util.h')
-rw-r--r--includes/dmi_util.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/includes/dmi_util.h b/includes/dmi_util.h
index aecda739..7ef33681 100644
--- a/includes/dmi_util.h
+++ b/includes/dmi_util.h
@@ -28,4 +28,22 @@ char *dmi_get_str(const char *id_str);
* "Desktop". */
char *dmi_chassis_type_str(int chassis_type, gboolean with_val);
+typedef struct {
+ unsigned long count;
+ unsigned long *handles;
+} dmi_handle_list;
+
+/* get a list of handles that match a dmi_type */
+dmi_handle_list *dmidecode_handles(const unsigned long *dmi_type);
+void dmi_handle_list_free(dmi_handle_list *hl);
+
+/* get a list of handles which have a name, and/or optional value, and/or limit to an optional dmi_type
+ * dmidecode_match_value("Name", NULL, NULL) : all dmi handles with an item called "Name"
+ * dmidecode_match_value("Name", "Value", NULL) : all dmi_handles with an item called "Name" that has a value of "Value"
+ * dmidecode_match_value("Name", "Value", &dt) : all dmi_handles with "Name: Value" that are of type stored in dt */
+dmi_handle_list *dmidecode_match_value(const char *name, const char *value, const unsigned long *dmi_type);
+
+/* get the first value for name, limiting to optional dmi_type and/or optional handle */
+char *dmidecode_match(const char *name, const unsigned long *dmi_type, const unsigned long *handle);
+
#endif