xref: /titanic_41/usr/src/head/uuid/uuid.h (revision 721df37ded2cce623b0249cc35a872c3ce291b9b)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*
28  * Copyright 2014 Andrew Stormont.
29  */
30 
31 #ifndef	_UUID_H
32 #define	_UUID_H
33 
34 #ifdef	__cplusplus
35 extern "C" {
36 #endif
37 
38 /*
39  * The copyright in this file is taken from the original Leach & Salz
40  * UUID specification, from which this implementation is derived.
41  */
42 
43 /*
44  * Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
45  * Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
46  * Digital Equipment Corporation, Maynard, Mass.  Copyright (c) 1998
47  * Microsoft.  To anyone who acknowledges that this file is provided
48  * "AS IS" without any express or implied warranty: permission to use,
49  * copy, modify, and distribute this file for any purpose is hereby
50  * granted without fee, provided that the above copyright notices and
51  * this notice appears in all source code copies, and that none of the
52  * names of Open Software Foundation, Inc., Hewlett-Packard Company,
53  * or Digital Equipment Corporation be used in advertising or
54  * publicity pertaining to distribution of the software without
55  * specific, written prior permission.  Neither Open Software
56  * Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
57  * Equipment Corporation makes any representations about the
58  * suitability of this software for any purpose.
59  */
60 
61 #include <sys/types.h>
62 #include <sys/uuid.h>
63 
64 extern void uuid_generate(uuid_t);
65 extern void uuid_generate_random(uuid_t);
66 extern void uuid_generate_time(uuid_t);
67 extern void uuid_copy(uuid_t, uuid_t);
68 extern void uuid_clear(uuid_t);
69 extern void uuid_unparse(uuid_t, char *);
70 extern void uuid_unparse_lower(uuid_t, char *);
71 extern void uuid_unparse_upper(uuid_t, char *);
72 extern int uuid_compare(uuid_t, uuid_t);
73 extern int uuid_is_null(uuid_t);
74 extern int uuid_parse(char *, uuid_t);
75 extern time_t uuid_time(uuid_t, struct timeval *);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* _UUID_H */
82