SD_BUS_MESSAGE_SET_DESTINATION(3)

  .SH "NAME" sd_bus_message_set_destination, sd_bus_message_set_sender - Set the destination or sender service name of a bus message
  .SH "SYNOPSIS"

#include <systemd/sd-bus.h>

      .HP u int sd_bus_message_set_destination(sd_bus_message *message, const char *destination);
      .HP u int sd_bus_message_set_sender(sd_bus_message *message, const char *sender);

  .SH "DESCRIPTION"

    .PP sd_bus_message_set_destination() sets the destination service name for the specified bus message object. The specified name must be a valid unique or well-known service name.
    .PP sd_bus_message_set_sender() sets the sender service name for the specified bus message object. The specified name must be a valid unique or well-known service name. This function is useful only for messages to send on direct connections as for connections to bus brokers the broker will fill in the destination field anyway, and the sender field set by original sender is ignored.

  .SH "RETURN VALUE"

    .PP On success, these calls return 0 or a positive integer. On failure, these calls return a negative errno-style error code.

  .SH "ERRORS"

    .PP Returned errors may indicate the following problems:

      .PP -EINVAL

            A specified parameter is invalid.
          .RE
          .PP -EPERM

                The message is already sealed.
              .RE
              .PP -EEXIST

                    The message already has a destination or sender field set.
                  .RE

              .SH "NOTES"

                .PP The sd_bus_message_set_destination() and sd_bus_message_set_sender() interfaces are available as a shared library, which can be compiled and linked to with the libsystemd pkg-config(1) file.

              .SH "SEE ALSO"

                .PP systemd(1), sd-bus(3), sd_bus_new(3), sd_bus_set_sender(3)