1SD_BUS_MESSAGE_SET_DESTINsAdT_IbOuNs(_3m)essage_set_desStDi_nBaUtSi_oMnESSAGE_SET_DESTINATION(3)
2
3
4
6 sd_bus_message_set_destination, sd_bus_message_set_sender - Set the
7 destination or sender service name of a bus message
8
10 #include <systemd/sd-bus.h>
11
12 int sd_bus_message_set_destination(sd_bus_message *message,
13 const char *destination);
14
15 int sd_bus_message_set_sender(sd_bus_message *message,
16 const char *sender);
17
19 sd_bus_message_set_destination() sets the destination service name for
20 the specified bus message object. The specified name must be a valid
21 unique or well-known service name.
22
23 sd_bus_message_set_sender() sets the sender service name for the
24 specified bus message object. The specified name must be a valid unique
25 or well-known service name. This function is useful only for messages
26 to send on direct connections as for connections to bus brokers the
27 broker will fill in the destination field anyway, and the sender field
28 set by original sender is ignored.
29
31 On success, these calls return 0 or a positive integer. On failure,
32 these calls return a negative errno-style error code.
33
35 Returned errors may indicate the following problems:
36
37 -EINVAL
38 A specified parameter is invalid.
39
40 -EPERM
41 The message is already sealed.
42
43 -EEXIST
44 The message already has a destination or sender field set.
45
47 These APIs are implemented as a shared library, which can be compiled
48 and linked to with the libsystemd pkg-config(1) file.
49
51 systemd(1), sd-bus(3), sd_bus_new(3), sd_bus_set_sender(3)
52
53
54
55systemd 239 SD_BUS_MESSAGE_SET_DESTINATION(3)