You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smbios.h 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _SMBIOS_H
  2. #define _SMBIOS_H
  3. /** @file
  4. *
  5. * System Management BIOS
  6. */
  7. #include <stdint.h>
  8. /** An SMBIOS structure header */
  9. struct smbios_header {
  10. /** Type */
  11. uint8_t type;
  12. /** Length */
  13. uint8_t length;
  14. /** Handle */
  15. uint16_t handle;
  16. } __attribute__ (( packed ));
  17. /** SMBIOS system information structure */
  18. struct smbios_system_information {
  19. /** SMBIOS structure header */
  20. struct smbios_header header;
  21. /** Manufacturer string */
  22. uint8_t manufacturer;
  23. /** Product string */
  24. uint8_t product;
  25. /** Version string */
  26. uint8_t version;
  27. /** Serial number string */
  28. uint8_t serial;
  29. /** UUID */
  30. uint8_t uuid[16];
  31. /** Wake-up type */
  32. uint8_t wakeup;
  33. } __attribute__ (( packed ));
  34. /** SMBIOS system information structure type */
  35. #define SMBIOS_TYPE_SYSTEM_INFORMATION 1
  36. struct smbios_strings;
  37. extern int find_smbios_structure ( unsigned int type,
  38. void *structure, size_t length,
  39. struct smbios_strings *strings );
  40. extern int find_smbios_string ( struct smbios_strings *strings,
  41. unsigned int index,
  42. char *buffer, size_t length );
  43. extern int smbios_get_uuid ( union uuid *uuid );
  44. #endif /* _SMBIOS_H */