david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/include/gpxe/uuid.h
Michael Brown 30cd348689 [SMBIOS] Interpret UUIDs as being in network-endian order
Various specification documents disagree about the byte ordering of
UUIDs.  However, SMBIOS seems to use the standard in which everything is
in network-endian order.

This doesn't affect anything sent on the wire; only what gets printed on
the screen when the "uuid" variable is displayed.
2008-05-20 18:41:36 +01:00

32 lines
576 B
C

#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, big-endian */
uint32_t a;
/** 2 hex digits, big-endian */
uint16_t b;
/** 2 hex digits, big-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 */