sd_bus_negotiate_fds, sd_bus_negotiate_timestamps, sd_bus_negotiate_creds — Control feature negotiation on bus connections
sd_bus_negotiate_fds() controls whether
file descriptor passing shall be negotiated for the specified bus
connection. It takes a bus object and a boolean, which, when true,
enables file descriptor passing, and, when false, disables it. Note
that not all transports and servers support file descriptor
passing. To find out whether file descriptor passing is available
after negotiation, use
SD_BUS_TYPE_UNIX_FD. Note that file
descriptor passing is always enabled for both sending and
receiving or for neither, but never only in one direction. By
default, file descriptor passing is negotiated for all
Note that when bus activation is used, it is highly
recommended to set the
setting in the
.busname unit file to the same
setting as negotiated by the program ultimately activated. By
default, file descriptor passing is enabled for both.
whether implicit sender timestamps shall be attached automatically
to all incoming messages. Takes a bus object and a boolean, which,
when true, enables timestamping, and, when false, disables it. If
this is disabled,
-ENODATA on incoming messages. Note
that not all transports support timestamping of messages. On local
transports, the timestamping is applied by the kernel and cannot be
manipulated by userspace.
whether implicit sender credentials shall be attached
automatically to all incoming messages. Takes a bus object and a
bit mask value, which controls which credential parameters are
attached. If this is not used,
-ENODATA on incoming
messages. Note that not all transports support attaching sender
credentials to messages, or do not support all types of sender
credential parameters. On local transports, the sender credentials
are attached by the kernel and cannot be manipulated by
userspace. By default, no sender credentials are attached.
These functions may be called only before the connection has been started with sd_bus_start(3).
On success, these functions returns 0 or a positive integer. On failure, they return a negative errno-style error code.
Returned errors may indicate the following problems:
The bus connection has already been started.
sd_bus_negotiate_fs() and the other
functions described here are available as a shared library, which
can be compiled and linked to with the