diff options
Diffstat (limited to 'src/hardware/dmidecode.h')
-rw-r--r-- | src/hardware/dmidecode.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/hardware/dmidecode.h b/src/hardware/dmidecode.h index d3f8bd4..5423c93 100644 --- a/src/hardware/dmidecode.h +++ b/src/hardware/dmidecode.h @@ -118,6 +118,13 @@ typedef struct _DmiBaseboard { char *version; /* Version */ } DmiBaseboard; +/* Baseboard Port from dmidecode. */ +typedef struct _DmiPort { + char *name; /* Name */ + char *type; /* Type */ + char *port_type; /* Port Type */ +} DmiPort; + /* * Get array of processors according to the dmidecode program. * @param cpu array of cpus, this function will allocate necessary memory, @@ -192,5 +199,21 @@ short dmi_get_baseboard(DmiBaseboard *baseboard); */ void dmi_free_baseboard(DmiBaseboard *baseboard); +/* + * Get array of baseboard ports according to the dmidecode program. + * @param ports array of ports, this function will allocate necessary memory, + * but caller is responsible for freeing it + * @param ports_nb number of ports + * @return 0 if success, negative value otherwise + */ +short dmi_get_ports(DmiPort **ports, unsigned *ports_nb); + +/* + * Free array of port structures. + * @param ports array of ports + * @param ports_nb number of ports + */ +void dmi_free_ports(DmiPort **ports, unsigned *ports_nb); + #endif /* DMIDECODE_H_ */ |