2 * Copyright (c) 2012 Your File System Inc. All rights reserved.
5 #ifndef OPENAFS_OPR_UUID_H
6 #define OPENAFS_OPR_UUID_H 1
9 unsigned char data
[16];
12 struct opr_uuid_unpacked
{
14 unsigned short time_mid
;
15 unsigned short time_hi_and_version
;
16 char clock_seq_hi_and_reserved
;
21 typedef struct opr_uuid opr_uuid_t
;
22 typedef opr_uuid_t opr_uuid
; /* For XDR */
24 extern void opr_uuid_create(opr_uuid_t
*uuid
);
25 extern int opr_uuid_isNil(const opr_uuid_t
*uuid
);
26 extern int opr_uuid_equal(const opr_uuid_t
*uuid1
, const opr_uuid_t
*uuid2
);
27 extern unsigned int opr_uuid_hash(const opr_uuid_t
*uuid
);
30 extern int opr_uuid_toString(const opr_uuid_t
*uuid
, char **string
);
31 extern void opr_uuid_freeString(char *string
);
32 extern int opr_uuid_fromString(opr_uuid_t
*uuid
, const char *string
);
35 extern void opr_uuid_pack(opr_uuid_t
*uuid
, const struct opr_uuid_unpacked
*raw
);
36 extern void opr_uuid_unpack(const opr_uuid_t
*uuid
, struct opr_uuid_unpacked
*raw
);