SD-BUS(3) sd-bus SD-BUS(3)

.SH "NAME" sd-bus - A lightweight D-Bus IPC client library

.SH "SYNOPSIS"

```
#include <systemd/sd-bus.h>
```

.HP 912u

**pkg-config --cflags --libs libsystemd**

.SH "DESCRIPTION"

.PP sd-bus.h is part of [**libsystemd**(3)](/man/os/systemd/libsystemd.3) and provides an implementation of a D-Bus IPC client. See **https://www.freedesktop.org/software/dbus/** for more information about D-Bus IPC.

.PP See

[**sd\_bus\_add\_match**(3)](/man/os/systemd/sd_bus_add_match.3),

[**sd\_bus\_add\_object**(3)](/man/os/systemd/sd_bus_add_object.3),

[**sd\_bus\_add\_object\_manager**(3)](/man/os/systemd/sd_bus_add_object_manager.3),

[**sd\_bus\_add\_object\_vtable**(3)](/man/os/systemd/sd_bus_add_object_vtable.3),

[**sd\_bus\_add\_fallback**(3)](/man/os/systemd/sd_bus_add_fallback.3),

[**sd\_bus\_add\_fallback\_vtable**(3)](/man/os/systemd/sd_bus_add_fallback_vtable.3),

[**sd\_bus\_add\_filter**(3)](/man/os/systemd/sd_bus_add_filter.3),

[**sd\_bus\_add\_node\_enumerator**(3)](/man/os/systemd/sd_bus_add_node_enumerator.3),

[**sd\_bus\_attach\_event**(3)](/man/os/systemd/sd_bus_attach_event.3),

[**sd\_bus\_call**(3)](/man/os/systemd/sd_bus_call.3),

[**sd\_bus\_call\_async**(3)](/man/os/systemd/sd_bus_call_async.3),

[**sd\_bus\_call\_method**(3)](/man/os/systemd/sd_bus_call_method.3),

[**sd\_bus\_call\_method\_async**(3)](/man/os/systemd/sd_bus_call_method_async.3),

[**sd\_bus\_can\_send**(3)](/man/os/systemd/sd_bus_can_send.3),

[**sd\_bus\_close**(3)](/man/os/systemd/sd_bus_close.3),

[**sd\_bus\_creds\_get\_pid**(3)](/man/os/systemd/sd_bus_creds_get_pid.3),

[**sd\_bus\_creds\_new\_from\_pid**(3)](/man/os/systemd/sd_bus_creds_new_from_pid.3),

[**sd\_bus\_default**(3)](/man/os/systemd/sd_bus_default.3),

[**sd\_bus\_emit\_interfaces\_added**(3)](/man/os/systemd/sd_bus_emit_interfaces_added.3),

[**sd\_bus\_emit\_interfaces\_added\_strv**(3)](/man/os/systemd/sd_bus_emit_interfaces_added_strv.3),

[**sd\_bus\_emit\_interfaces\_removed**(3)](/man/os/systemd/sd_bus_emit_interfaces_removed.3),

[**sd\_bus\_emit\_interfaces\_removed\_strv**(3)](/man/os/systemd/sd_bus_emit_interfaces_removed_strv.3),

[**sd\_bus\_emit\_object\_added**(3)](/man/os/systemd/sd_bus_emit_object_added.3),

[**sd\_bus\_emit\_object\_removed**(3)](/man/os/systemd/sd_bus_emit_object_removed.3),

[**sd\_bus\_emit\_properties\_changed**(3)](/man/os/systemd/sd_bus_emit_properties_changed.3),

[**sd\_bus\_emit\_properties\_changed\_strv**(3)](/man/os/systemd/sd_bus_emit_properties_changed_strv.3),

[**sd\_bus\_emit\_signal**(3)](/man/os/systemd/sd_bus_emit_signal.3),

[**sd\_bus\_emit\_signalv**(3)](/man/os/systemd/sd_bus_emit_signalv.3),

[**sd\_bus\_emit\_signal\_to**(3)](/man/os/systemd/sd_bus_emit_signal_to.3),

[**sd\_bus\_emit\_signal\_tov**(3)](/man/os/systemd/sd_bus_emit_signal_tov.3),

[**sd\_bus\_enqueue\_for\_read**(3)](/man/os/systemd/sd_bus_enqueue_for_read.3),

[**sd-bus-errors**(3)](/man/os/systemd/sd-bus-errors.3),

[**sd\_bus\_error**(3)](/man/os/systemd/sd_bus_error.3),

[**sd\_bus\_error\_add\_map**(3)](/man/os/systemd/sd_bus_error_add_map.3),

[**sd\_bus\_get\_address**(3)](/man/os/systemd/sd_bus_get_address.3),

[**sd\_bus\_get\_allow\_interactive\_authorization**(3)](/man/os/systemd/sd_bus_get_allow_interactive_authorization.3),

[**sd\_bus\_get\_bus\_id**(3)](/man/os/systemd/sd_bus_get_bus_id.3),

[**sd\_bus\_get\_creds\_mask**(3)](/man/os/systemd/sd_bus_get_creds_mask.3),

[**sd\_bus\_get\_current\_handler**(3)](/man/os/systemd/sd_bus_get_current_handler.3),

[**sd\_bus\_get\_current\_message**(3)](/man/os/systemd/sd_bus_get_current_message.3),

[**sd\_bus\_get\_current\_slot**(3)](/man/os/systemd/sd_bus_get_current_slot.3),

[**sd\_bus\_get\_current\_userdata**(3)](/man/os/systemd/sd_bus_get_current_userdata.3),

[**sd\_bus\_get\_exit\_on\_disconnect**(3)](/man/os/systemd/sd_bus_get_exit_on_disconnect.3),

[**sd\_bus\_get\_fd**(3)](/man/os/systemd/sd_bus_get_fd.3),

[**sd\_bus\_get\_method\_call\_timeout**(3)](/man/os/systemd/sd_bus_get_method_call_timeout.3),

[**sd\_bus\_get\_n\_queued\_read**(3)](/man/os/systemd/sd_bus_get_n_queued_read.3),

[**sd\_bus\_get\_name\_creds**(3)](/man/os/systemd/sd_bus_get_name_creds.3),

[**sd\_bus\_get\_name\_machine\_id**(3)](/man/os/systemd/sd_bus_get_name_machine_id.3),

[**sd\_bus\_get\_owner\_creds**(3)](/man/os/systemd/sd_bus_get_owner_creds.3),

[**sd\_bus\_get\_property**(3)](/man/os/systemd/sd_bus_get_property.3),

[**sd\_bus\_get\_property\_string**(3)](/man/os/systemd/sd_bus_get_property_string.3),

[**sd\_bus\_get\_property\_strv**(3)](/man/os/systemd/sd_bus_get_property_strv.3),

[**sd\_bus\_get\_property\_trivial**(3)](/man/os/systemd/sd_bus_get_property_trivial.3),

[**sd\_bus\_get\_scope**(3)](/man/os/systemd/sd_bus_get_scope.3),

[**sd\_bus\_get\_tid**(3)](/man/os/systemd/sd_bus_get_tid.3),

[**sd\_bus\_get\_unique\_name**(3)](/man/os/systemd/sd_bus_get_unique_name.3),

[**sd\_bus\_interface\_name\_is\_valid**(3)](/man/os/systemd/sd_bus_interface_name_is_valid.3),

[**sd\_bus\_is\_bus\_client**(3)](/man/os/systemd/sd_bus_is_bus_client.3),

[**sd\_bus\_is\_monitor**(3)](/man/os/systemd/sd_bus_is_monitor.3),

[**sd\_bus\_is\_open**(3)](/man/os/systemd/sd_bus_is_open.3),

[**sd\_bus\_is\_server**(3)](/man/os/systemd/sd_bus_is_server.3),

[**sd\_bus\_list\_names**(3)](/man/os/systemd/sd_bus_list_names.3),

[**sd\_bus\_message\_append**(3)](/man/os/systemd/sd_bus_message_append.3),

[**sd\_bus\_message\_append\_array**(3)](/man/os/systemd/sd_bus_message_append_array.3),

[**sd\_bus\_message\_append\_basic**(3)](/man/os/systemd/sd_bus_message_append_basic.3),

[**sd\_bus\_message\_append\_string\_memfd**(3)](/man/os/systemd/sd_bus_message_append_string_memfd.3),

[**sd\_bus\_message\_append\_strv**(3)](/man/os/systemd/sd_bus_message_append_strv.3),

[**sd\_bus\_message\_at\_end**(3)](/man/os/systemd/sd_bus_message_at_end.3),

[**sd\_bus\_message\_close\_container**(3)](/man/os/systemd/sd_bus_message_close_container.3),

[**sd\_bus\_message\_copy**(3)](/man/os/systemd/sd_bus_message_copy.3),

[**sd\_bus\_message\_dump**(3)](/man/os/systemd/sd_bus_message_dump.3),

[**sd\_bus\_message\_enter\_container**(3)](/man/os/systemd/sd_bus_message_enter_container.3),

[**sd\_bus\_message\_exit\_container**(3)](/man/os/systemd/sd_bus_message_exit_container.3),

[**sd\_bus\_message\_get\_allow\_interactive\_authorization**(3)](/man/os/systemd/sd_bus_message_get_allow_interactive_authorization.3),

[**sd\_bus\_message\_get\_cookie**(3)](/man/os/systemd/sd_bus_message_get_cookie.3),

[**sd\_bus\_message\_get\_creds**(3)](/man/os/systemd/sd_bus_message_get_creds.3),

[**sd\_bus\_message\_get\_errno**(3)](/man/os/systemd/sd_bus_message_get_errno.3),

[**sd\_bus\_message\_get\_error**(3)](/man/os/systemd/sd_bus_message_get_error.3),

[**sd\_bus\_message\_get\_monotonic\_usec**(3)](/man/os/systemd/sd_bus_message_get_monotonic_usec.3),

[**sd\_bus\_message\_get\_sender**(3)](/man/os/systemd/sd_bus_message_get_sender.3),

[**sd\_bus\_message\_get\_signature**(3)](/man/os/systemd/sd_bus_message_get_signature.3),

[**sd\_bus\_message\_get\_type**(3)](/man/os/systemd/sd_bus_message_get_type.3),

[**sd\_bus\_message\_new**(3)](/man/os/systemd/sd_bus_message_new.3),

[**sd\_bus\_message\_new\_method\_call**(3)](/man/os/systemd/sd_bus_message_new_method_call.3),

[**sd\_bus\_message\_new\_method\_error**(3)](/man/os/systemd/sd_bus_message_new_method_error.3),

[**sd\_bus\_message\_new\_signal**(3)](/man/os/systemd/sd_bus_message_new_signal.3),

[**sd\_bus\_message\_new\_signal\_to**(3)](/man/os/systemd/sd_bus_message_new_signal_to.3),

[**sd\_bus\_message\_open\_container**(3)](/man/os/systemd/sd_bus_message_open_container.3),

[**sd\_bus\_message\_peek\_type**(3)](/man/os/systemd/sd_bus_message_peek_type.3),

[**sd\_bus\_message\_read**(3)](/man/os/systemd/sd_bus_message_read.3),

[**sd\_bus\_message\_read\_array**(3)](/man/os/systemd/sd_bus_message_read_array.3),

[**sd\_bus\_message\_read\_basic**(3)](/man/os/systemd/sd_bus_message_read_basic.3),

[**sd\_bus\_message\_read\_strv**(3)](/man/os/systemd/sd_bus_message_read_strv.3),

[**sd\_bus\_message\_rewind**(3)](/man/os/systemd/sd_bus_message_rewind.3),

[**sd\_bus\_message\_seal**(3)](/man/os/systemd/sd_bus_message_seal.3),

[**sd\_bus\_message\_send**(3)](/man/os/systemd/sd_bus_message_send.3),

[**sd\_bus\_message\_sensitive**(3)](/man/os/systemd/sd_bus_message_sensitive.3),

[**sd\_bus\_message\_set\_allow\_interactive\_authorization**(3)](/man/os/systemd/sd_bus_message_set_allow_interactive_authorization.3),

[**sd\_bus\_message\_set\_destination**(3)](/man/os/systemd/sd_bus_message_set_destination.3),

[**sd\_bus\_message\_set\_expect\_reply**(3)](/man/os/systemd/sd_bus_message_set_expect_reply.3),

[**sd\_bus\_message\_set\_sender**(3)](/man/os/systemd/sd_bus_message_set_sender.3),

[**sd\_bus\_message\_skip**(3)](/man/os/systemd/sd_bus_message_skip.3),

[**sd\_bus\_message\_verify\_type**(3)](/man/os/systemd/sd_bus_message_verify_type.3),

[**sd\_bus\_negotiate\_fds**(3)](/man/os/systemd/sd_bus_negotiate_fds.3),

[**sd\_bus\_new**(3)](/man/os/systemd/sd_bus_new.3),

[**sd\_bus\_path\_encode**(3)](/man/os/systemd/sd_bus_path_encode.3),

[**sd\_bus\_pending\_method\_calls**(3)](/man/os/systemd/sd_bus_pending_method_calls.3),

[**sd\_bus\_process**(3)](/man/os/systemd/sd_bus_process.3),

[**sd\_bus\_query\_sender\_creds**(3)](/man/os/systemd/sd_bus_query_sender_creds.3),

[**sd\_bus\_query\_sender\_privilege**(3)](/man/os/systemd/sd_bus_query_sender_privilege.3),

[**sd\_bus\_reply\_method\_error**(3)](/man/os/systemd/sd_bus_reply_method_error.3),

[**sd\_bus\_reply\_method\_return**(3)](/man/os/systemd/sd_bus_reply_method_return.3),

[**sd\_bus\_request\_name**(3)](/man/os/systemd/sd_bus_request_name.3),

[**sd\_bus\_send**(3)](/man/os/systemd/sd_bus_send.3),

[**sd\_bus\_send\_to**(3)](/man/os/systemd/sd_bus_send_to.3),

[**sd\_bus\_set\_address**(3)](/man/os/systemd/sd_bus_set_address.3),

[**sd\_bus\_set\_allow\_interactive\_authorization**(3)](/man/os/systemd/sd_bus_set_allow_interactive_authorization.3),

[**sd\_bus\_set\_bus\_client**(3)](/man/os/systemd/sd_bus_set_bus_client.3),

[**sd\_bus\_set\_close\_on\_exit**(3)](/man/os/systemd/sd_bus_set_close_on_exit.3),

[**sd\_bus\_set\_connected\_signal**(3)](/man/os/systemd/sd_bus_set_connected_signal.3),

[**sd\_bus\_set\_description**(3)](/man/os/systemd/sd_bus_set_description.3),

[**sd\_bus\_set\_exit\_on\_disconnect**(3)](/man/os/systemd/sd_bus_set_exit_on_disconnect.3),

[**sd\_bus\_set\_fd**(3)](/man/os/systemd/sd_bus_set_fd.3),

[**sd\_bus\_set\_method\_call\_timeout**(3)](/man/os/systemd/sd_bus_set_method_call_timeout.3),

[**sd\_bus\_set\_monitor**(3)](/man/os/systemd/sd_bus_set_monitor.3),

[**sd\_bus\_set\_property**(3)](/man/os/systemd/sd_bus_set_property.3),

[**sd\_bus\_set\_propertyv**(3)](/man/os/systemd/sd_bus_set_propertyv.3),

[**sd\_bus\_set\_sender**(3)](/man/os/systemd/sd_bus_set_sender.3),

[**sd\_bus\_set\_server**(3)](/man/os/systemd/sd_bus_set_server.3),

[**sd\_bus\_set\_watch\_bind**(3)](/man/os/systemd/sd_bus_set_watch_bind.3)

[**sd\_bus\_slot\_get\_current\_handler**(3)](/man/os/systemd/sd_bus_slot_get_current_handler.3),

[**sd\_bus\_slot\_get\_current\_message**(3)](/man/os/systemd/sd_bus_slot_get_current_message.3),

[**sd\_bus\_slot\_get\_current\_userdata**(3)](/man/os/systemd/sd_bus_slot_get_current_userdata.3),

[**sd\_bus\_slot\_set\_description**(3)](/man/os/systemd/sd_bus_slot_set_description.3),

[**sd\_bus\_slot\_set\_destroy\_callback**(3)](/man/os/systemd/sd_bus_slot_set_destroy_callback.3),

[**sd\_bus\_slot\_set\_floating**(3)](/man/os/systemd/sd_bus_slot_set_floating.3),

[**sd\_bus\_slot\_set\_userdata**(3)](/man/os/systemd/sd_bus_slot_set_userdata.3),

[**sd\_bus\_start**(3)](/man/os/systemd/sd_bus_start.3),

[**sd\_bus\_track\_add\_name**(3)](/man/os/systemd/sd_bus_track_add_name.3),

[**sd\_bus\_track\_new**(3)](/man/os/systemd/sd_bus_track_new.3),

[**sd\_bus\_wait**(3)](/man/os/systemd/sd_bus_wait.3)

for more information about the functions available.

.PP The [**busctl**(1)](/man/os/systemd/busctl.1) tool makes the functionality implemented by sd-bus available from the command line.

.SH "NOTES"

.PP Functions described here are available as a shared library, which can be compiled against and linked to with the **libsystemd** [**pkg-config**(1)](/man/os/systemd/pkg-config.1) file.

.PP The code described here uses [**getenv**(3)](/man/os/systemd/getenv.3), which is declared to be not multi-thread-safe. This means that the code calling the functions described here must not call [**setenv**(3)](/man/os/systemd/setenv.3) from a parallel thread. It is recommended to only do calls to **setenv()** from an early phase of the program when no other threads have been started.

.SH "SEE ALSO"

.PP [**systemd**(1)](/man/os/systemd/systemd.1), [**sd-event**(3)](/man/os/systemd/sd-event.3), [**busctl**(1)](/man/os/systemd/busctl.1), [**sd-varlink**(3)](/man/os/systemd/sd-varlink.3), [**dbus-daemon**(1)](/man/os/systemd/dbus-daemon.1), [**dbus-send**(1)](/man/os/systemd/dbus-send.1), [**pkg-config**(1)](/man/os/systemd/pkg-config.1)

systemd 262.2

---

Document: sd-bus(3) from systemd 262.2-r1 (Chainguard OS)
Source: https://github.com/systemd/systemd
