Added definition of a UUID and uuid_ntoa() (for debugging), and

implemented smbios_get_uuid().
This commit is contained in:
Michael Brown
2007-11-21 02:27:07 +00:00
parent 68c438954d
commit 899f5b8ab2
4 changed files with 89 additions and 19 deletions

31
src/include/gpxe/uuid.h Normal file
View File

@@ -0,0 +1,31 @@
#ifndef _GPXE_UUID_H
#define _GPXE_UUID_H
/** @file
*
* Universally unique IDs
*/
#include <stdint.h>
/** A universally unique ID */
union uuid {
/** Canonical form (00000000-0000-0000-0000-000000000000) */
struct {
/** 8 hex digits, little-endian */
uint32_t a;
/** 2 hex digits, little-endian */
uint16_t b;
/** 2 hex digits, little-endian */
uint16_t c;
/** 2 hex digits, big-endian */
uint16_t d;
/** 12 hex digits, big-endian */
uint8_t e[6];
} canonical;
uint8_t raw[16];
};
extern char * uuid_ntoa ( union uuid *uuid );
#endif /* _GPXE_UUID_H */