xref: /freebsd/lib/libc/uuid/uuid.3 (revision 2efeeba554cbd7bdee9cfe17641c8bd335c7972f)
165393a86SMarcel Moolenaar.\" Copyright (c) 2002 Marcel Moolenaar
265393a86SMarcel Moolenaar.\" Copyright (c) 2002 Hiten Mahesh Pandya
365393a86SMarcel Moolenaar.\" All rights reserved.
465393a86SMarcel Moolenaar.\"
565393a86SMarcel Moolenaar.\" Redistribution and use in source and binary forms, with or without
665393a86SMarcel Moolenaar.\" modification, are permitted provided that the following conditions
765393a86SMarcel Moolenaar.\" are met:
865393a86SMarcel Moolenaar.\" 1. Redistributions of source code must retain the above copyright
965393a86SMarcel Moolenaar.\"    notice, this list of conditions and the following disclaimer.
1065393a86SMarcel Moolenaar.\" 2. Redistributions in binary form must reproduce the above copyright
1165393a86SMarcel Moolenaar.\"    notice, this list of conditions and the following disclaimer in the
1265393a86SMarcel Moolenaar.\"    documentation and/or other materials provided with the distribution.
1365393a86SMarcel Moolenaar.\"
1465393a86SMarcel Moolenaar.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1565393a86SMarcel Moolenaar.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1665393a86SMarcel Moolenaar.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1765393a86SMarcel Moolenaar.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1865393a86SMarcel Moolenaar.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
1965393a86SMarcel Moolenaar.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2065393a86SMarcel Moolenaar.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
2165393a86SMarcel Moolenaar.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2265393a86SMarcel Moolenaar.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2365393a86SMarcel Moolenaar.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2465393a86SMarcel Moolenaar.\" SUCH DAMAGE.
2565393a86SMarcel Moolenaar.\"
2665393a86SMarcel Moolenaar.\" $FreeBSD$
2765393a86SMarcel Moolenaar.\"
2865393a86SMarcel Moolenaar.Dd October 29, 2002
2965393a86SMarcel Moolenaar.Dt UUID 3
3065393a86SMarcel Moolenaar.Os
3165393a86SMarcel Moolenaar.Sh NAME
3265393a86SMarcel Moolenaar.Nm uuid_compare , uuid_create , uuid_create_nil , uuid_equal ,
3365393a86SMarcel Moolenaar.Nm uuid_from_string , uuid_hash , uuid_is_nil , uuid_to_string
3465393a86SMarcel Moolenaar.Nd DCE 1.1 compliant UUID functions
3565393a86SMarcel Moolenaar.Sh LIBRARY
3665393a86SMarcel Moolenaar.Lb libc
3765393a86SMarcel Moolenaar.Sh SYNOPSIS
3865393a86SMarcel Moolenaar.In uuid.h
3965393a86SMarcel Moolenaar.Ft int32_t
4065393a86SMarcel Moolenaar.Fn uuid_compare "uuid_t *uuid1" "uuid_t *uuid2" "uint32_t *status"
4165393a86SMarcel Moolenaar.Ft void
4265393a86SMarcel Moolenaar.Fn uuid_create "uuid_t *uuid" "uint32_t *status"
4365393a86SMarcel Moolenaar.Ft void
4465393a86SMarcel Moolenaar.Fn uuid_create_nil "uuid_t *uuid" "uint32_t *status"
4565393a86SMarcel Moolenaar.Ft int32_t
4665393a86SMarcel Moolenaar.Fn uuid_equal "uuid_t *uuid1" "uuid_t *uuid2" "uint32_t *status"
4765393a86SMarcel Moolenaar.Ft void
4865393a86SMarcel Moolenaar.Fn uuid_from_string "const char *str" "uuid_t *uuid" "uint32_t *status"
4965393a86SMarcel Moolenaar.Ft uint16_t
5065393a86SMarcel Moolenaar.Fn uuid_hash "uuid_t *uuid" "uint32_t *status"
5165393a86SMarcel Moolenaar.Ft int32_t
5265393a86SMarcel Moolenaar.Fn uuid_is_nil "uuid_t *uuid" "uint32_t *status"
5365393a86SMarcel Moolenaar.Ft void
5465393a86SMarcel Moolenaar.Fn uuid_to_string "uuid_t *uuid" "char **str" "uint32_t *status"
5565393a86SMarcel Moolenaar.Sh DESCRIPTION
5665393a86SMarcel MoolenaarThe family of DCE 1.1 compliant UUID functions allow applications to operate
5765393a86SMarcel Moolenaaron universally unique identifiers, or UUIDs.
5865393a86SMarcel MoolenaarThe
5965393a86SMarcel Moolenaar.Fn uuid_create
6065393a86SMarcel Moolenaarand
6165393a86SMarcel Moolenaar.Fn uuid_create_nil
6265393a86SMarcel Moolenaarfunctions create UUIDs.
6365393a86SMarcel MoolenaarThe
6465393a86SMarcel Moolenaar.Fn uuid_compare , uuid_equal
6565393a86SMarcel Moolenaarand
6665393a86SMarcel Moolenaar.Fn uuid_is_nil
6765393a86SMarcel Moolenaarfunctions can be used to test UUIDs.
6865393a86SMarcel MoolenaarTo convert from the binary representation to the string representation or
6965393a86SMarcel Moolenaarvice versa, use
7065393a86SMarcel Moolenaar.Fn uuid_to_string
7165393a86SMarcel Moolenaaror
7265393a86SMarcel Moolenaar.Fn uuid_from_string
7365393a86SMarcel Moolenaarrespectively.
7465393a86SMarcel MoolenaarA 16-bit hash value can be obtained by calling
7565393a86SMarcel Moolenaar.Fn uuid_hash .
7665393a86SMarcel Moolenaar.Sh RETURN VALUES
7765393a86SMarcel MoolenaarThe successful or unsuccessful completion of the function is returned in
7865393a86SMarcel Moolenaarthe
7965393a86SMarcel Moolenaar.Fa status
802efeeba5SRuslan Ermilovargument.
8160849ee1SRuslan ErmilovPossible values are:
8265393a86SMarcel Moolenaar.Pp
8360849ee1SRuslan Ermilov.Bl -tag -width ".Dv uuid_s_invalid_string_uuid"
8465393a86SMarcel Moolenaar.It Dv uuid_s_ok
8565393a86SMarcel MoolenaarThe function completed successfully.
8665393a86SMarcel Moolenaar.It Dv uuid_s_bad_version
8765393a86SMarcel MoolenaarThe UUID does not have a known version.
8865393a86SMarcel Moolenaar.It Dv uuid_s_invalid_string_uuid
8965393a86SMarcel MoolenaarThe string representation of an UUID is not valid.
9065393a86SMarcel Moolenaar.It Dv uuid_s_no_memory
9165393a86SMarcel MoolenaarThe meaning of the code escaped the writers mind.
9265393a86SMarcel Moolenaar.El
9365393a86SMarcel Moolenaar.Sh SEE ALSO
9465393a86SMarcel Moolenaar.Xr uuidgen 1 ,
9565393a86SMarcel Moolenaar.Xr uuidgen 2
9665393a86SMarcel Moolenaar.Sh BUGS
9765393a86SMarcel MoolenaarThis manpage can be improved.
9865393a86SMarcel Moolenaar.Sh STANDARDS
9965393a86SMarcel MoolenaarThe UUID functions conform to the DCE 1.1 RPC specification.
100