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.6 2005/11/24 07:04:20 ru Exp $
27 .\" $DragonFly: src/lib/libc/uuid/uuid.3,v 1.6 2008/05/02 02:05:04 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 The family of DCE 1.1 compliant UUID functions allow applications to operate
73 on universally unique identifiers, or UUIDs.
78 functions create UUIDs.
84 functions can be used to test UUIDs.
85 To convert from the binary representation to the string representation or
91 A 16-bit hash value can be obtained by calling
94 String equivalents to UUIDs may be available.
97 function will lookup the symbolic name given a UUID.
100 should be initialized to
104 will free the previous contents prior to doing the lookup.
105 The last string may be freed by calling the function with a
119 .Dv uuid_s_not_found .
122 will be assigned to the symbolic name and
129 function will lookup a UUID given a symbolic name.
130 The contents of the uuid will be zeroed out if a lookup fails.
133 .Fn uuid_reset_lookup
134 function will clear its in-memory cache of UUID<->NAME conversions.
135 The next lookup will reload the cache.
137 .Bl -tag -width ".Pa /etc/defaults/uuids"
138 .It Pa /etc/defaults/uuids
139 A list of UUIDs and their symbolic names provided by the OS vendor.
141 A list of UUIDs and their symbolic names provided by the system administrator.
144 The successful or unsuccessful completion of the function is returned in the
148 .Bl -tag -width ".Dv uuid_s_invalid_string_uuid"
150 The function completed successfully.
151 .It Dv uuid_s_bad_version
152 The UUID does not have a known version.
153 .It Dv uuid_s_invalid_string_uuid
154 The string representation of an UUID is not valid.
155 .It Dv uuid_s_no_memory
156 The meaning of the code escaped the writers mind.
157 .It Dv uuid_s_not_found
158 A UUID lookup failed.
164 The UUID functions conform to the DCE 1.1 RPC specification.