Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / libs / uuid / include / uuid.h
blob6460a70ac45afc8d67f5415e0da6609d43311b59
1 #ifndef LIBRARIES_UUID_H
2 #define LIBRARIES_UUID_H
4 #include <inttypes.h>
6 typedef uint64_t uuid_time_t;
8 typedef struct {
9 uint8_t nodeID[6];
10 } uuid_node_t;
12 typedef struct {
13 uint32_t time_low;
14 uint16_t time_mid;
15 uint16_t time_hi_and_version;
16 uint8_t clock_seq_hi_and_reserved;
17 uint8_t clock_seq_low;
18 uint8_t node[6];
19 } uuid_t;
21 typedef enum {
22 UUID_NAMESPACE_DNS = 1,
23 UUID_NAMESPACE_URL,
24 UUID_NAMESPACE_OID,
25 UUID_NAMESPACE_X500
26 } uuid_namespace_t;
28 typedef enum {
29 UUID_TYPE_DCE_TIME = 1,
30 UUID_TYPE_DCE_RANDOM = 4
31 } uuid_type_t;
33 typedef enum {
34 UUID_VARIANT_NCS = 0,
35 UUID_VARIANT_DCE = 1,
36 UUID_VARIANT_MICROSOFT = 2,
37 UUID_VARIANT_OTHER = 3
38 } uuid_variant_t;
40 #define UUID_STRLEN 36
42 #endif /*LIBRARIES_UUID_H*/