1SD_BUS_MESSAGE_REWIND(3) sd_bus_message_rewind SD_BUS_MESSAGE_REWIND(3)
2
3
4
6 sd_bus_message_rewind - Return to beginning of message or current
7 container
8
10 #include <systemd/sd-bus.h>
11
12 int sd_bus_message_rewind(sd_bus_message *m, int complete);
13
15 sd_bus_message_rewind() moves the "read pointer" in the message m to
16 either the beginning of the message (if complete is true) or to the
17 beginning of the currently open container. If no container is open,
18 complete has no effect.
19
21 On success, this function returns 0 or a positive integer. The value is
22 zero if the current container or whole message in case no container is
23 open is empty, and positive otherwise. On failure, it returns a
24 negative errno-style error code.
25
26 Errors
27 Returned errors may indicate the following problems:
28
29 -EINVAL
30 The m parameter is NULL.
31
32 -EPERM
33 The message m has not been sealed.
34
36 Functions described here are available as a shared library, which can
37 be compiled against and linked to with the libsystemd pkg-config(1)
38 file.
39
40 The code described here uses getenv(3), which is declared to be not
41 multi-thread-safe. This means that the code calling the functions
42 described here must not call setenv(3) from a parallel thread. It is
43 recommended to only do calls to setenv() from an early phase of the
44 program when no other threads have been started.
45
47 systemd(1), sd-bus(3), sd_bus_message_read(3)
48
49
50
51systemd 254 SD_BUS_MESSAGE_REWIND(3)