1/* 2 * Public include file for the UUID library 3 * 4 * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. 5 * 6 * %Begin-Header% 7 * This file may be redistributed under the terms of the GNU 8 * Library General Public License. 9 * %End-Header% 10 */ 11 12#ifndef _UUID_UUID_H 13#define _UUID_UUID_H 14 15#include <sys/types.h> 16#include <sys/time.h> 17#include <time.h> 18 19typedef unsigned char uuid_t[16]; 20 21/* UUID Variant definitions */ 22#define UUID_VARIANT_NCS 0 23#define UUID_VARIANT_DCE 1 24#define UUID_VARIANT_MICROSOFT 2 25#define UUID_VARIANT_OTHER 3 26 27#ifdef __cplusplus 28extern "C" { 29#endif 30 31/* clear.c */ 32void uuid_clear(uuid_t uu); 33 34/* compare.c */ 35int uuid_compare(const uuid_t uu1, const uuid_t uu2); 36 37/* copy.c */ 38void uuid_copy(uuid_t dst, const uuid_t src); 39 40/* gen_uuid.c */ 41void uuid_generate(uuid_t out); 42void uuid_generate_random(uuid_t out); 43void uuid_generate_time(uuid_t out); 44 45/* isnull.c */ 46int uuid_is_null(const uuid_t uu); 47 48/* parse.c */ 49int uuid_parse(const char *in, uuid_t uu); 50 51/* unparse.c */ 52void uuid_unparse(const uuid_t uu, char *out); 53 54/* uuid_time.c */ 55time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); 56int uuid_type(const uuid_t uu); 57int uuid_variant(const uuid_t uu); 58 59#ifdef __cplusplus 60} 61#endif 62 63#endif /* _UUID_UUID_H */ 64