]>
Commit | Line | Data |
---|---|---|
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" | |
23 | sd_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 | |
36 | generates 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 | |
39 | kernel random number generator\&. | |
40 | .PP | |
41 | Note that | |
42 | \fBsd_id128_randomize()\fR | |
43 | always returns a UUID v4\-compatible ID\&. | |
44 | .PP | |
45 | For more information about the | |
46 | "sd_id128_t" | |
47 | type, see | |
48 | \fBsd-id128\fR(3)\&. | |
49 | .PP | |
50 | \fBjournalctl\fR(1)\*(Aqs | |
51 | \fB\-\-new\-id\fR | |
f47781d8 | 52 | option may be used as a command line front\-end for |
14228c0d MB |
53 | \fBsd_id128_randomize()\fR\&. |
54 | .SH "RETURN VALUE" | |
55 | .PP | |
56 | The call returns 0 on success (in which case | |
57 | \fIret\fR | |
58 | is filled in), or a negative errno\-style error code\&. | |
59 | .SH "NOTES" | |
60 | .PP | |
61 | The | |
62 | \fBsd_id128_randomize()\fR | |
60f067b4 JS |
63 | interface is available as a shared library, which can be compiled and linked to with the |
64 | "libsystemd"\ \&\fBpkg-config\fR(1) | |
14228c0d MB |
65 | file\&. |
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) |