1SD_BUS_MESSAGE_DUMP(3)        sd_bus_message_dump       SD_BUS_MESSAGE_DUMP(3)
2
3
4

NAME

6       sd_bus_message_dump - Produce a string representation of a message for
7       debugging purposes
8

SYNOPSIS

10       #include <systemd/sd-bus.h>
11
12       int sd_bus_message_dump(sd_bus_message *m, FILE *f, uint64_t flags);
13
14       SD_BUS_MESSAGE_DUMP_WITH_HEADER, SD_BUS_MESSAGE_DUMP_SUBTREE_ONLY
15

DESCRIPTION

17       The sd_bus_message_dump() function writes a textual representation of
18       the message m to the stream f. If f is NULL, standard output (stdio)
19       will be used. This function is intended to be used for debugging
20       purposes, and the output is neither stable nor designed to be machine
21       readable.
22
23       The flags parameter may be used to modify the output. With
24       SD_BUS_MESSAGE_DUMP_WITH_HEADER, a header that specifies the message
25       type and flags and some additional metadata is printed. When
26       SD_BUS_MESSAGE_DUMP_SUBTREE_ONLY is not passed, the contents of the
27       whole message are printed. When it is passed, only the current
28       container in printed.
29
30       Note that this function moves the read pointer of the message. It may
31       be necessary to reset the position afterwards, for example with
32       sd_bus_message_rewind(3).
33

EXAMPLES

35       Output for a signal message (with SD_BUS_MESSAGE_DUMP_WITH_HEADER):
36
37           > Type=signal  Endian=l  Flags=1  Version=1  Cookie=22
38             Path=/value/a  Interface=org.freedesktop.DBus.Properties  Member=PropertiesChanged
39             MESSAGE "sa{sv}as" {
40                     STRING "org.freedesktop.systemd.ValueTest";
41                     ARRAY "{sv}" {
42                             DICT_ENTRY "sv" {
43                                     STRING "Value";
44                                     VARIANT "s" {
45                                             STRING "object 0x1e, path /value/a";
46                                     };
47                             };
48                     };
49                     ARRAY "s" {
50                             STRING "Value2";
51                             STRING "AnExplicitProperty";
52                     };
53             };
54
55
56

RETURN VALUE

58       On success, this function returns 0 or a positive integer. On failure,
59       it returns a negative errno-style error code. No error codes are
60       currently defined.
61

NOTES

63       These APIs are implemented as a shared library, which can be compiled
64       and linked to with the libsystemd pkg-config(1) file.
65

SEE ALSO

67       systemd(1), sd-bus(3)
68
69
70
71systemd 253                                             SD_BUS_MESSAGE_DUMP(3)
Impressum