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. This function is intended to be used for
19       debugging purposes, and the output is neither stable nor designed to be
20       machine readable.
21
22       The flags parameter may be used to modify the output. With
23       SD_BUS_MESSAGE_DUMP_WITH_HEADER, a header that specifies the message
24       type and flags and some additional metadata is printed. When
25       SD_BUS_MESSAGE_DUMP_SUBTREE_ONLY is not passed, the contents of the
26       whole message are printed. When it is passed, only the current
27       container in printed.
28
29       Note that this function moves the read pointer of the message. It may
30       be necessary to reset the position afterwards, for example with
31       sd_bus_message_rewind(3).
32

EXAMPLES

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

RETURN VALUE

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

NOTES

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

SEE ALSO

66       systemd(1), sd-bus(3)
67
68
69
70systemd 246                                             SD_BUS_MESSAGE_DUMP(3)
Impressum