2 .TH "SD_ID128_GET_MACHINE" "3" "" "systemd 219" "sd_id128_get_machine"
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
17 .\" disable justification (adjust text to left margin only)
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
23 sd_id128_get_machine, sd_id128_get_boot \- Retrieve 128\-bit IDs
28 #include <systemd/sd\-id128\&.h>
31 .HP \w'int\ sd_id128_get_machine('u
32 .BI "int sd_id128_get_machine(sd_id128_t\ *" "ret" ");"
33 .HP \w'int\ sd_id128_get_boot('u
34 .BI "int sd_id128_get_boot(sd_id128_t\ *" "ret" ");"
37 \fBsd_id128_get_machine()\fR
38 returns the machine ID of the executing host\&. This reads and parses the
40 file\&. This function caches the machine ID internally to make retrieving the machine ID a cheap operation\&.
42 \fBsd_id128_get_boot()\fR
43 returns the boot ID of the executing kernel\&. This reads and parses the
44 /proc/sys/kernel/random/boot_id
45 file exposed by the kernel\&. It is randomly generated early at boot and is unique for every running kernel instance\&. See
47 for more information\&. This function also internally caches the returned ID to make this call a cheap operation\&.
50 \fBsd_id128_get_boot()\fR
51 always returns a UUID v4 compatible ID\&.
52 \fBsd_id128_get_machine()\fR
53 will also return a UUID v4\-compatible ID on new installations but might not on older\&. It is possible to convert the machine ID into a UUID v4\-compatible one\&. For more information, see
54 \fBmachine-id\fR(5)\&.
56 For more information about the
62 The two calls return 0 on success (in which case
64 is filled in), or a negative errno\-style error code\&.
68 \fBsd_id128_get_machine()\fR
70 \fBsd_id128_get_boot()\fR
71 interfaces are available as a shared library, which can be compiled and linked to with the
72 "libsystemd"\ \&\fBpkg-config\fR(1)
80 \fBsd_id128_randomize\fR(3)