]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_bus_set_connected_signal.xml
man: mention vlan devices inherit the MAC address of the physical interface
[thirdparty/systemd.git] / man / sd_bus_set_connected_signal.xml
CommitLineData
514094f9 1<?xml version='1.0'?>
d97eac36
LP
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5<!--
6 SPDX-License-Identifier: LGPL-2.1+
d97eac36
LP
7-->
8
7647c01d
LP
9<refentry id="sd_bus_set_connected_signal"
10 xmlns:xi="http://www.w3.org/2001/XInclude">
d97eac36
LP
11
12 <refentryinfo>
13 <title>sd_bus_set_connected_signal</title>
14 <productname>systemd</productname>
d97eac36
LP
15 </refentryinfo>
16
17 <refmeta>
18 <refentrytitle>sd_bus_set_connected_signal</refentrytitle>
19 <manvolnum>3</manvolnum>
20 </refmeta>
21
22 <refnamediv>
23 <refname>sd_bus_set_connected_signal</refname>
24 <refname>sd_bus_get_connected_signal</refname>
25
26 <refpurpose>Control emmission of local connection establishment signal on bus connections</refpurpose>
27 </refnamediv>
28
29 <refsynopsisdiv>
30 <funcsynopsis>
31 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
32
33 <funcprototype>
34 <funcdef>int <function>sd_bus_set_connected_signal</function></funcdef>
35 <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
36 <paramdef>int <parameter>b</parameter></paramdef>
37 </funcprototype>
38
39 <funcprototype>
40 <funcdef>int <function>sd_bus_get_connected_signal</function></funcdef>
41 <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
42 </funcprototype>
43
44 </funcsynopsis>
45 </refsynopsisdiv>
46
47 <refsect1>
48 <title>Description</title>
49
50 <para><function>sd_bus_set_connected_signal()</function> may be used to control whether a local, synthetic
51 <function>Connected()</function> signal message shall be generated and enqueued for dispatching when the connection
52 is fully established. If the <parameter>b</parameter> parameter is zero the message is not generated (the default),
53 otherwise it is generated.</para>
54
55 <para><function>sd_bus_get_connected_signal()</function> may be used to query whether this feature is enabled. It
56 returns zero if not, positive otherwise.</para>
57
58 <para>The <function>Connected()</function> signal message is generated from the
59 <literal>org.freedesktop.DBus.Local</literal> service and interface, and
60 <literal>/org/freedesktop/DBus/Local</literal> object path. Use
61 <citerefentry><refentrytitle>sd_bus_match_signal_async</refentrytitle><manvolnum>3</manvolnum></citerefentry> to
62 match on this signal.</para>
63
64 <para>This message is particularly useful on slow transports where connections take a long time to be
65 established. This is especially the case when
66 <citerefentry><refentrytitle>sd_bus_set_watch_bind</refentrytitle><manvolnum>3</manvolnum></citerefentry> is
67 used. The signal is generated when the
68 <citerefentry><refentrytitle>sd_bus_is_ready</refentrytitle><manvolnum>3</manvolnum></citerefentry> returns
69 positive for the first time.</para>
70
71 <para>The <function>Connected()</function> signal corresponds with the <function>Disconnected()</function> signal
72 that is synthesized locally when the connection is terminated. The latter is generated unconditionally however,
73 unlike the former which needs to be enabled explicitly before it is generated, with
74 <function>sd_bus_set_connected_signal()</function>.</para>
75 </refsect1>
76
77 <refsect1>
78 <title>Return Value</title>
79
80 <para>On success, these functions return 0 or a positive integer. On failure, they return a negative errno-style
81 error code.</para>
82 </refsect1>
83
84 <refsect1>
85 <title>Errors</title>
86
87 <para>Returned errors may indicate the following problems:</para>
88
89 <variablelist>
90 <varlistentry>
91 <term><constant>-ECHILD</constant></term>
92
93 <listitem><para>The bus connection has been created in a different process.</para></listitem>
94 </varlistentry>
95 </variablelist>
96 </refsect1>
97
7647c01d 98 <xi:include href="libsystemd-pkgconfig.xml" />
d97eac36
LP
99
100 <refsect1>
101 <title>See Also</title>
102
103 <para>
104 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
105 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
106 <citerefentry><refentrytitle>sd_bus_match_signal_async</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
107 <citerefentry><refentrytitle>sd_bus_set_watch_bind</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
108 <citerefentry><refentrytitle>sd_bus_is_ready</refentrytitle><manvolnum>3</manvolnum></citerefentry>
109 </para>
110 </refsect1>
111
112</refentry>