1SD_BUS_GET_NAME_MACHINE_ID(s3d)_bus_get_name_machine_SiDd_BUS_GET_NAME_MACHINE_ID(3)
2
3
4

NAME

6       sd_bus_get_name_machine_id - Retrieve a bus client's machine identity
7

SYNOPSIS

9       #include <systemd/sd-bus.h>
10
11       int sd_bus_get_name_machine_id(sd_bus *bus, const char *name,
12                                      sd_id128_t *machine);
13

DESCRIPTION

15       sd_bus_get_name_machine_id() retrieves the D-Bus machine identity of
16       the machine that the bus client identified by name is running on.
17       Internally, it calls the GetMachineId method of the
18       org.freedesktop.DBus.Peer interface. The D-Bus machine identity is a
19       128-bit UUID. On Linux systems running systemd, this corresponds to the
20       contents of /etc/machine-id. On success, the machine identity is stored
21       in machine.
22

RETURN VALUE

24       On success, this function returns a non-negative integer. On failure,
25       it returns a negative errno-style error code.
26
27   Errors
28       Returned errors may indicate the following problems:
29
30       -EINVAL
31           An argument is invalid.
32
33       -ENOPKG
34           The bus cannot be resolved.
35
36       -ECHILD
37           The bus was created in a different process, library or module
38           instance.
39
40       -ENOMEM
41           Memory allocation failed.
42

NOTES

44       Functions described here are available as a shared library, which can
45       be compiled against and linked to with the libsystemd pkg-config(1)
46       file.
47
48       The code described here uses getenv(3), which is declared to be not
49       multi-thread-safe. This means that the code calling the functions
50       described here must not call setenv(3) from a parallel thread. It is
51       recommended to only do calls to setenv() from an early phase of the
52       program when no other threads have been started.
53

SEE ALSO

55       systemd(1), sd-bus(3)
56
57
58
59systemd 254                                      SD_BUS_GET_NAME_MACHINE_ID(3)
Impressum