xref: /illumos-gate/usr/src/head/uuid/uuid.h (revision d583b39b)
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 #ifndef	_UUID_H
28 #define	_UUID_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * The copyright in this file is taken from the original Leach & Salz
38  * UUID specification, from which this implementation is derived.
39  */
40 
41 /*
42  * Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
43  * Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
44  * Digital Equipment Corporation, Maynard, Mass.  Copyright (c) 1998
45  * Microsoft.  To anyone who acknowledges that this file is provided
46  * "AS IS" without any express or implied warranty: permission to use,
47  * copy, modify, and distribute this file for any purpose is hereby
48  * granted without fee, provided that the above copyright notices and
49  * this notice appears in all source code copies, and that none of the
50  * names of Open Software Foundation, Inc., Hewlett-Packard Company,
51  * or Digital Equipment Corporation be used in advertising or
52  * publicity pertaining to distribution of the software without
53  * specific, written prior permission.  Neither Open Software
54  * Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
55  * Equipment Corporation makes any representations about the
56  * suitability of this software for any purpose.
57  */
58 
59 #include <sys/types.h>
60 #include <sys/uuid.h>
61 
62 extern void uuid_generate(uuid_t);
63 extern void uuid_generate_random(uuid_t);
64 extern void uuid_generate_time(uuid_t);
65 extern void uuid_copy(uuid_t, uuid_t);
66 extern void uuid_clear(uuid_t);
67 extern void uuid_unparse(uuid_t, char *);
68 extern int uuid_compare(uuid_t, uuid_t);
69 extern int uuid_is_null(uuid_t);
70 extern int uuid_parse(char *, uuid_t);
71 extern time_t uuid_time(uuid_t, struct timeval *);
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif /* _UUID_H */
78