Lines 25-31
Link Here
|
25 |
.\" |
25 |
.\" |
26 |
.\" $FreeBSD$ |
26 |
.\" $FreeBSD$ |
27 |
.\" |
27 |
.\" |
28 |
.Dd March 1, 2012 |
28 |
.Dd September 19, 2021 |
29 |
.Dt UUID 3 |
29 |
.Dt UUID 3 |
30 |
.Os |
30 |
.Os |
31 |
.Sh NAME |
31 |
.Sh NAME |
Lines 68-87
The
Link Here
|
68 |
and |
68 |
and |
69 |
.Fn uuid_create_nil |
69 |
.Fn uuid_create_nil |
70 |
functions create UUIDs. |
70 |
functions create UUIDs. |
71 |
The |
|
|
72 |
.Fn uuid_compare , |
73 |
.Fn uuid_equal |
74 |
and |
75 |
.Fn uuid_is_nil |
76 |
functions can be used to test UUIDs. |
77 |
To convert from the binary representation to the string representation or |
71 |
To convert from the binary representation to the string representation or |
78 |
vice versa, use |
72 |
vice versa, use |
79 |
.Fn uuid_to_string |
73 |
.Fn uuid_to_string |
80 |
or |
74 |
or |
81 |
.Fn uuid_from_string |
75 |
.Fn uuid_from_string |
82 |
respectively. |
76 |
respectively. |
83 |
A 16-bit hash value can be obtained by calling |
|
|
84 |
.Fn uuid_hash . |
85 |
.Pp |
77 |
.Pp |
86 |
The |
78 |
The |
87 |
.Fn uuid_to_string |
79 |
.Fn uuid_to_string |
Lines 111-116
functions decode a UUID from an octet stream in little-endian and
Link Here
|
111 |
big-endian byte-order, respectively. |
103 |
big-endian byte-order, respectively. |
112 |
These routines are not part of the DCE RPC API. |
104 |
These routines are not part of the DCE RPC API. |
113 |
They are provided for convenience. |
105 |
They are provided for convenience. |
|
|
106 |
.Pp |
107 |
The |
108 |
.Fn uuid_compare |
109 |
and |
110 |
.Fn uuid_equal |
111 |
functions compare two UUIDs for equality. |
112 |
UUIDs are equal if pointers |
113 |
.Fa a |
114 |
and |
115 |
.Fa b |
116 |
are equal or both |
117 |
.Dv NULL , |
118 |
or if the structures |
119 |
.Fa a |
120 |
and |
121 |
.Fa b |
122 |
point to are equal. |
123 |
.Fn uuid_compare |
124 |
returns 0 if the UUIDs are equal, -1 if |
125 |
.Fa a |
126 |
is less than |
127 |
.Fa b , |
128 |
and 1 if |
129 |
.Fa a |
130 |
is greater than |
131 |
.Fa b . |
132 |
.Fn uuid_equal |
133 |
returns 1 if the UUIDs are equal, 0 if they are |
134 |
not equal. |
135 |
.Pp |
136 |
The |
137 |
.Fn uuid_is_nil |
138 |
function compares a UUID to |
139 |
.Dv NULL . |
140 |
The function returns 1 if |
141 |
.Fa u |
142 |
is |
143 |
.Dv NULL |
144 |
or if the UUID consists of all zeros, and zero otherwise. |
145 |
.Pp |
146 |
The |
147 |
.Fn uuid_hash |
148 |
function returns a 16-bit hash value for the specified UUID. |
114 |
.Sh RETURN VALUES |
149 |
.Sh RETURN VALUES |
115 |
The successful or unsuccessful completion of the function is returned in |
150 |
The successful or unsuccessful completion of the function is returned in |
116 |
the |
151 |
the |
Lines 127-132
The string representation of an UUID is not valid.
Link Here
|
127 |
.It Dv uuid_s_no_memory |
162 |
.It Dv uuid_s_no_memory |
128 |
The function can not allocate memory to store an UUID representation. |
163 |
The function can not allocate memory to store an UUID representation. |
129 |
.El |
164 |
.El |
|
|
165 |
.Pp |
166 |
.Fn uuid_compare , |
167 |
.Fn uuid_equal , |
168 |
.Fn uuid_is_nil , |
169 |
and |
170 |
.Fn uuid_hash |
171 |
always set |
172 |
.Fa status |
173 |
to |
174 |
.Dv uuid_s_ok . |
130 |
.Sh SEE ALSO |
175 |
.Sh SEE ALSO |
131 |
.Xr uuidgen 1 , |
176 |
.Xr uuidgen 1 , |
132 |
.Xr uuidgen 2 |
177 |
.Xr uuidgen 2 |