1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<refentry id="kdbus_fs">
<refentryinfo>
<title>kdbus.fs</title>
<productname>kdbus.fs</productname>
</refentryinfo>
<refmeta>
<refentrytitle>kdbus.fs</refentrytitle>
<manvolnum>7</manvolnum>
</refmeta>
<refnamediv>
<refname>kdbus.fs</refname>
<refpurpose>kdbus file system</refpurpose>
</refnamediv>
<refsect1>
<title>File-system Layout</title>
<para>
The <emphasis>kdbusfs</emphasis> pseudo filesystem provides access to
kdbus entities, such as <emphasis>buses</emphasis> and
<emphasis>endpoints</emphasis>. Each time the filesystem is mounted,
a new, isolated kdbus instance is created, which is independent from the
other instances.
</para>
<para>
The system-wide standard mount point for <emphasis>kdbusfs</emphasis> is
<constant>/sys/fs/kdbus</constant>.
</para>
<para>
Buses are represented as directories in the file system layout, whereas
endpoints are exposed as files inside these directories. At the top-level,
a <emphasis>control</emphasis> node is present, which can be opened to
create new buses via the <constant>KDBUS_CMD_BUS_MAKE</constant> ioctl.
Each <emphasis>bus</emphasis> shows a default endpoint called
<varname>bus</varname>, which can be opened to either create a connection
with the <constant>KDBUS_CMD_HELLO</constant> ioctl, or to create new
custom endpoints for the bus with
<constant>KDBUS_CMD_ENDPOINT_MAKE</constant>. See
<citerefentry>
<refentrytitle>kdbus.bus</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>kdbus.connection</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry> and
<citerefentry>
<refentrytitle>kdbus.endpoint</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>
for more details.
</para>
<para>Following, you can see an example layout of the
<emphasis>kdbusfs</emphasis> filesystem:</para>
<programlisting>
/sys/fs/kdbus/ ; mount-point
|-- 0-system ; bus directory
| |-- bus ; default endpoint
| `-- 1017-custom ; custom endpoint
|-- 1000-user ; bus directory
| |-- bus ; default endpoint
| |-- 1000-service-A ; custom endpoint
| `-- 1000-service-B ; custom endpoint
`-- control ; control file
</programlisting>
</refsect1>
<refsect1>
<title>Mounting instances</title>
<para>
In order to get a new and separate kdbus environment, a new instance
of <emphasis>kdbusfs</emphasis> can be mounted like this:
</para>
<programlisting>
# mount -t kdbusfs kdbusfs /tmp/new_kdbus/
</programlisting>
</refsect1>
<refsect1>
<title>See Also</title>
<simplelist type="inline">
<member>
<citerefentry>
<refentrytitle>kdbus</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>
</member>
<member>
<citerefentry>
<refentrytitle>kdbus.bus</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>
</member>
<member>
<citerefentry>
<refentrytitle>kdbus.connection</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>
</member>
<member>
<citerefentry>
<refentrytitle>kdbus.endpoint</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>
</member>
<member>
<citerefentry>
<refentrytitle>mount</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>
</member>
</simplelist>
</refsect1>
</refentry>
|