uuid.h revision 302408
138786Sdfr/*- 238786Sdfr * Copyright (c) 2002,2005 Marcel Moolenaar 338786Sdfr * Copyright (c) 2002 Hiten Mahesh Pandya 438786Sdfr * All rights reserved. 538786Sdfr * 638786Sdfr * Redistribution and use in source and binary forms, with or without 738786Sdfr * modification, are permitted provided that the following conditions 838786Sdfr * are met: 938786Sdfr * 1. Redistributions of source code must retain the above copyright 1038786Sdfr * notice, this list of conditions and the following disclaimer. 1138786Sdfr * 2. Redistributions in binary form must reproduce the above copyright 1238786Sdfr * notice, this list of conditions and the following disclaimer in the 1338786Sdfr * documentation and/or other materials provided with the distribution. 1438786Sdfr * 1538786Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1638786Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1738786Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1838786Sdfr * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1938786Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2038786Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2138786Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2238786Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2338786Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2438786Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2538786Sdfr * SUCH DAMAGE. 2638786Sdfr * 2738786Sdfr * $FreeBSD: stable/11/include/uuid.h 183057 2008-09-15 23:47:19Z emax $ 2838786Sdfr */ 2950476Speter 3038786Sdfr#ifndef _UUID_H_ 31231244Sgjb#define _UUID_H_ 3238786Sdfr 3379538Sru#include <sys/types.h> 3438786Sdfr#include <sys/uuid.h> 3538786Sdfr 3638786Sdfr/* 3738786Sdfr * This implementation mostly conforms to the DCE 1.1 specification. 3884306Sru * See Also: 3984306Sru * uuidgen(1), uuidgen(2), uuid(3) 4038786Sdfr */ 4138786Sdfr 4238786Sdfr/* Status codes returned by the functions. */ 43139772Skeramida#define uuid_s_ok 0 44139772Skeramida#define uuid_s_bad_version 1 45139772Skeramida#define uuid_s_invalid_string_uuid 2 4669052Sru#define uuid_s_no_memory 3 4769052Sru 4869052Sru__BEGIN_DECLS 4957695Ssheldonhint32_t uuid_compare(const uuid_t *, const uuid_t *, uint32_t *); 5057695Ssheldonhvoid uuid_create(uuid_t *, uint32_t *); 5157695Ssheldonhvoid uuid_create_nil(uuid_t *, uint32_t *); 5247984Sn_hibmaint32_t uuid_equal(const uuid_t *, const uuid_t *, uint32_t *); 53121379Shmpvoid uuid_from_string(const char *, uuid_t *, uint32_t *); 54121379Shmpuint16_t uuid_hash(const uuid_t *, uint32_t *); 55121379Shmpint32_t uuid_is_nil(const uuid_t *, uint32_t *); 56121379Shmpvoid uuid_to_string(const uuid_t *, char **, uint32_t *); 5792566Sruvoid uuid_enc_le(void *, const uuid_t *); 5892566Sruvoid uuid_dec_le(const void *, uuid_t *); 5992566Sruvoid uuid_enc_be(void *, const uuid_t *); 6047984Sn_hibmavoid uuid_dec_be(const void *, uuid_t *); 6138786Sdfr__END_DECLS 6247984Sn_hibma 6347984Sn_hibma#endif /* _UUID_H_ */ 6457695Ssheldonh