summaryrefslogtreecommitdiffstats
path: root/libuuid/man/uuid_parse.3
blob: c70980ebab3eb3a7f1ac7a3c9a6f5eee6a3c9bcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
'\" t
.\"     Title: uuid_parse
.\"    Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.20
.\"      Date: 2023-10-23
.\"    Manual: Programmer's Manual
.\"    Source: util-linux 2.39.3
.\"  Language: English
.\"
.TH "UUID_PARSE" "3" "2023-10-23" "util\-linux 2.39.3" "Programmer\*(Aqs Manual"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
uuid_parse \- convert an input UUID string into binary representation
.SH "SYNOPSIS"
.sp
\fB#include <uuid.h>\fP
.sp
\fBint uuid_parse(char *\fIin\fP, uuid_t \fIuu\fP);\fP
.br
\fBint uuid_parse_range(char *\fIin_start\fP, char *\fIin_end\fP, uuid_t \fIuu\fP);\fP
.SH "DESCRIPTION"
.sp
The \fBuuid_parse\fP() function converts the UUID string given by \fIin\fP into the binary representation. The input UUID is a string of the form 1b4e28ba\-2fa1\-11d2\-883f\-b9a761bde3fb (in \fBprintf\fP(3) format "%08x\-%04x\-%04x\-%04x\-%012x", 36 bytes plus the trailing \*(Aq\(rs0\*(Aq).
.sp
The \fBuuid_parse_range\fP() function works like \fBuuid_parse\fP() but parses only range in string specified by \fIin_start\fP and \fIin_end\fP pointers.
.SH "RETURN VALUE"
.sp
Upon successfully parsing the input string, 0 is returned, and the UUID is stored in the location pointed to by \fIuu\fP, otherwise \-1 is returned.
.SH "CONFORMING TO"
.sp
This library parses UUIDs compatible with OSF DCE 1.1, and hash based UUIDs V3 and V5 compatible with \c
.URL "https://tools.ietf.org/html/rfc4122" "RFC\-4122" "."
.SH "AUTHORS"
.sp
Theodore Y. Ts\(cqo
.SH "SEE ALSO"
.sp
\fBuuid\fP(3),
\fBuuid_clear\fP(3),
\fBuuid_compare\fP(3),
\fBuuid_copy\fP(3),
\fBuuid_generate\fP(3),
\fBuuid_is_null\fP(3),
\fBuuid_time\fP(3),
\fBuuid_unparse\fP(3)
.SH "REPORTING BUGS"
.sp
For bug reports, use the issue tracker at \c
.URL "https://github.com/util\-linux/util\-linux/issues" "" "."
.SH "AVAILABILITY"
.sp
The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c
.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."