1 .\" Copyright (c) 2002 Marcel Moolenaar
2 .\" Copyright (c) 2002 Hiten Mahesh Pandya
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
21 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" $FreeBSD: src/lib/libc/uuid/uuid.3,v 1.7 2008/08/14 22:23:16 emax Exp $
27 .\" $DragonFly: src/lib/libc/uuid/uuid.3,v 1.8 2008/08/21 21:41:55 swildner Exp $
33 .Nm uuid_addr_lookup ,
38 .Nm uuid_from_string ,
41 .Nm uuid_name_lookup ,
42 .Nm uuid_reset_lookup ,
44 .Nd DCE 1.1 compliant UUID functions
50 .Fn uuid_addr_lookup "const uuid_t *u" "char **strp" "uint32_t *status"
52 .Fn uuid_compare "const uuid_t *uuid1" "const uuid_t *uuid2" "uint32_t *status"
54 .Fn uuid_create "uuid_t *uuid" "uint32_t *status"
56 .Fn uuid_create_nil "uuid_t *uuid" "uint32_t *status"
58 .Fn uuid_equal "const uuid_t *uuid1" "const uuid_t *uuid2" "uint32_t *status"
60 .Fn uuid_from_string "const char *str" "uuid_t *uuid" "uint32_t *status"
62 .Fn uuid_hash "const uuid_t *uuid" "uint32_t *status"
64 .Fn uuid_is_nil "const uuid_t *uuid" "uint32_t *status"
66 .Fn uuid_name_lookup "uuid_t *u" "const char *str" "uint32_t *status"
68 .Fn uuid_reset_lookup "void"
70 .Fn uuid_to_string "const uuid_t *uuid" "char **str" "uint32_t *status"
72 .Fn uuid_enc_le "void *buf" "const uuid_t *uuid"
74 .Fn uuid_dec_le "const void *buf" "uuid_t *"
76 .Fn uuid_enc_be "void *buf" "const uuid_t *uuid"
78 .Fn uuid_dec_be "const void *buf" "uuid_t *"
80 The family of DCE 1.1 compliant UUID functions allow applications to operate
81 on universally unique identifiers, or UUIDs.
86 functions create UUIDs.
92 functions can be used to test UUIDs.
93 To convert from the binary representation to the string representation or
99 A 16-bit hash value can be obtained by calling
102 String equivalents to UUIDs may be available.
105 function will lookup the symbolic name given a UUID.
108 should be initialized to
112 will free the previous contents prior to doing the lookup.
113 The last string may be freed by calling the function with a
127 .Dv uuid_s_not_found .
130 will be assigned to the symbolic name and
137 function will lookup a UUID given a symbolic name.
138 The contents of the uuid will be zeroed out if a lookup fails.
141 .Fn uuid_reset_lookup
142 function will clear its in-memory cache of UUID<->NAME conversions.
143 The next lookup will reload the cache.
149 functions encode a binary representation of a UUID into an octet stream
150 in little-endian and big-endian byte-order, respectively.
151 The destination buffer must be pre-allocated by the caller, and must be
152 large enough to hold the 16-octet binary UUID.
153 These routines are not part of the DCE RPC API.
154 They are provided for convenience.
160 functions decode a UUID from an octet stream in little-endian and
161 big-endian byte-order, respectively.
162 These routines are not part of the DCE RPC API.
163 They are provided for convenience.
165 The successful or unsuccessful completion of the function is returned in the
169 .Bl -tag -width ".Dv uuid_s_invalid_string_uuid"
171 The function completed successfully.
172 .It Dv uuid_s_bad_version
173 The UUID does not have a known version.
174 .It Dv uuid_s_invalid_string_uuid
175 The string representation of an UUID is not valid.
176 .It Dv uuid_s_no_memory
177 The meaning of the code escaped the writers mind.
178 .It Dv uuid_s_not_found
179 A UUID lookup failed.
182 .Bl -tag -width ".Pa /etc/defaults/uuids"
183 .It Pa /etc/defaults/uuids
184 A list of UUIDs and their symbolic names provided by the OS vendor.
186 A list of UUIDs and their symbolic names provided by the system administrator.
193 The UUID functions conform to the DCE 1.1 RPC specification.