1SD_BUS_MESSAGE_APPEND_SsTdR_IbNuGs__MmEeMsFsDa(g3e)_appenSdD__sBtUrSi_nMgE_SmSeAmGfEd_APPEND_STRING_MEMFD(3)
2
3
4

NAME

6       sd_bus_message_append_string_memfd, sd_bus_message_append_string_iovec,
7       sd_bus_message_append_string_space - Attach a string to a message
8

SYNOPSIS

10       #include <systemd/sd-bus.h>
11
12       int sd_bus_message_append_string_memfd(sd_bus_message *m, int memfd);
13
14       int sd_bus_message_append_string_iovec(sd_bus_message *m,
15                                              const struct iovec *iov,
16                                              unsigned n);
17
18       int sd_bus_message_append_string_space(sd_bus_message *m, size_t size,
19                                              char **s);
20

DESCRIPTION

22       The functions sd_bus_message_append_string_memfd and
23       sd_bus_message_append_string_iovec can be used to append a single
24       string (item of type "s") to message m.
25
26       In case of sd_bus_message_append_string_memfd, the contents of memfd
27       are the string. They must satisfy the same constraints as described for
28       the "s" type in sd_bus_message_append_basic(3).
29
30       In case of sd_bus_message_append_string_iovec, the payload of iov is
31       the string. It must satisfy the same constraints as described for the
32       "s" type in sd_bus_message_append_basic(3).
33
34       The iov argument must point to n struct iovec structures. Each
35       structure may have the iov_base field set, in which case the memory
36       pointed to will be copied into the message, or unset, in which case a
37       block of spaces (ASCII 32) of length iov_len will be inserted. The
38       memory pointed at by iov may be changed after this call.
39
40       The sd_bus_message_append_string_space function appends space for a
41       string to message m. It behaves similar to sd_bus_message_append_basic
42       with type "s", but instead of copying a string into the message, it
43       returns a pointer to the destination area to the caller in pointer p.
44       Space for the string of length size plus the terminating NUL is
45       allocated.
46

RETURN VALUE

48       On success, those calls return 0 or a positive integer. On failure,
49       they returns a negative errno-style error code.
50

ERRORS

52       Returned errors may indicate the following problems:
53
54       -EINVAL
55           Specified parameter is invalid.
56
57       -EPERM
58           Message has been sealed.
59
60       -ESTALE
61           Message is in invalid state.
62
63       -ENXIO
64           Message cannot be appended to.
65
66       -ENOMEM
67           Memory allocation failed.
68

NOTES

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

SEE ALSO

74       systemd(1), sd-bus(3), sd_bus_message_append_basic(3), The D-Bus
75       specification[1]
76

NOTES

78        1. The D-Bus specification
79           http://dbus.freedesktop.org/doc/dbus-specification.html
80
81
82
83systemd 239                              SD_BUS_MESSAGE_APPEND_STRING_MEMFD(3)
Impressum