doc: annotate more strings, break more lines ... upstream upstream/0.20150129.081441utc
authorDaniel Mack <daniel@zonque.org>
Wed, 28 Jan 2015 23:14:41 +0000 (00:14 +0100)
committerDaniel Mack <daniel@zonque.org>
Wed, 28 Jan 2015 23:14:41 +0000 (00:14 +0100)
Signed-off-by: Daniel Mack <daniel@zonque.org>
doc/kdbus.connection.xml
doc/kdbus.item.xml
doc/kdbus.message.xml
doc/kdbus.names.xml
doc/kdbus.pool.xml
doc/kdbus.xml

index 270eccaa41447aa278b4c5f9ec47e9dc1e9e56d8..666cbe4a837e86e15e9e708d45f42dff2c9ade50 100644 (file)
       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.
+      The <constant>KDBUS_CMD_HELLO</constant> ioctl takes a <type>struct
+      kdbus_cmd_hello</type> as argument.
     </para>
 
     <programlisting>
index 9f8ed9c2f858a1c6365413b030e69fd9d54f709b..3222ae19193e324096b21e61d489e79765353a1e 100644 (file)
@@ -500,36 +500,33 @@ struct kdbus_pids {
         <varlistentry>
           <term><constant>KDBUS_ITEM_TID_COMM</constant> [*]</term>
           <listitem><para>
-            Contains the <emphasis>comm</emphasis> of a task's
-            <emphasis>TID</emphasis>, stored as null-terminated string in
-            <varname>item.str</varname>. Its length can also be derived from
-            the item's total size.
-            Receivers of this item should not use its contents for any kind
-            of security measures. See below.
+            Contains the <emphasis>comm</emphasis> string of a task's
+            <emphasis>TID</emphasis> (thread ID), stored as null-terminated
+            string in <varname>item.str</varname>. Its length can also be
+            derived from the item's total size.  Receivers of this item should
+            not use its contents for any kind of security measures. See below.
           </para></listitem>
         </varlistentry>
 
         <varlistentry>
           <term><constant>KDBUS_ITEM_PID_COMM</constant> [*]</term>
           <listitem><para>
-            Contains the <emphasis>comm</emphasis> of a task's
-            <emphasis>PID</emphasis>, stored as null-terminated string in
-            <varname>item.str</varname>. Its length can also be derived from
-            the item's total size.
-            Receivers of this item should not use its contents for any kind
-            of security measures. See below.
+            Contains the <emphasis>comm</emphasis> string of a task's
+            <emphasis>PID</emphasis> (process ID), stored as null-terminated
+            string in <varname>item.str</varname>. Its length can also be
+            derived from the item's total size.  Receivers of this item should
+            not use its contents for any kind of security measures. See below.
           </para></listitem>
         </varlistentry>
 
         <varlistentry>
           <term><constant>KDBUS_ITEM_EXE</constant> [*]</term>
           <listitem><para>
-            Contains the <emphasis>path to the executable</emphasis> of a
-            task, stored as null-terminated string in
-            <varname>item.str</varname>. Its length can also be derived from
-            the item's total size.
-            Receivers of this item should not use its contents for any kind
-            of security measures. See below.
+            Contains the <emphasis>path to the executable</emphasis> of a task,
+            stored as null-terminated string in <varname>item.str</varname>. Its
+            length can also be derived from the item's total size.  Receivers of
+            this item should not use its contents for any kind of security
+            measures. See below.
           </para></listitem>
         </varlistentry>
 
@@ -719,6 +716,8 @@ struct kdbus_notify_id_change {
             <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>.
+            The <varname>name</varname> field contains the well-known name the
+            notification is about, as null-terminated string.
             See
             <citerefentry>
               <refentrytitle>kdbus.match</refentrytitle>
index 7a9f9f1d2be16161a039df7fe7761c52011cdddc..d33c00a6bcb4f5128a64c8a258950a9db2fc166a 100644 (file)
@@ -68,18 +68,25 @@ struct kdbus_cmd_send {
               <listitem>
                 <para>
                   By default, all calls to kdbus are considered asynchronous,
-                  non-blocking. However, as there are many use cases that need to wait
-                  for a remote peer to answer a method call, there's a way to send a
-                  message and wait for a reply in a synchronous fashion. This is what
-                  the KDBUS_SEND_SYNC_REPLY controls. The KDBUS_CMD_SEND ioctl will block
-                  until the reply has arrived, the timeout limit is reached, in case the
-                  remote connection was shut down, or if interrupted by a signal before
-                  any reply; see signal(7).
-
-                  The offset of the reply message in the sender's pool is stored in in
-                  'offset_reply' when the ioctl has returned without error. Hence, there
-                  is no need for another KDBUS_CMD_RECV ioctl or anything else to receive
-                  the reply.
+                  non-blocking. However, as there are many use cases that need
+                  to wait for a remote peer to answer a method call, there's a
+                  way to send a message and wait for a reply in a synchronous
+                  fashion. This is what the
+                  <constant>KDBUS_SEND_SYNC_REPLY</constant> controls.  The
+                  <constant>KDBUS_CMD_SEND</constant> ioctl will block until the
+                  reply has arrived, the timeout limit is reached, in case the
+                  remote connection was shut down, or if interrupted by a signal
+                  before any reply; see
+                  <citerefentry>
+                    <refentrytitle>signal</refentrytitle>
+                    <manvolnum>7</manvolnum>
+                  </citerefentry>.
+
+                  The offset of the reply message in the sender's pool is stored
+                  in in <varname>offset_reply</varname> when the ioctl has
+                  returned without error. Hence, there is no need for another
+                  <constant>KDBUS_CMD_RECV</constant> ioctl or anything else to
+                  receive the reply.
                 </para>
               </listitem>
             </varlistentry>
@@ -501,9 +508,10 @@ struct kdbus_msg {
     <title>Receiving messages</title>
 
     <para>
-      Messages are received by the client with the KDBUS_CMD_RECV ioctl.
-      The endpoint file of the bus supports <emphasis>poll/epoll/select</emphasis>
-      to wake up the receiving process when new messages are queued up to be received.
+      Messages are received by the client with the
+      <constant>KDBUS_CMD_RECV</constant> ioctl.  The endpoint file of the bus
+      supports <function>poll()/epoll()/select()</function> to wake up the
+      receiving process when new messages are queued up to be received.
     </para>
 
     <para>
@@ -740,14 +748,23 @@ struct kdbus_msg_info {
     </para>
 
     <itemizedlist mark='opencircle'>
-      <listitem><para>kdbus_msg.src_id == <constant>KDBUS_SRC_ID_KERNEL</constant></para></listitem>
-      <listitem><para>kdbus_msg.dst_id == <constant>KDBUS_DST_ID_BROADCAST</constant></para></listitem>
-      <listitem><para>kdbus_msg.payload_type == <constant>KDBUS_PAYLOAD_KERNEL</constant></para></listitem>
-      <listitem><para>Has exactly one of the aforementioned items attached</para></listitem>
+      <listitem><para>
+          kdbus_msg.src_id == <constant>KDBUS_SRC_ID_KERNEL</constant>
+      </para></listitem>
+      <listitem><para>
+        kdbus_msg.dst_id == <constant>KDBUS_DST_ID_BROADCAST</constant>
+      </para></listitem>
+      <listitem>
+        <para>kdbus_msg.payload_type == <constant>KDBUS_PAYLOAD_KERNEL</constant>
+      </para></listitem>
+      <listitem><para>
+        Has exactly one of the aforementioned items attached
+      </para></listitem>
     </itemizedlist>
 
     <para>
-      Kernel notifications have an item of type KDBUS_ITEM_TIMESTAMP attached.
+      Kernel notifications have an item of type
+      <constant>KDBUS_ITEM_TIMESTAMP</constant> attached.
     </para>
 
     <para>
index 5736bd0c17ca879082f611049c762dea17f1e681..1a28fb01c9cf0e518cc7d928a0c60b98a8121aaf 100644 (file)
@@ -227,21 +227,10 @@ struct kdbus_cmd_name {
     <programlisting>
 struct kdbus_cmd_name {
   __u64 size;
-    The overall size of this struct, including the null-terminated name string.
-
   __u64 flags;
-    Flags to the command. Currently unused and must be zero.
-
   __u64 kernel_flags;
-    Valid flags for this command, returned by the kernel upon each call.
-
   __u64 return_flags;
-    Flags returned by the kernel. Currently unused and always set to zero by
-    the kernel.
-
   struct kdbus_item items[0];
-    Items to submit the name. Currently, one item of type KDBUS_ITEM_NAME is
-    expected and allowed, and the contained string must be a valid bus name.
 };
     </programlisting>
 
index 8fa2a86d12b789252712bec5388e427ffaa7b11b..de222f2b4bbc52ae14bdab3634df102d61bad008 100644 (file)
@@ -28,7 +28,7 @@
       <constant>KDBUS_ITEM_BLOOM_PARAMETER</constant> item that is returned by
       <constant>KDBUS_CMD_HELLO</constant>. Internally, the pool is segmented
       into <emphasis>slices</emphasis>, each referenced by its
-      <emphasis>offset</emphasis> in the pool.
+      <emphasis>offset</emphasis> in the pool, expressed in <type>bytes</type>.
     </para>
 
     <para>
@@ -108,7 +108,7 @@ uint8_t *buf = mmap(NULL, POOL_SIZE, PROT_READ, MAP_SHARED, conn_fd, 0);
     <para>
       Alternatively, instead of mapping the entire pool buffer, only parts
       of it can be mapped. Every kdbus command that returns an
-      <emphasis> offset</emphasis> (see above) also reports a
+      <emphasis>offset</emphasis> (see above) also reports a
       <emphasis>size</emphasis> along with it, so userspace can be written
       in a way that it only maps portions of the part to access a specific
       <emphasis>slice</emphasis>.
index 2b85b5d2a87d3e5660272d38974cf8bff381a1c3..a64d4e67743a76c8ea265beaa38ff298b45fcc6e 100644 (file)
         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
+        <constant>KDBUS_DST_ID_BROADCAST</constant> to potentially send it to
+        all connections of a bus, following the logic described above.  See
         <citerefentry>
           <refentrytitle>kdbus.match</refentrytitle>
           <manvolnum>7</manvolnum>