summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2007-11-21 03:27:07 +0100
committerMichael Brown2007-11-21 03:27:07 +0100
commit899f5b8ab233987646e6f5012f462a19a833d8d4 (patch)
treecee5ca8745e7e84f9f2612c3eeb732d31e5c5f24 /src/include
parentUpdate SMBIOS internal API to be easier to use, and not to require (diff)
downloadipxe-899f5b8ab233987646e6f5012f462a19a833d8d4.tar.gz
ipxe-899f5b8ab233987646e6f5012f462a19a833d8d4.tar.xz
ipxe-899f5b8ab233987646e6f5012f462a19a833d8d4.zip
Added definition of a UUID and uuid_ntoa() (for debugging), and
implemented smbios_get_uuid().
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/uuid.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/gpxe/uuid.h b/src/include/gpxe/uuid.h
new file mode 100644
index 00000000..4f89be50
--- /dev/null
+++ b/src/include/gpxe/uuid.h
@@ -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 */