7 uint64_t timestamp, node;
8 uint16_t clock_sequence;
10 int (*get_lock)(void *);
11 int (*release_lock)(void *);
13 int (*read_state)(struct pd_uuid_state *s);
14 int (*save_state)(struct pd_uuid_state *s);
15 /* TODO hook for a random number generator? */
16 unsigned long (*random_bytes)(void *out, unsigned long outlen,
24 typedef struct pd_uuid pd_uuid_t;
26 int pd_uuid_init_state(struct pd_uuid_state *s);
27 int pd_uuid_init(struct pd_uuid_state *s, int f);
28 int pd_uuid_make_v1(struct pd_uuid_state *s, pd_uuid_t *uuid);
29 int pd_uuid_make_v1mc(struct pd_uuid_state *s, pd_uuid_t *uuid);
30 int pd_uuid_make_v4(struct pd_uuid_state *s, pd_uuid_t *uuid);
31 int pd_uuid_make_v3(struct pd_uuid_state *s, pd_uuid_t *uuid, pd_uuid_t *ns, void *data, int len);
32 int pd_uuid_make_v5(struct pd_uuid_state *s, pd_uuid_t *uuid, pd_uuid_t *ns, void *data, int len);
34 int pd_uuid_copy(pd_uuid_t *src, pd_uuid_t *dst);
35 int pd_uuid_cmp(pd_uuid_t *a, pd_uuid_t *b);
37 int pd_set_uuid_hash(pd_uuid_t *s, void *hash, int version);
39 int pd_uuid_set_string(pd_uuid_t *uuid, char *s);
41 unsigned long pd_uuid_rng_get_bytes(unsigned char *out, unsigned long outlen);
43 pd_uuid_t pd_uuid_ns_x500;
44 pd_uuid_t pd_uuid_ns_url;
45 pd_uuid_t pd_uuid_ns_dns;
46 pd_uuid_t pd_uuid_ns_oid;