2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id=
"sd_bus_can_send"
7 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
10 <title>sd_bus_can_send
</title>
11 <productname>systemd
</productname>
15 <refentrytitle>sd_bus_can_send
</refentrytitle>
16 <manvolnum>3</manvolnum>
20 <refname>sd_bus_can_send
</refname>
22 <refpurpose>Check which types can be sent over a bus object
</refpurpose>
27 <funcsynopsisinfo>#include
<systemd/sd-bus.h
></funcsynopsisinfo>
30 <funcdef>void
<function>sd_bus_can_send
</function></funcdef>
31 <paramdef>sd_bus *
<parameter>bus
</parameter></paramdef>
32 <paramdef>char
<parameter>type
</parameter></paramdef>
38 <title>Description
</title>
40 <para><function>sd_bus_can_send()
</function> is mostly used for checking if file descriptor
41 passing is available on the given bus.
<parameter>type
</parameter> can be any of the
42 <constant>SD_BUS_TYPE
</constant> constants.
</para>
46 <title>Return Value
</title>
48 <para>On failure,
<function>sd_bus_can_send()
</function> returns a negative errno-style error
49 code. If values of the given type can be sent over the given bus, it returns a positive integer.
50 Otherwise, it returns zero.
</para>
55 <para>Returned errors may indicate the following problems:
</para>
59 <term><constant>-ENOPKG
</constant></term>
61 <listitem><para>The bus object
<parameter>bus
</parameter> could not be resolved.
</para>
63 <xi:include href=
"version-info.xml" xpointer=
"v246"/>
68 <term><constant>-ENOTCONN
</constant></term>
70 <listitem><para>The input parameter
<parameter>bus
</parameter> is
71 <constant>NULL
</constant> or the bus is not connected.
</para>
73 <xi:include href=
"version-info.xml" xpointer=
"v246"/></listitem>
77 <term><constant>-ECHILD
</constant></term>
79 <listitem><para>The bus object
<parameter>bus
</parameter> was created in a different
82 <xi:include href=
"version-info.xml" xpointer=
"v246"/></listitem>
88 <xi:include href=
"libsystemd-pkgconfig.xml" />
91 <title>History
</title>
92 <para><function>sd_bus_can_send()
</function> was added in version
246.
</para>
96 <title>See Also
</title>
99 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
100 <citerefentry><refentrytitle>sd-bus
</refentrytitle><manvolnum>3</manvolnum></citerefentry>