xref: /titanic_51/usr/src/lib/libuuid/common/uuid_misc.h (revision c8e880c1386b032ac975c61826ba3bc0d8dce5ac)
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 2000, 2002 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_UUID_MISC_H
28 #define	_UUID_MISC_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * The copyright in this file is taken from the original Leach
34  * & Salz UUID specification, from which this implementation
35  * is derived.
36  */
37 
38 /*
39  * Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
40  * Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
41  * Digital Equipment Corporation, Maynard, Mass.  Copyright (c) 1998
42  * Microsoft.  To anyone who acknowledges that this file is provided
43  * "AS IS" without any express or implied warranty: permission to use,
44  * copy, modify, and distribute this file for any purpose is hereby
45  * granted without fee, provided that the above copyright notices and
46  * this notice appears in all source code copies, and that none of the
47  * names of Open Software Foundation, Inc., Hewlett-Packard Company,
48  * or Digital Equipment Corporation be used in advertising or
49  * publicity pertaining to distribution of the software without
50  * specific, written prior permission.  Neither Open Software
51  * Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital
52  * Equipment Corporation makes any representations about the
53  * suitability of this software for any purpose.
54  */
55 
56 #ifdef	__cplusplus
57 extern "C" {
58 #endif
59 
60 #include <uuid/uuid.h>
61 #include <sys/types.h>
62 
63 typedef uint64_t	uuid_time_t;
64 
65 /*
66  * data type for UUID generator persistent state
67  */
68 typedef struct {
69 	uuid_time_t	ts;	/* saved timestamp */
70 	uuid_node_t	node;	/* saved node ID */
71 	uint16_t	cs;	/* saved clock sequence */
72 } uuid_state_t;
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif /* _UUID_MISC_H */
79