]> git.proxmox.com Git - systemd.git/blame - man/sd_id128_randomize.3
Imported Upstream version 219
[systemd.git] / man / sd_id128_randomize.3
CommitLineData
14228c0d 1'\" t
e735f4d4 2.TH "SD_ID128_RANDOMIZE" "3" "" "systemd 219" "sd_id128_randomize"
14228c0d
MB
3.\" -----------------------------------------------------------------
4.\" * Define some portability stuff
5.\" -----------------------------------------------------------------
6.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7.\" http://bugs.debian.org/507673
8.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10.ie \n(.g .ds Aq \(aq
11.el .ds Aq '
12.\" -----------------------------------------------------------------
13.\" * set default formatting
14.\" -----------------------------------------------------------------
15.\" disable hyphenation
16.nh
17.\" disable justification (adjust text to left margin only)
18.ad l
19.\" -----------------------------------------------------------------
20.\" * MAIN CONTENT STARTS HERE *
21.\" -----------------------------------------------------------------
22.SH "NAME"
23sd_id128_randomize \- Generate 128\-bit IDs
24.SH "SYNOPSIS"
25.sp
26.ft B
27.nf
28#include <systemd/sd\-id128\&.h>
29.fi
30.ft
31.HP \w'int\ sd_id128_randomize('u
60f067b4 32.BI "int sd_id128_randomize(sd_id128_t\ *" "ret" ");"
14228c0d
MB
33.SH "DESCRIPTION"
34.PP
35\fBsd_id128_randomize()\fR
36generates a new randomized 128\-bit ID and returns it in
37\fIret\fR\&. Every invocation returns a new randomly generated ID\&. This uses the
38/dev/urandom
39kernel random number generator\&.
40.PP
41Note that
42\fBsd_id128_randomize()\fR
43always returns a UUID v4\-compatible ID\&.
44.PP
45For more information about the
46"sd_id128_t"
47type, see
48\fBsd-id128\fR(3)\&.
49.PP
50\fBjournalctl\fR(1)\*(Aqs
51\fB\-\-new\-id\fR
f47781d8 52option may be used as a command line front\-end for
14228c0d
MB
53\fBsd_id128_randomize()\fR\&.
54.SH "RETURN VALUE"
55.PP
56The call returns 0 on success (in which case
57\fIret\fR
58is filled in), or a negative errno\-style error code\&.
59.SH "NOTES"
60.PP
61The
62\fBsd_id128_randomize()\fR
60f067b4
JS
63interface is available as a shared library, which can be compiled and linked to with the
64"libsystemd"\ \&\fBpkg-config\fR(1)
14228c0d
MB
65file\&.
66.SH "SEE ALSO"
67.PP
68\fBsystemd\fR(1),
69\fBsd-id128\fR(3),
70\fBmachine-id\fR(5),
71\fBrandom\fR(4),
72\fBsd_id128_get_machine\fR(3)