disable debug
[AROS.git] / workbench / libs / uuid / include / uuid.h
blob4ea1d538b851251e82ce091f8e5f1955f5ccc59a
1 #ifndef LIBRARIES_UUID_H
2 #define LIBRARIES_UUID_H
4 #include <inttypes.h>
6 typedef uint64_t uuid_time_t;
8 typedef struct
10 uint8_t nodeID[6];
11 } uuid_node_t;
13 typedef struct
15 uint32_t time_low;
16 uint16_t time_mid;
17 uint16_t time_hi_and_version;
18 uint8_t clock_seq_hi_and_reserved;
19 uint8_t clock_seq_low;
20 uint8_t node[6];
21 } uuid_t;
23 #define MAKE_UUID(a, b, c, d, e) \
24 { \
25 (a), (b), (c), \
26 ((d) >> 8) & 0xFF, (d) & 0xFF, \
27 { \
28 (UQUAD)(e) >> 40, \
29 ((UQUAD)(e) >> 32) & 0xFF, \
30 ((e) >> 24) & 0xFF, \
31 ((e) >> 16) & 0xFF, \
32 ((e) >> 8) & 0xFF, \
33 (e) & 0xFF \
34 } \
37 typedef enum
39 UUID_NAMESPACE_DNS = 1,
40 UUID_NAMESPACE_URL,
41 UUID_NAMESPACE_OID,
42 UUID_NAMESPACE_X500
43 } uuid_namespace_t;
45 typedef enum
47 UUID_TYPE_DCE_TIME = 1,
48 UUID_TYPE_DCE_RANDOM = 4
49 } uuid_type_t;
51 typedef enum
53 UUID_VARIANT_NCS = 0,
54 UUID_VARIANT_DCE = 1,
55 UUID_VARIANT_MICROSOFT = 2,
56 UUID_VARIANT_OTHER = 3
57 } uuid_variant_t;
59 #define UUID_STRLEN 36
61 #endif /*LIBRARIES_UUID_H*/