Closed some TODOs in kdbus.item and lots of reformatting.
Signed-off-by: Daniel Mack <daniel@zonque.org>
<title>Description</title>
<para>
- A bus is a resource that is shared between connections in order to transmit
- messages (see <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>).
+ A bus is a resource that is shared between connections in order to
+ transmit messages (see
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ ).
Each bus is independent and operations on the bus will not have any
effect on other buses. A bus is a management entity, that controls the
addresses of its connections, their policies and message transactions
<para>
Each bus is bound to the mount instance it was created on. It has a
custom name that is unique across all buses of a domain. In
- <citerefentry><refentrytitle>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
- a bus is presented as a directory. No operations can be performed on
+ <citerefentry>
+ <refentrytitle>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ , a bus is presented as a directory. No operations can be performed on
the bus itself; instead you need to perform the operations on an endpoint
associated with the bus. Endpoints are accessible as files underneath the
bus directory. A default endpoint called "bus" is provided on each bus.
entire bus and all its associated resources and endpoints. Every control
file descriptor can only be used to create a single new bus; from that
point on, it is not used for any further communication until the final
- <citerefentry><refentrytitle>close</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>close</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
.
</para>
<para>
- Each bus will generate a random, 128-bit UUID upon creation. This UUID will be
- returned to creators of connections through kdbus_cmd_hello.id128 and can
- be used by userspace to uniquely identify buses, even across different machines
- or containers. The UUID will have its variant bits set to 'DCE', and denote
- version 4 (random). For more details on UUIDs, see
+ Each bus will generate a random, 128-bit UUID upon creation. This UUID
+ will be returned to creators of connections through
+ <varname>kdbus_cmd_hello.id128</varname> and can be used by userspace to
+ uniquely identify buses, even across different machines or containers. The
+ UUID will have its variant bits set to '<constant>DCE</constant>', and
+ denote version 4 (random). For more details on UUIDs, see
<ulink url="https://en.wikipedia.org/wiki/Universally_unique_identifier">
the Wikipedia entry on UUIDs</ulink>.
</para>
<listitem>
<para>
The following items (see
- <citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
- are expected for <constant>KDBUS_CMD_BUS_MAKE</constant>.
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ ) are expected for <constant>KDBUS_CMD_BUS_MAKE</constant>.
</para>
<variablelist>
<varlistentry>
<type>struct kdbus_bloom_parameter</type>. These settings are
copied back to new connections verbatim. This item is
mandatory. See
- <citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for a more detailed description of this item.
</para>
</listitem>
<varlistentry>
<term><constant>KDBUS_ITEM_ATTACH_FLAGS_RECV</constant></term>
<listitem>
- <para>An optional item that contains a set of required attach
- flags that connections must allow. This item is used as a negotiation
- measure during connection creation. If connections do not satisfy
- the bus requirements, they are not allowed on the bus.
- If not set, the bus does not require any metadata to be attached;
- in this case connections are free to set their own attach flags.
+ <para>
+ An optional item that contains a set of required attach flags
+ that connections must allow. This item is used as a
+ negotiation measure during connection creation. If connections
+ do not satisfy the bus requirements, they are not allowed on
+ the bus. If not set, the bus does not require any metadata to
+ be attached; in this case connections are free to set their
+ own attach flags.
</para>
</listitem>
</varlistentry>
<para>
Unrecognized items are rejected, and the ioctl will fail with
- errno set to <constant>EINVAL</constant>.
+ <varname>errno</varname> set to <constant>EINVAL</constant>.
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<simplelist type="inline">
- <member><citerefentry><refentrytitle>kdbus</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>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus</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>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
</simplelist>
</refsect1>
</refentry>
connections on the bus. However, in order to receive any broadcast
messages, clients must subscribe to the specific messages they are
interested in (see
- <citerefentry><refentrytitle>kdbus.match</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.match</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
).
</para>
<para>
<emphasis>well-known names</emphasis>, under which they can be found and
addressed by other bus clients. A well-known name is associated with one
and only one connection at a time. See
- <citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
on name acquisition, the name registry, and the validity of names.
</para>
<para>
<title>Creating connections</title>
<para>
A connection to a bus is created by opening an endpoint file (see
- <citerefentry><refentrytitle>kdbus.endpoint</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
- of a bus and becoming an active client with the <constant>KDBUS_CMD_HELLO</constant>
- ioctl. Every connection has a unique identifier on the bus and can address
- messages to every other connection on the same bus by using the peer's
- connection ID as the destination.
+ <citerefentry>
+ <refentrytitle>kdbus.endpoint</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ ) of a bus and becoming an active client with the
+ <constant>KDBUS_CMD_HELLO</constant> ioctl. Every connection has a unique
+ identifier on the bus and can address messages to every other connection
+ on the same bus by using the peer's connection ID as the destination.
</para>
<para>
The KDBUS_CMD_HELLO ioctl takes the following struct as argument.
by the sender and that are requested by the receiver will be attached
to the message. Note, however, that the bus may optionally require
some of those bits to be set. If the match fails, the ioctl will fail
- with errno set to <constant>-ECONNREFUSED</constant>.
- In either case, when returning the field will be set to the mask of
- metadata items that are enforced by the bus with the
- <constant>KDBUS_FLAGS_KERNEL</constant> bit set as well.
+ with <varname>errno</varname> set to
+ <constant>ECONNREFUSED</constant>. In either case, when returning the
+ field will be set to the mask of metadata items that are enforced by
+ the bus with the <constant>KDBUS_FLAGS_KERNEL</constant> bit set as
+ well.
</para></listitem>
</varlistentry>
<listitem><para>
Request the attachment of metadata for each message received by this
connection. See
- <citerefentry><refentrytitle>kdbus</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for information about metadata, and
- <citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
regarding items in general.
</para></listitem>
</varlistentry>
<listitem><para>
The size of the communication pool, in bytes. The pool can be
accessed by calling
- <citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>mmap</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
on the file descriptor that was used to issue the
<constant>KDBUS_CMD_HELLO</constant> ioctl.
</para>
<para>
See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for further information.
</para></listitem>
</varlistentry>
<para>
For activators and policy holders only, combinations of
these two items describe policy access entries. See
- <citerefentry><refentrytitle>kdbus.policy</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.policy</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for further details.
</para>
</listitem>
<para>
Unrecognized items are rejected, and the ioctl will fail with
- errno set to <constant>EINVAL</constant>.
+ <varname>errno</varname> set to <constant>EINVAL</constant>.
</para>
</listitem>
</varlistentry>
<para>
The offset in the pool has to be freed with the
<constant>KDBUS_CMD_FREE</constant> ioctl. See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for further information.
</para>
</refsect1>
<listitem><para>
Specifies which metadata items should be attached to the answer.
See
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
</para></listitem>
</varlistentry>
<listitem><para>
When the ioctl returns, this field will contain the offset of the
connection information inside the caller's pool. See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for futher information.
</para></listitem>
</varlistentry>
<listitem><para>
The kernel will return the size of the returned information, so applications
can optionally
- <citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>mmap</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
specific parts of the pool. See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for futher information.
</para></listitem>
</varlistentry>
</variablelist>
<para>
Unrecognized items are rejected, and the ioctl will fail with
- errno set to <constant>EINVAL</constant>.
+ <varname>errno</varname> set to <constant>EINVAL</constant>.
</para>
</listitem>
</varlistentry>
Once the caller is finished with parsing the return buffer, it needs to
employ the <constant>KDBUS_CMD_FREE</constant> command for the offset, in
order to free the buffer part. See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for futher information.
</para>
</refsect1>
it did so.
</para>
<para>
- In response to this call, a slice in the connection's pool is allocated and
- filled with an object of type <type>struct kdbus_info</type>,
+ In response to this call, a slice in the connection's pool is allocated
+ and filled with an object of type <type>struct kdbus_info</type>,
pointed to by the ioctl's <varname>offset</varname> field.
</para>
Once the caller is finished with parsing the return buffer, it needs to
employ the <constant>KDBUS_CMD_FREE</constant> command for the offset, in
order to free the buffer part. See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for futher information.
</para>
</refsect1>
<para>
Policy holder connections may supply a new set of policy
information with these items. For other connection types,
- <constant>EOPNOTSUPP</constant> is returned in errno.
+ <constant>EOPNOTSUPP</constant> is returned in
+ <varname>errno</varname>.
</para>
</listitem>
</varlistentry>
<para>
Unrecognized items are rejected, and the ioctl will fail with
- errno set to <constant>EINVAL</constant>.
+ <varname>errno</varname> set to <constant>EINVAL</constant>.
</para>
</listitem>
</varlistentry>
<title>Termination of connections</title>
<para>
A connection can be terminated by simply calling
- <citerefentry><refentrytitle>close</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>close</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
on its file descriptor. All pending incoming messages will be discarded,
and the memory allocated by the pool will be freed.
</para>
An alternative way of closing down a connection is via the
<constant>KDBUS_CMD_BYEBYE</constant> ioctl. This ioctl will succeed only
if the message queue of the connection is empty at the time of closing;
- otherwise, the ioctl will fail with errno set to
+ otherwise, the ioctl will fail with <varname>errno</varname> set to
<constant>EBUSY</constant> is returned. When this ioctl returns
successfully, the connection has been terminated and won't accept any new
messages from remote peers. This way, a connection can be terminated
<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.endpoint</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.items</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
+ <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.endpoint</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.items</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
</simplelist>
</refsect1>
</refentry>
<para>
Endpoints are entry points to a bus (see
- <citerefentry><refentrytitle>kdbus.bus</refentrytitle><manvolnum>7</manvolnum></citerefentry>).
+ <citerefentry>
+ <refentrytitle>kdbus.bus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ ).
By default, each bus has a default
endpoint called 'bus'. The bus owner has the ability to create custom
- endpoints with specific names, permissions, and policy databases (see below).
- An endpoint is presented as file underneath the directory of the parent bus.
+ endpoints with specific names, permissions, and policy databases
+ (see below). An endpoint is presented as file underneath the directory
+ of the parent bus.
</para>
<para>
- To create a custom endpoint, open the default endpoint ('bus') and use the
- KDBUS_CMD_ENDPOINT_MAKE ioctl with "struct kdbus_cmd_make". Custom endpoints
- always have a policy database that, by default, forbids any operation. You have
- to explicitly install policy entries to allow any operation on this endpoint.
+ To create a custom endpoint, open the default endpoint
+ (<constant>bus</constant>) and use the
+ <constant>KDBUS_CMD_ENDPOINT_MAKE</constant> ioctl with
+ <type>struct kdbus_cmd_make</type>. Custom endpoints
+ always have a policy database that, by default, forbids any operation.
+ You have to explicitly install policy entries to allow any operation on
+ this endpoint.
</para>
<para>
- Once KDBUS_CMD_ENDPOINT_MAKE succeeded, the new endpoint will appear in the
- filesystem
- (<citerefentry><refentrytitle>kdbus.bus</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
- and the used file descriptor will manage the
- newly created endpoint resource. It cannot be used to manage further resources
- and must be kept open as long as the endpoint is needed. The endpoint will be
- terminated as soon as the file descriptor is closed.
+ Once <constant>KDBUS_CMD_ENDPOINT_MAKE</constant> succeeded, the new
+ endpoint will appear in the filesystem (
+ <citerefentry>
+ <refentrytitle>kdbus.bus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ ), and the used file descriptor will manage the
+ newly created endpoint resource. It cannot be used to manage further
+ resources and must be kept open as long as the endpoint is needed. The
+ endpoint will be terminated as soon as the file descriptor is closed.
</para>
<para>
- Endpoint names may be chosen freely except for one restriction: the name must
- be prefixed with the numeric effective UID of the creator and a dash. This is
- required to avoid namespace clashes between different users. When creating an
- endpoint, the name that is passed in must be properly formatted or the kernel
- will refuse creation of the endpoint. Example: "1047-foobar" is an acceptable
- name for an endpoint registered by a user with UID 1047. However,
- "1024-my-endpoint" is not, and neither is "my-endpoint". The UID must be
- provided in the user-namespace of the parent domain.
+ Endpoint names may be chosen freely except for one restriction: the name
+ must be prefixed with the numeric effective UID of the creator and a dash.
+ This is required to avoid namespace clashes between different users. When
+ creating an endpoint, the name that is passed in must be properly
+ formatted or the kernel will refuse creation of the endpoint. Example:
+ <constant>"1047-foobar"</constant> is an acceptable name for an endpoint
+ registered by a user with UID 1047. However,
+ <constant>"1024-my-endpoint</constant> is not, and neither is
+ <constant>"my-endpoint"</constant>. The UID must be provided in the
+ user-namespace of the bus.
</para>
<para>
- To create connections to a bus, use KDBUS_CMD_HELLO on a file descriptor returned by
- <citerefentry><refentrytitle>open</refentrytitle><manvolnum>2</manvolnum></citerefentry>
- on an endpoint node.
- See <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ To create connections to a bus, use <constant>KDBUS_CMD_HELLO</constant>
+ on a file descriptor returned by
+ <citerefentry>
+ <refentrytitle>open</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ on an endpoint node. See
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for further details.
</para>
</refsect1>
To create a new endpoint, the
<constant>KDBUS_CMD_ENDPOINT_MAKE</constant> command is used. Along with
the endpoint's name, which will be used to expose the endpoint in the
- <citerefentry><refentrytitle>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry>
+ <refentrytitle>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>,
the command also optionally takes items to set up the endpoint's
- <citerefentry><refentrytitle>kdbus.policy</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.policy</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ .
<constant>KDBUS_CMD_ENDPOINT_MAKE</constant> takes a
<type>struct kdbus_cmd_make</type> argument.
</para>
<para>
These items are used to set the policy attached to the
endpoint. For more details on bus and endpoint policies, see
- <citerefentry><refentrytitle>kdbus.policy</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.policy</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
Unrecognized items are rejected, and the ioctl will fail with
- errno set to <varname>EINVAL</varname>.
+ <varname>errno</varname> set to <varname>EINVAL</varname>.
</para>
</listitem>
</varlistentry>
<para>
These items are used to set the policy attached to the
endpoint. For more details on bus and endpoint policies, see
- <citerefentry><refentrytitle>kdbus.policy</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.policy</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
Existing policy is atomically replaced with the new rules
provided.
</para>
<term><constant>EPERM</constant></term>
<listitem><para>
The calling user is not privileged. See
- <citerefentry><refentrytitle>kdbus</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for information about privileged users.
</para></listitem>
</varlistentry>
<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.endpoint</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
+ <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.endpoint</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
</simplelist>
</refsect1>
</refentry>
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>
+ <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>
<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>
+ <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>
<type>struct kdbus_item</type> can be attached to the structs passed
into the ioctls. Some ioctls make items of certain types mandatory,
others are optional. Items that are unsupported by ioctls they are
- attached to will cause the ioctl to fail with errno set to
- <errorname>EINVAL</errorname>.
+ attached to will cause the ioctl to fail with <varname>errno</varname>
+ set to <errorname>EINVAL</errorname>.
Items are also used for information stored in a connection's
<emphasis>pool</emphasis>, such as received messages, name lists or
requested connection or bus owner information. Depending on the type of
<para>
The kernel expects all items to be aligned to 8-byte boundaries.
Unaligned items will cause the ioctl they are used with to fail
- with errno set to <constant>EINVAL</constant>. An item that has an
- unaligned size itself hence needs to be padded if it is followed by
- another item.
+ with <varname>errno</varname> set to <constant>EINVAL</constant>.
+ An item that has an unaligned size itself hence needs to be padded
+ if it is followed by another item.
</para>
</refsect2>
<listitem><para>
Messages are directly copied by the sending process into the
receiver's
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
This way, two peers can exchange data by effectively doing a
single-copy from one process to another; the kernel will not buffer
the data anywhere else. <constant>KDBUS_ITEM_PAYLOAD_VEC</constant>
<constant>KDBUS_ITEM_PAYLOAD_OFF</constant> is used when messages
are <emphasis>received</emphasis>, and the <constant>offset</constant>
value describes the offset inside the receiving connection's
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
where the message payload can be found.
See
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on passing of payload data along with a
message.
<programlisting>
the memfd that was specified when it was created. The
<varname>start</varname> parameter denotes the offset inside the
memfd at which the referenced payload starts. See
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on passing of payload data along with a
message.
<programlisting>
filedescriptor.
In either case, the number of entries in the array is derived from
the item's total size. See
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information.
</para></listitem>
</varlistentry>
writing to it. The file descriptor is stored in
<varname>item.fd[0]</varname>. The item may only contain one
filedescriptor. See
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on this item and how to use it.
</para></listitem>
</varlistentry>
<varlistentry>
<term><constant>KDBUS_ITEM_BLOOM_PARAMETER</constant></term>
- <listitem><para>TODO
+ <listitem><para>
+ Contains a set of <emphasis>bloom parameters</emphasis> as
+ <type>struct kdbus_bloom_parameter</type> in
+ <varname>item.bloom_parameter</varname>.
+ The item is passed from userspace to kernel during the
+ <constant>KDBUS_CMD_BUS_MAKE</constant> ioctl, and returned
+ verbatim when <constant>KDBUS_CMD_HELLO</constant> is called.
+ The kernel does not use the bloom parameters, but they need to
+ be known by each connection on the bus in order to define the
+ bloom filter hash details. See
+ <citerefentry>
+ <refentrytitle>kdbus.match</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ for more information on matching and bloom filters.
<programlisting>
struct kdbus_bloom_parameter {
__u64 size;
<varlistentry>
<term><constant>KDBUS_ITEM_BLOOM_FILTER</constant></term>
- <listitem><para>TODO
+ <listitem><para>
+ Carries a <emphasis>bloom filter</emphasis> as
+ <type>struct kdbus_bloom_filter</type> in
+ <varname>item.bloom_filter</varname>. It is mandatory to send this
+ item attached to a <type>struct kdbus_msg</type>, in case the
+ message is a signal. This item is never transported from kernel to
+ userspace. See
+ <citerefentry>
+ <refentrytitle>kdbus.match</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ for more information on matching and bloom filters.
<programlisting>
struct kdbus_bloom_filter {
__u64 generation;
<varlistentry>
<term><constant>KDBUS_ITEM_BLOOM_MASK</constant></term>
- <listitem><para>TODO
+ <listitem><para>
+ Transports a <emphasis>bloom mask</emphasis> as binary data blob
+ stored in <varname>item.data</varname>. This item is used to
+ describe a match into a connection's match database. See
+ <citerefentry>
+ <refentrytitle>kdbus.match</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ for more information on matching and bloom filters.
</para></listitem>
</varlistentry>
message to, as null-terminated string in
<varname>item.str</varname>. This item is used with
<constant>KDBUS_CMD_SEND</constant>. See
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on how to send a message.
</para></listitem>
</varlistentry>
<varlistentry>
<term><constant>KDBUS_ITEM_MAKE_NAME</constant></term>
- <listitem><para>TODO
+ <listitem><para>
+ Contains a <emphasis>bus name</emphasis> or
+ <emphasis>endpoint name</emphasis>, stored as null-terminated
+ string in <varname>item.str</varname>. This item is sent from
+ userspace to kernel when buses or endpoints are created, and
+ returned back to userspace when the bus creator information is
+ queried. See
+ <citerefentry>
+ <refentrytitle>kdbus.bus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ and
+ <citerefentry>
+ <refentrytitle>kdbus.endpoint</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
</para></listitem>
</varlistentry>
<listitem><para>
Contains a set of <emphasis>attach flags</emphasis> at
<emphasis>send</emphasis> or <emphasis>receive</emphasis> time. See
- <citerefentry><refentrytitle>kdbus</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>kdbus.bus</refentrytitle><manvolnum>7</manvolnum></citerefentry> and
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>,
+ <citerefentry>
+ <refentrytitle>kdbus.bus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry> and
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on attach flags.
</para></listitem>
</varlistentry>
<type>struct kdbus_name</type> in
<varname>item.name</varname>. The <varname> flags</varname>
contains the flags of the name. See
- <citerefentry><refentrytitle>kdbus.name</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.name</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on how to access the name registry of a bus.
<programlisting>
struct kdbus_name {
<para>
All metadata is automatically translated into the
<emphasis>namespaces</emphasis> of the task that receives them. See
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information.
</para>
<listitem><para>
This item describes a <emphasis>policy access</emphasis> entry to
access the policy database of a
- <citerefentry><refentrytitle>kdbus.bus</refentrytitle><manvolnum>7</manvolnum></citerefentry> or
- <citerefentry><refentrytitle>kdbus.endpoint</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.bus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry> or
+ <citerefentry>
+ <refentrytitle>kdbus.endpoint</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
Please refer to
- <citerefentry><refentrytitle>kdbus.policy</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.policy</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on the policy database and how to access it.
<programlisting>
struct kdbus_policy_access {
</varlistentry>
<varlistentry>
- <term><constant>KDBUS_ITEM_NAME_ADD</constant></term>
- <term><constant>KDBUS_ITEM_NAME_REMOVE</constant></term>
- <term><constant>KDBUS_ITEM_NAME_CHANGE</constant></term>
- <listitem><para>TODO
+ <term><constant>KDBUS_ITEM_ID_ADD</constant></term>
+ <term><constant>KDBUS_ITEM_ID_REMOVE</constant></term>
+ <listitem><para>
+ This item is sent as attachment to a
+ <emphasis>kernel notification</emphasis> and indicates that a
+ new connection was created on the bus, or that a connection was
+ disconnected, respectively. It stores a
+ <type>struct kdbus_notify_id_change</type> in
+ <varname>item.id_change</varname>.
+ The <varname>id</varname> field contains the numeric ID of the
+ connection that was added or removed, and <varname>flags</varname>
+ is set to the connection flags, as passed by
+ <constant>KDBUS_CMD_HELLO</constant>.
+ See
+ <citerefentry>
+ <refentrytitle>kdbus.match</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ and
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ for more information on matches and notification messages.
<programlisting>
-struct kdbus_notify_name_change {
- struct kdbus_notify_id_change old_id;
- struct kdbus_notify_id_change new_id;
- char name[0];
+struct kdbus_notify_id_change {
+ __u64 id;
+ __u64 flags;
};
</programlisting>
</para></listitem>
</varlistentry>
<varlistentry>
- <term><constant>KDBUS_ITEM_ID_ADD</constant></term>
- <term><constant>KDBUS_ITEM_ID_REMOVE</constant></term>
- <listitem><para>TODO
+ <term><constant>KDBUS_ITEM_NAME_ADD</constant></term>
+ <term><constant>KDBUS_ITEM_NAME_REMOVE</constant></term>
+ <term><constant>KDBUS_ITEM_NAME_CHANGE</constant></term>
+ <listitem><para>
+ This item is sent as attachment to a
+ <emphasis>kernel notification</emphasis> and indicates that a
+ <emphasis>well-known name</emphasis> appeared, disappeared or
+ transferred to another owner on the bus. It stores a
+ <type>struct kdbus_notify_name_change</type> in
+ <varname>item.name_change</varname>.
+ <varname>old_id</varname> describes the former owner of the name
+ and is set to <constant>0</constant> values in case of
+ <constant>KDBUS_ITEM_NAME_ADD</constant>.
+ <varname>new_id</varname> describes the new owner of the name and
+ is set to <constant>0</constant> values in case of
+ <constant>KDBUS_ITEM_NAME_REMOVE</constant>.
+ See
+ <citerefentry>
+ <refentrytitle>kdbus.match</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ and
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ for more information on matches and notification messages.
<programlisting>
-struct kdbus_notify_id_change {
- __u64 id;
- __u64 flags;
+struct kdbus_notify_name_change {
+ struct kdbus_notify_id_change old_id;
+ struct kdbus_notify_id_change new_id;
+ char name[0];
};
</programlisting>
</para></listitem>
<varlistentry>
<term><constant>KDBUS_ITEM_REPLY_TIMEOUT</constant></term>
- <listitem><para>TODO
+ <listitem><para>
+ This item is sent as attachment to a
+ <emphasis>kernel notification</emphasis>. It informs the receiver
+ that an expected reply to a message was not received in time.
+ The remote peer ID and the message cookie is stored in the message
+ header. See
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ for more information about messages, timeouts and notifications.
</para></listitem>
</varlistentry>
<varlistentry>
<term><constant>KDBUS_ITEM_REPLY_DEAD</constant></term>
- <listitem><para>TODO
+ <listitem><para>
+ This item is sent as attachment to a
+ <emphasis>kernel notification</emphasis>. It informs the receiver
+ that a remote connection a reply is expected from was disconnected
+ before that reply was sent. The remote peer ID and the message
+ cookie is stored in the message header. See
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ for more information about messages, timeouts and notifications.
</para></listitem>
</varlistentry>
</variablelist>
<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>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
+ <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>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
</simplelist>
</refsect1>
the connection, no broadcast message or kernel-side notifications will be
delivered to the connection. Broadcast messages are subject to policy
rules and TALK access checks - see
- <citerefentry><refentrytitle>kdbus.policy</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.policy</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details on implicit policies.
</para>
<para>
Matches for messages from other connections (not kernel notifications) are
- implemented as bloom filters. The sender adds certain properties of the message
- as elements to a bloom filter bit field, and sends that along with the
- broadcast message.
+ implemented as bloom filters. The sender adds certain properties of the
+ message as elements to a bloom filter bit field, and sends that along with
+ the broadcast message.
- The connection adds the message properties it is interested as elements to a
- bloom mask bit field, and uploads the mask to the match rules of the
+ The connection adds the message properties it is interested as elements to
+ a bloom mask bit field, and uploads the mask to the match rules of the
connection.
The kernel will match the broadcast message's bloom filter against the
<para>
The kernel has no notion of any specific properties of the message, all it
sees are the bit fields of the bloom filter and mask to match against. The
- use of bloom filters allows simple and efficient matching, without exposing
- any message properties or internals to the kernel side. Clients need to deal
- with the fact that they might receive broadcasts which they did not subscribe
- to, as the bloom filter might allow false-positives to pass the filter.
-
- To allow the future extension of the set of elements in the bloom filter, the
- filter specifies a "generation" number. A later generation must always contain
- all elements of the set of the previous generation, but can add new elements
- to the set. The match rules mask can carry an array with all previous
- generations of masks individually stored. When the filter and mask are matched
- by the kernel, the mask with the closest matching "generation" is selected
- as the index into the mask array.
+ use of bloom filters allows simple and efficient matching, without
+ exposing any message properties or internals to the kernel side. Clients
+ need to deal with the fact that they might receive broadcasts which they
+ did not subscribe to, as the bloom filter might allow false-positives to
+ pass the filter.
+
+ To allow the future extension of the set of elements in the bloom filter,
+ the filter specifies a "generation" number. A later generation must always
+ contain all elements of the set of the previous generation, but can add
+ new elements to the set. The match rules mask can carry an array with all
+ previous generations of masks individually stored. When the filter and
+ mask are matched by the kernel, the mask with the closest matching
+ "generation" is selected as the index into the mask array.
</para>
</refsect1>
<title>Matches for kernel notifications</title>
<para>
To receive kernel generated notifications (see
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
), a connection must install special match rules that are different from
the bloom filter matches described in the section above. They can be
filtered by a sender connection's ID, by one of the name the sender
To add a match, the <constant>KDBUS_CMD_MATCH_ADD</constant> ioctl is
used, which takes a struct of the struct described below.
- Note that each of the items attached to this command will internally create
- one match 'rule', and the collection of them, which is submitted as one block
- via the ioctl, is called a 'match'. To allow a message to pass, all rules of a
- match have to be satisfied. Hence, adding more items to the command will only
- narrow the possibility of a match to effectively let the message pass, and will
- decrease the chance that the connection's userspace process wil be woken up.
-
- Multiple matches can be installed per connection. As long as one of it has a
- set of rules which allows the message to pass, this one will be decisive.
+ Note that each of the items attached to this command will internally
+ create one match <emphasis>rule</emphasis>, and the collection of them,
+ which is submitted as one block via the ioctl, is called a
+ <emphasis>match</emphasis>. To allow a message to pass, all rules of a
+ match have to be satisfied. Hence, adding more items to the command will
+ only narrow the possibility of a match to effectively let the message
+ pass, and will decrease the chance that the connection's userspace process
+ wil be woken up.
+
+ Multiple matches can be installed per connection. As long as one of it has
+ a set of rules which allows the message to pass, this one will be
+ decisive.
</para>
<programlisting>
<para>
Unrecognized items are rejected, and the ioctl will fail with
- errno set to <constant>-EINVAL</constant>.
+ <varname>errno</varname> set to <constant>-EINVAL</constant>.
</para>
</listitem>
</varlistentry>
<para>
Refer to
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on message types.
</para>
</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.match</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
+ <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.match</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
</simplelist>
</refsect1>
</refentry>
executed as SYNC call, the passed in file descriptor can be
used as alternative cancellation point. The kernel will call
poll()
- <citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>poll</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
on this file descriptor, and if it reports any incoming
bytes, the blocking send operation will be canceled, and the
call will return <errorcode>-1</errorcode> and
<varname>errno</varname> will be set to
<errorname>ECANCELED</errorname>. Any type of file descriptor
on which
- <citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>poll</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
can be called on can be used as payload to this item.
For asynchronous message sending, this item is allowed but
ignored.
connection, the activator is notified and will start an
implementer. This flag inhibits that behavior. With this bit
set, and the remote being an activator, the ioctl will fail
- with errno set to <constant>EADDRNOTAVAIL</constant>.
+ with <varname>errno</varname> set to
+ <constant>EADDRNOTAVAIL</constant>.
</para>
</listitem>
</varlistentry>
If the message sent requires a reply from the remote peer (see above),
this field contains the timeout in absolute nanoseconds based on
<constant>CLOCK_MONOTONIC</constant>. Also see
- <citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>clock_gettime</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>.
</para></listitem>
</varlistentry>
<varname>dst_id</varname> is set to
<constant>KDBUS_DST_ID_NAME</constant>.
If a connection holding the given name can't be found,
- the ioctl will fail with errno set to
- <constant>-ESRCH</constant> is returned.
+ the ioctl will fail with <varname>errno</varname> set to
+ <constant>ESRCH</constant> is returned.
</para>
<para>
- For messages to a unique name (ID), this item is optional. If present,
- the kernel will make sure the name owner matches the given unique name.
- This allows userspace tie the message sending to the condition that a
- name is currently owned by a certain unique name.
+ For messages to a unique name (ID), this item is optional. If
+ present, the kernel will make sure the name owner matches the
+ given unique name. This allows userspace tie the message
+ sending to the condition that a name is currently owned by a
+ certain unique name.
</para>
</listitem>
</varlistentry>
<para>
The message will be augmented by the requested metadata items when
queued into the receiver's pool. See
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry> and
- <citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ and
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on metadata.
</para>
</refsect1>
</para>
<para>
See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information.
</para>
priority, starting with the highest value. Also, messages will be
filtered by the value given in this field, so the returned message
will at least have the requested priority. If no such message is
- waiting in the queue, the ioctl will fail, and errno will be set to
- <constant>ENOMSG</constant>.
+ waiting in the queue, the ioctl will fail, and
+ <varname>errno</varname> will be set to <constant>ENOMSG</constant>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>dropped_msgs</varname></term>
<listitem><para>
- If the <constant>CMD_RECV</constant> ioctl fails with errno set to
- <constant>EOVERFLOW</constant>, this field is filled by
- the kernel with the number of messages that couldn't be transmitted
- to this receiving connection. In that case, the
- <varname>offset</varname> member must not be accessed.
+ If the <constant>CMD_RECV</constant> ioctl fails with
+ <varname>errno</varname> set to <constant>EOVERFLOW</constant>, this
+ field is filled by the kernel with the number of messages that
+ couldn't be transmitted to this receiving connection. In that case,
+ the <varname>offset</varname> member must not be accessed.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>offset</varname></term>
<listitem><para>
- Upon return of the ioctl, this field contains the offset in the receiver's
- memory pool. The memory must be freed with
+ Upon return of the ioctl, this field contains the offset in the
+ receiver's memory pool. The memory must be freed with
<constant>KDBUS_CMD_FREE</constant>. See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for further details.
</para></listitem>
</varlistentry>
<type>struct kdbus_msg</type> object plus all appended VECs.
You can use it in combination with <varname>offset</varname> to map
a single message, instead of mapping the entire pool. See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for further details.
</para></listitem>
</varlistentry>
The supplied kdbus memfd file cannot be sealed or the seal
was removed, because it is shared with other processes or
still mapped with
- <citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>mmap</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>.
</para></listitem>
</varlistentry>
<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>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.items</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>ioctl</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>select</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>epoll</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
+ <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>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.items</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>clock_gettime</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>ioctl</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>poll</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>select</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>epoll</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
</simplelist>
</refsect1>
</refentry>
<title>Description</title>
<para>
Each
- <citerefentry><refentrytitle>kdbus.bus</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.bus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
instantiates a name registry to resolve well-known names into unique
connection IDs for message delivery. The registry will be queried when a
message is sent with <varname>kdbus_msg.dst_id</varname> set to
<para>
All of the below is subject to policy rules for SEE and OWN permissions.
See
- <citerefentry><refentrytitle>kdbus.policy</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.policy</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information.
</para>
</refsect1>
</para>
<itemizedlist mark='opencircle'>
- <listitem><para>
- The name has two or more elements separated by a period ('.') character
- </para></listitem>
- <listitem><para>
- All elements must contain at least one character
- </para></listitem>
- <listitem><para>
- Each element must only contain the ASCII characters "[A-Z][a-z][0-9]_"
- and must not begin with a digit
- </para></listitem>
- <listitem><para>
- The name must contain at least one '.' (period) character
- (and thus at least two elements)
- </para></listitem>
- <listitem><para>
- The name must not begin with a '.' (period) character
- </para></listitem>
- <listitem><para>
- The name must not exceed KDBUS_NAME_MAX_LEN (255)
- </para></listitem>
+ <listitem>
+ <para>
+ The name has two or more elements separated by a
+ <constant>.'</constant> (period) character.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ All elements must contain at least one character.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Each element must only contain the ASCII characters
+ <constant>[A-Z][a-z][0-9]_"</constant> and must not begin with a
+ digit.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The name must contain at least one <constant>.</constant> (period)
+ character (and thus at least two elements)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The name must not begin with a <constant>.</constant> (period)
+ character
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The name must not exceed <constant>255</constant> characters in
+ length.
+ </para>
+ </listitem>
</itemizedlist>
</refsect1>
<constant>KDBUS_NAME_ALLOW_REPLACEMENT</constant> (see below)
was set when the current owner of the name acquired it, or
if the current owner is an activator connection (see
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>).
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>).
</para>
</listitem>
</varlistentry>
for the name, the first one in the queue (the oldest entry) will become
the new owner. The same happens implicitly for all names once a
connection terminates. See
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on connections.
</para>
<para>
The <constant>KDBUS_CMD_NAME_RELEASE</constant> ioctl uses the same data
- structure as the acquisition call (<constant>KDBUS_CMD_NAME_ACQUIRE</constant>),
+ structure as the acquisition call
+ (<constant>KDBUS_CMD_NAME_ACQUIRE</constant>),
but with slightly different field usage.
</para>
</para>
<para>
Unrecognized items are rejected, and the ioctl will fail with
- errno set to <constant>-EINVAL</constant>.
+ <varname>errno</varname> set to <constant>EINVAL</constant>.
</para>
</listitem>
</varlistentry>
implementer, which is started on demand by userspace as soon
as the first message arrives. There's some more information
on this topic in
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
.
</para>
<para>
</variablelist>
<para>
- The returned buffer must be freed with the KDBUS_CMD_FREE ioctl when the user
- is finished with it. See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ The returned buffer must be freed with the
+ <constant>KDBUS_CMD_FREE</constant> ioctl when the user is finished with
+ it. See
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information.
</para>
</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.items</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
+ <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.items</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
</simplelist>
</refsect1>
</refentry>
<term><constant>KDBUS_CMD_HELLO</constant></term>
<listitem><para>
When creating, or updating, a policy holder connection. See
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
</para></listitem>
</varlistentry>
<term><constant>KDBUS_CMD_ENDPOINT_UPDATE</constant></term>
<listitem><para>
When creating, or updating, a bus custom endpoint. See
- <citerefentry><refentrytitle>kdbus.endpoint</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.endpoint</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
</para></listitem>
</varlistentry>
</variablelist>
<para>
Names passed in items of type <constant>KDBUS_ITEM_NAME</constant> must
comply to the rules of valid kdbus names. See
- <citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information.
The payload of an item of type
<constant>KDBUS_ITEM_POLICY_ACCESS</constant> is defined by the following
struct. For more information on the layout of items, please refer to
- <citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
</para>
<programlisting>
All endpoints of buses have an empty policy database by default.
Therefore, unless policy rules are added, all operations will also be
denied by default. Also see
- <citerefentry><refentrytitle>kdbus.endpoint</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.endpoint</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
</para>
</refsect1>
<para>
The policy database is overruled when action is taken by a privileged
connection. Please refer to
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more information on what makes a connection privileged.
</para>
</refsect1>
<refsect1>
<title>TALK access and multiple well-known names per connection</title>
<para>
- Note that TALK access is checked against all names of a connection.
- For example, if a connection owns both 'org.foo.bar' and 'org.blah.baz', and
- the policy database allows 'org.blah.baz' to be talked to by WORLD, then this
- permission is also granted to 'org.foo.bar'. That might sound illogical, but
- after all, we allow messages to be directed to either the ID or a well-known
- name, and policy is applied to the connection, not the name. In other words,
- the effective TALK policy for a connection is the most permissive of all names
- the connection owns.
-
- For broadcast messages, the receiver needs TALK permissions to the sender to
- receive the broadcast.
+ Note that TALK access is checked against all names of a connection. For
+ example, if a connection owns both <constant>'org.foo.bar'</constant> and
+ <constant>'org.blah.baz'</constant>, and the policy database allows
+ <constant>'org.blah.baz'</constant> to be talked to by WORLD, then this
+ permission is also granted to <constant>'org.foo.bar'</constant>. That
+ might sound illogical, but after all, we allow messages to be directed to
+ either the ID or a well-known name, and policy is applied to the
+ connection, not the name. In other words, the effective TALK policy for a
+ connection is the most permissive of all names the connection owns.
+
+ For broadcast messages, the receiver needs TALK permissions to the sender
+ to receive the broadcast.
</para>
<para>
Both the endpoint and the bus policy databases are consulted to allow
name registry listing, owning a well-known name and message delivery.
- If either one fails, the operation is failed with errno set to
- <constant>EPERM</constant>.
+ If either one fails, the operation is failed with
+ <varname>errno</varname> set to <constant>EPERM</constant>.
For best practices, connections that own names with a restricted TALK
access should not install matches. This avoids cases where the sent
satisfy the policy rules.
Also see
- <citerefentry><refentrytitle>kdbus.match</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.match</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
</para>
</refsect1>
<itemizedlist>
<listitem>
<para>
- Policy rules are always enforced, even if the connection is a privileged
- connection.
+ Policy rules are always enforced, even if the connection is a
+ privileged connection.
</para>
</listitem>
<listitem>
<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.endpoint</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
+ <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.endpoint</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
</simplelist>
</refsect1>
</refentry>
<para>
Memory is the pool is read-only for userspace and may only be written
to by the kernel. To read from the pool memory, the caller is expected to
- <citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>mmap</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
the buffer into its task, like this:
</para>
<programlisting>
* item field when the KDBUS_CMD_HELLO ioctl returned.
*/
-buf = mmap(NULL, POOL_SIZE, PROT_READ, MAP_SHARED, conn_fd, 0);
+uint8_t *buf = mmap(NULL, POOL_SIZE, PROT_READ, MAP_SHARED, conn_fd, 0);
</programlisting>
<para>
the one that was used to create the <emphasis>connection</emphasis>
In other words, the one that was used to call
<constant>KDBUS_CMD_HELLO</constant>. See
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
Pool slices are allocated by the kernel in order to report information
back to a userspace task, such as messages, returned name list etc.
Allocation of pool slices cannot be initiated by userspace. See
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry> and
- <citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ and
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for examples of commands that use the <emphasis>pool</emphasis> to
return data.
</para>
<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>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>munmap</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
+ <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>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>mmap</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>munmap</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
</simplelist>
</refsect1>
</refentry>
distinguish between different bus types, they are all handled the same
way.
See
- <citerefentry><refentrytitle>kdbus.bus</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.bus</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
additional policy which can be used to create sandboxes with
locked-down, limited, filtered access to a bus.
See
- <citerefentry><refentrytitle>kdbus.endpoint</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.endpoint</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
connection has a unique identifier on the bus and can address messages
to every other connection on the same bus by using the peer's
connection ID as the destination. See
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
It is never used to send anything to the kernel. In order to access that
memory, a userspace application must mmap() it into its address space.
See
- <citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
<refsect2>
<title>Well-known Name</title>
- <para>A connection can, in addition to its implicit unique connection ID, request
- the ownership of a textual well-known name. Well-known names are noted in
- reverse-domain notation, such as com.example.service1. A connection that
- offers a service on a bus is usually reached by its well-known name. The
- analogy of connection ID and well-known name is an IP address and a DNS
- name associated with that address.
- See
- <citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <para>
+ A connection can, in addition to its implicit unique connection ID,
+ request the ownership of a textual well-known name. Well-known names are
+ noted in reverse-domain notation, such as com.example.service1. A
+ connection that offers a service on a bus is usually reached by its
+ well-known name. The analogy of connection ID and well-known name is an
+ IP address and a DNS name associated with that address. See
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
<title>Message</title>
<para>
Connections can exchange messages with other connections by addressing
- the peers with their connection ID or well-known name. A message consists
- of a message header with information on how to route the message, and the
- message payload, which is a logical byte stream of arbitrary size.
- Messages can carry additional file descriptors to be passed from one
- connection to another, just like passing file descriptors over UNIX domain
- sockets. Every connection can specify which set of metadata the kernel
- should attach to the message when it is delivered to the receiving
- connection. Metadata contains information like: system timestamps, UID, GID,
- TID, proc-starttime, well-known names, process comm, process exe, process
- argv, cgroup, capabilities, seclabel, audit session, loginuid and the
- connection's human-readable name.
- See
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ the peers with their connection ID or well-known name. A message
+ consists of a message header with information on how to route the
+ message, and the message payload, which is a logical byte stream of
+ arbitrary size. Messages can carry additional file descriptors to be
+ passed from one connection to another, just like passing file
+ descriptors over UNIX domain sockets. Every connection can specify which
+ set of metadata the kernel should attach to the message when it is
+ delivered to the receiving connection. Metadata contains information
+ like: system timestamps, UID, GID, TID, proc-starttime, well-known
+ names, process comm, process exe, process argv, cgroup, capabilities,
+ seclabel, audit session, loginuid and the connection's human-readable
+ name. See
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
returned by most ioctls, and stored inside data structures in the
connection's pool.
See
- <citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
<title>Broadcast, signal, filter, match</title>
<para>
Signals are messages that a receiver opts in for by installing a blob of
- bytes, called a 'match'. Signal messages must always carry a counter-part
- blob, called a 'filter', and signals are only delivered to peers which have
- a match that whitelists the message's filter.
- Senders of signal messages can use either a single connection ID as
- receiver, or KDBUS_DST_ID_BROADCAST to potentially send it to all
- connections of a bus, following the logic described above.
- See
- <citerefentry><refentrytitle>kdbus.match</refentrytitle><manvolnum>7</manvolnum></citerefentry> and
- <citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ bytes, called a 'match'. Signal messages must always carry a
+ counter-part blob, called a 'filter', and signals are only delivered to
+ peers which have a match that whitelists the message's filter. Senders
+ of signal messages can use either a single connection ID as receiver, or
+ KDBUS_DST_ID_BROADCAST to potentially send it to all connections of a
+ bus, following the logic described above. See
+ <citerefentry>
+ <refentrytitle>kdbus.match</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ and
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
<refsect2>
<title>Policy</title>
<para>
- A policy is a set of rules that define which connections can see, talk to,
- or register a well-known name on the bus. A policy is attached to buses and
- custom endpoints, and modified by policy holder connections or owners of
- custom endpoints.
- See
- <citerefentry><refentrytitle>kdbus.policy</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ A policy is a set of rules that define which connections can see, talk
+ to, or register a well-known name on the bus. A policy is attached to
+ buses and custom endpoints, and modified by policy holder connections or
+ owners of custom endpoints. See
+ <citerefentry>
+ <refentrytitle>kdbus.policy</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
<refsect2>
<title>Privileged bus users</title>
<para>
- A user connecting to the bus is considered privileged if it is either the
- creator of the bus, or if it has the CAP_IPC_OWNER capability flag set.
- See
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ A user connecting to the bus is considered privileged if it is either
+ the creator of the bus, or if it has the CAP_IPC_OWNER capability flag
+ set. See
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for more details.
</para>
</refsect2>
<refsect1>
<title>The ioctl interface</title>
- <para>kdbus exposes its functions exclusively through
- <citerefentry><refentrytitle>ioctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <para>
+ kdbus exposes its functions exclusively through
+ <citerefentry>
+ <refentrytitle>ioctl</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
through file descriptors returned by
- <citerefentry><refentrytitle>open</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>open</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
on pseudo files exposed by
- <citerefentry><refentrytitle>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
+ <citerefentry>
+ <refentrytitle>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>.
</para>
<para>
Following is a list of all the ioctls.
<refsect1>
<title>Bus Layout</title>
- <para>A bus
- (<citerefentry><refentrytitle>kdbus.bus</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
- provides and defines an environment that peers can connect to
- for message interchange. A bus is created via the kdbus
- control interface and can be modified by the bus creator. It
- applies the policy that control all bus operations. The bus
- creator itself does not participate as a peer.
- To establish a peer connection
- (<citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
- you have to open one of the endpoints
- (<citerefentry><refentrytitle>kdbus.endpoint</refentrytitle><manvolnum>7</manvolnum></citerefentry>)
- of a bus. Each bus provides a default endpoint, but further
- endpoints can be created on-demand. Endpoints are used to apply
- additional policies for all connections on this endpoint. Thus,
- they provide additional filters to further restrict access of
+ <para>
+ A <emphasis>bus</emphasis> provides and defines an environment that peers
+ can connect to for message interchange. A bus is created via the kdbus
+ control interface and can be modified by the bus creator. It applies the
+ policy that control all bus operations. The bus creator itself does not
+ participate as a peer. To establish a peer
+ <emphasis>connection</emphasis>, you have to open one of the
+ <emphasis>endpoints</emphasis> of a bus. Each bus provides a default
+ endpoint, but further endpoints can be created on-demand. Endpoints are
+ used to apply additional policies for all connections on this endpoint.
+ Thus, they provide additional filters to further restrict access of
specific connections to the bus.
</para>
</para></listitem>
<listitem><para>
- When a message is sent (<constant>KDBUS_CMD_SEND</constant>), information
- about the sending task and the sending connection are collected.
- This metadata will be attached to the message when it arrives in the
- receiver's pool. If the connection sending the message installed faked
- credentials (see
- <citerefentry><refentrytitle>kdbus.connection</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
+ When a message is sent (<constant>KDBUS_CMD_SEND</constant>),
+ information about the sending task and the sending connection are
+ collected. This metadata will be attached to the message when it
+ arrives in the receiver's pool. If the connection sending the message
+ installed faked credentials (see
+ <citerefentry>
+ <refentrytitle>kdbus.connection</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>),
the message will not be augmented by any information about the
currently sending task.
</para></listitem>
<para>
Please refer to
- <citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
for detailed information about the layout and payload of items and
what metadata should be used to.
</para>
<refsect1>
<title>See Also</title>
<simplelist type="inline">
- <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>kdbus.fs</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.item</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.message</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.names</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>kdbus.pool</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>ioctl</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>open</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
- <member><citerefentry><refentrytitle>close</refentrytitle><manvolnum>2</manvolnum></citerefentry></member>
- <member><ulink url="http://freedesktop.org/wiki/Software/dbus">D-Bus</ulink></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>kdbus.fs</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.item</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.message</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.names</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>kdbus.pool</refentrytitle>
+ <manvolnum>7</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>ioctl</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>mmap</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>open</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <citerefentry>
+ <refentrytitle>close</refentrytitle>
+ <manvolnum>2</manvolnum>
+ </citerefentry>
+ </member>
+ <member>
+ <ulink url="http://freedesktop.org/wiki/Software/dbus">D-Bus</ulink>
+ </member>
</simplelist>
</refsect1>