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