chiark / gitweb /
Update man page sources to upstream tag v236 variants.
[elogind.git] / man / sd_id128_randomize.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of elogind.
7   SPDX-License-Identifier: LGPL-2.1+
8
9
10   Copyright 2012 Lennart Poettering
11
12   elogind is free software; you can redistribute it and/or modify it
13   under the terms of the GNU Lesser General Public License as published by
14   the Free Software Foundation; either version 2.1 of the License, or
15   (at your option) any later version.
16
17   elogind is distributed in the hope that it will be useful, but
18   WITHOUT ANY WARRANTY; without even the implied warranty of
19   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20   Lesser General Public License for more details.
21
22   You should have received a copy of the GNU Lesser General Public License
23   along with elogind; If not, see <http://www.gnu.org/licenses/>.
24 -->
25
26 <refentry id="sd_id128_randomize">
27
28   <refentryinfo>
29     <title>sd_id128_randomize</title>
30     <productname>elogind</productname>
31
32     <authorgroup>
33       <author>
34         <contrib>Developer</contrib>
35         <firstname>Lennart</firstname>
36         <surname>Poettering</surname>
37         <email>lennart@poettering.net</email>
38       </author>
39     </authorgroup>
40   </refentryinfo>
41
42   <refmeta>
43     <refentrytitle>sd_id128_randomize</refentrytitle>
44     <manvolnum>3</manvolnum>
45   </refmeta>
46
47   <refnamediv>
48     <refname>sd_id128_randomize</refname>
49     <refpurpose>Generate 128-bit IDs</refpurpose>
50   </refnamediv>
51
52   <refsynopsisdiv>
53     <funcsynopsis>
54       <funcsynopsisinfo>#include &lt;elogind/sd-id128.h&gt;</funcsynopsisinfo>
55
56       <funcprototype>
57         <funcdef>int <function>sd_id128_randomize</function></funcdef>
58         <paramdef>sd_id128_t *<parameter>ret</parameter></paramdef>
59       </funcprototype>
60
61     </funcsynopsis>
62   </refsynopsisdiv>
63
64   <refsect1>
65     <title>Description</title>
66
67     <para><function>sd_id128_randomize()</function> generates a new
68     randomized 128-bit ID and returns it in
69     <parameter>ret</parameter>. Every invocation returns a new
70     randomly generated ID. This uses the
71     <filename>/dev/urandom</filename> kernel random number
72     generator.</para>
73
74     <para>Note that <function>sd_id128_randomize()</function> always
75     returns a UUID v4-compatible ID.</para>
76
77     <para>For more information about the <literal>sd_id128_t</literal>
78     type, see
79     <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
80
81 <!-- 0 /// elogind does not support journalctl
82     <para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
83     <option>--new-id128</option> option may be used as a command line
84     front-end for <function>sd_id128_randomize()</function>.</para>
85 // 0 -->
86   </refsect1>
87
88   <refsect1>
89     <title>Return Value</title>
90
91     <para>The call returns 0 on success (in which case
92     <parameter>ret</parameter> is filled in), or a negative
93     errno-style error code.</para>
94   </refsect1>
95
96   <refsect1>
97     <title>Notes</title>
98
99     <para>The <function>sd_id128_randomize()</function> interface is
100     available as a shared library, which can be compiled and linked to
101     with the
102     <literal>libelogind</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
103     file.</para>
104   </refsect1>
105
106   <refsect1>
107     <title>See Also</title>
108
109     <para>
110       <!-- 0 /// elogind is in section 8
111       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
112       --><!-- else -->
113       <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
114       <!-- // 0 -->
115       <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
116       <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
117       <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
118       <citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>
119     </para>
120   </refsect1>
121
122 </refentry>