Browse Source

ctl Updating documentation

Olle E. Johansson 12 years ago
parent
commit
5919b3b6c4
4 changed files with 68 additions and 59 deletions
  1. 56 47
      modules/ctl/README
  2. 12 12
      modules/ctl/doc/ctl.xml
  3. 0 0
      modules/ctl/doc/ctl_params.xml
  4. 0 0
      modules/ctl/doc/ctl_rpc.xml

+ 56 - 47
modules/ctl/README

@@ -1,4 +1,4 @@
-1. Ctl Module
+The Ctl Module
 
 
 Andrei Pelinescu-Onciul
 Andrei Pelinescu-Onciul
 
 
@@ -7,40 +7,36 @@ Andrei Pelinescu-Onciul
    Copyright © 2009 iptelorg GmbH
    Copyright © 2009 iptelorg GmbH
      __________________________________________________________________
      __________________________________________________________________
 
 
-   1.1. Overview
-   1.2. BINRPC
-   1.3. Parameters
-
-        1.3.1. binrpc (string)
-        1.3.2. mode (integer)
-        1.3.3. user (integer or string)
-        1.3.4. group (integer or string)
-        1.3.5. fifo (integer)
-        1.3.6. autoconversion (integer)
-        1.3.7. binrpc_max_body_size (integer)
-        1.3.8. binrpc_struct_max_body_size (integer)
-
-   1.4. SIP-router RPC Functions
-
-        1.4.1. ctl.listen
-        1.4.2. ctl.connections
-        1.4.3. ctl.who
-
-1.1. Overview
-
-   This module implements the binrpc transport interface for SER rpcs. It
-   supports various transports over which it speaks binrpc: Unix datagram
-   sockets, Unix stream sockets, UDP and TCP. It also supports a backward
-   compatible FIFO interface (using the old ser FIFO protocol).
-
-   By default (if no parameters are changed from the config file) it uses
-   a Unix stream socket under /tmp: /tmp/ser_ctl. This socket is also the
+   List of Examples
+
+   1. sercmd example usage
+   2. Set binrpc parameter
+   3. Set mode parameter
+   4. Set user parameter
+   5. Set group parameter
+   6. Set fifo parameter
+   7. Set the autoconversion parameter
+   8. Set the binrpc_max_body_size parameter
+   9. Set the binrpc_struct_max_body_size parameter
+   10. print usage
+   11. ctl.connections usage
+   12. ctl.who usage
+
+1. Overview
+
+   This module implements the binrpc transport interface for Kamailio
+   RPCs. It supports various transports over which it speaks binrpc: Unix
+   datagram sockets, Unix stream sockets, UDP and TCP. It also supports a
+   backward compatible FIFO interface (using the old Kamailio FIFO
+   protocol).
+
+   By default (if no parameters are changed in the config file) it uses a
+   Unix stream socket under /tmp: /tmp/ser_ctl. This socket is also the
    default for sercmd.
    default for sercmd.
 
 
-   In general it's used in conjunction with sercmd. sercmd it's a unix
-   tool for invoking ser/sip-router rpcs. It can be used both in
-   interactive mode (supports tab-completion and history) or command line
-   mode.
+   In general it's used in conjunction with sercmd. sercmd is a Unix tool
+   for invoking Kamailio RPC functions. It can be used both in interactive
+   mode (supports tab-completion and history) or command line mode.
 
 
    Example 1. sercmd example usage
    Example 1. sercmd example usage
 $ sercmd ps
 $ sercmd ps
@@ -58,7 +54,7 @@ $ sercmd ps
 
 
    See utils/sercmd/EXAMPLES for more examples.
    See utils/sercmd/EXAMPLES for more examples.
 
 
-1.2. BINRPC
+2. BINRPC
 
 
    binrpc is a ser proprietary binary protocol for invoking rpcs. It was
    binrpc is a ser proprietary binary protocol for invoking rpcs. It was
    designed such that it would minimize the packet sizes and it would be
    designed such that it would minimize the packet sizes and it would be
@@ -67,9 +63,18 @@ $ sercmd ps
    The binrpc encoding format is fully documented inside
    The binrpc encoding format is fully documented inside
    modules/ctl/binrpc.h.
    modules/ctl/binrpc.h.
 
 
-1.3. Parameters
+3. Parameters
 
 
-1.3.1. binrpc (string)
+   3.1. binrpc (string)
+   3.2. mode (integer)
+   3.3. user (integer or string)
+   3.4. group (integer or string)
+   3.5. fifo (integer)
+   3.6. autoconversion (integer)
+   3.7. binrpc_max_body_size (integer)
+   3.8. binrpc_struct_max_body_size (integer)
+
+3.1. binrpc (string)
 
 
    Specifies the transport used for the binrpc protocol. The following
    Specifies the transport used for the binrpc protocol. The following
    transport protocol are supported: Unix datagram sockets, Unix stream
    transport protocol are supported: Unix datagram sockets, Unix stream
@@ -114,7 +119,7 @@ modparam("ctl", "binrpc", "localhost:3000")         # udp
 modparam("ctl", "binrpc", "tcp:3012")               # tcp any , port 3012
 modparam("ctl", "binrpc", "tcp:3012")               # tcp any , port 3012
 modparam("ctl", "binrpc", "udp:*:3012")             # udp any , port 3012
 modparam("ctl", "binrpc", "udp:*:3012")             # udp any , port 3012
 
 
-1.3.2. mode (integer)
+3.2. mode (integer)
 
 
    Permissions used for the created Unix sockets or for the fifo.
    Permissions used for the created Unix sockets or for the fifo.
 
 
@@ -123,7 +128,7 @@ modparam("ctl", "binrpc", "udp:*:3012")             # udp any , port 3012
    Example 3. Set mode parameter
    Example 3. Set mode parameter
 modparam("ctl", "mode", 0600) # permissions
 modparam("ctl", "mode", 0600) # permissions
 
 
-1.3.3. user (integer or string)
+3.3. user (integer or string)
 
 
    Username or uid used for the created Unix sockets or for the fifo.
    Username or uid used for the created Unix sockets or for the fifo.
 
 
@@ -132,7 +137,7 @@ modparam("ctl", "mode", 0600) # permissions
    Example 4. Set user parameter
    Example 4. Set user parameter
 modparam("ctl", "user", "andrei")
 modparam("ctl", "user", "andrei")
 
 
-1.3.4. group (integer or string)
+3.4. group (integer or string)
 
 
    Group name or gid used for the created Unix sockets or for the fifo.
    Group name or gid used for the created Unix sockets or for the fifo.
 
 
@@ -141,7 +146,7 @@ modparam("ctl", "user", "andrei")
    Example 5. Set group parameter
    Example 5. Set group parameter
 modparam("ctl", "group", 100)
 modparam("ctl", "group", 100)
 
 
-1.3.5. fifo (integer)
+3.5. fifo (integer)
 
 
    fifo used for the obsolete fifo protocol. The fifo protocol can be run
    fifo used for the obsolete fifo protocol. The fifo protocol can be run
    over a real fifo, over UDP or over TCP. Format:
    over a real fifo, over UDP or over TCP. Format:
@@ -160,7 +165,7 @@ modparam("ctl", "fifo", "/tmp/ser_fifo2")
 modparam("ctl", "fifo", "udp:*:2050")              # fifo protocol over udp
 modparam("ctl", "fifo", "udp:*:2050")              # fifo protocol over udp
 modparam("ctl", "fifo", "tcp:*:2050")              # fifo over tcp
 modparam("ctl", "fifo", "tcp:*:2050")              # fifo over tcp
 
 
-1.3.6. autoconversion (integer)
+3.6. autoconversion (integer)
 
 
    Enable or disable automatic type conversion globally, for all the
    Enable or disable automatic type conversion globally, for all the
    methods parameters. If on, a type mismatch in a method parameter will
    methods parameters. If on, a type mismatch in a method parameter will
@@ -177,7 +182,7 @@ modparam("ctl", "fifo", "tcp:*:2050")              # fifo over tcp
    Example 7. Set the autoconversion parameter
    Example 7. Set the autoconversion parameter
 modparam("ctl", "autoconversion", 1)
 modparam("ctl", "autoconversion", 1)
 
 
-1.3.7. binrpc_max_body_size (integer)
+3.7. binrpc_max_body_size (integer)
 
 
    Set the size of binrpc buffer for RPC reply. Value represents
    Set the size of binrpc buffer for RPC reply. Value represents
    kilobytes.
    kilobytes.
@@ -187,7 +192,7 @@ modparam("ctl", "autoconversion", 1)
    Example 8. Set the binrpc_max_body_size parameter
    Example 8. Set the binrpc_max_body_size parameter
 modparam("ctl", "binrpc_max_body_size", 10)
 modparam("ctl", "binrpc_max_body_size", 10)
 
 
-1.3.8. binrpc_struct_max_body_size (integer)
+3.8. binrpc_struct_max_body_size (integer)
 
 
    Set the size of binrpc structure buffer for RPC reply. Value represents
    Set the size of binrpc structure buffer for RPC reply. Value represents
    kilobytes.
    kilobytes.
@@ -197,9 +202,13 @@ modparam("ctl", "binrpc_max_body_size", 10)
    Example 9. Set the binrpc_struct_max_body_size parameter
    Example 9. Set the binrpc_struct_max_body_size parameter
 modparam("ctl", "binrpc_struct_max_body_size", 3)
 modparam("ctl", "binrpc_struct_max_body_size", 3)
 
 
-1.4. SIP-router RPC Functions
+4. SIP-router RPC Functions
+
+   4.1. ctl.listen
+   4.2. ctl.connections
+   4.3. ctl.who
 
 
-1.4.1.  ctl.listen
+4.1.  ctl.listen
 
 
    List all the sockets on which the ctl module listens.
    List all the sockets on which the ctl module listens.
 
 
@@ -209,7 +218,7 @@ modparam("ctl", "binrpc_struct_max_body_size", 3)
 
 
 # note: the above command is equivalent with sercmd listen
 # note: the above command is equivalent with sercmd listen
 
 
-1.4.2.  ctl.connections
+4.2.  ctl.connections
 
 
    Returns the number of open binrpc connections (to the ctl module).
    Returns the number of open binrpc connections (to the ctl module).
 
 
@@ -217,7 +226,7 @@ modparam("ctl", "binrpc_struct_max_body_size", 3)
  $ sercmd ctl.connections
  $ sercmd ctl.connections
 1
 1
 
 
-1.4.3.  ctl.who
+4.3.  ctl.who
 
 
    List open binrpc connections (to the ctl module).
    List open binrpc connections (to the ctl module).
 
 

+ 12 - 12
modules/ctl/doc/ctl.xml

@@ -8,8 +8,9 @@
 
 
 ]>
 ]>
 
 
-<section id="ctl" xmlns:xi="http://www.w3.org/2001/XInclude">
-    <sectioninfo>
+<book id="ctl" xmlns:xi="http://www.w3.org/2001/XInclude">
+    <bookinfo>
+	<title>The Ctl Module</title>
 	<authorgroup>
 	<authorgroup>
 		<author>
 		<author>
 		<firstname>Andrei</firstname>
 		<firstname>Andrei</firstname>
@@ -24,27 +25,26 @@
 		<year>2009</year>
 		<year>2009</year>
 		<holder>iptelorg GmbH</holder>
 		<holder>iptelorg GmbH</holder>
 	</copyright>
 	</copyright>
-	</sectioninfo>
+	</bookinfo>
 
 
-	<title>Ctl Module</title>
 
 
 	<section id="ctl.overview">
 	<section id="ctl.overview">
 	<title>Overview</title>
 	<title>Overview</title>
 	<para>
 	<para>
-		This module implements the binrpc transport interface for &ser; rpcs.
+		This module implements the binrpc transport interface for &kamailio; RPCs.
 		It supports various transports over which it speaks binrpc:
 		It supports various transports over which it speaks binrpc:
 		Unix datagram sockets, Unix stream sockets, UDP and TCP.
 		Unix datagram sockets, Unix stream sockets, UDP and TCP.
 		It also supports a backward compatible FIFO interface (using the old
 		It also supports a backward compatible FIFO interface (using the old
-		ser FIFO protocol).
+		&kamailio; FIFO protocol).
 	</para>
 	</para>
 	<para>
 	<para>
-		By default (if no parameters are changed from the config file) it uses
+		By default (if no parameters are changed in the config file) it uses
 		a Unix stream socket under /tmp: /tmp/&ctlsocket;. This socket is also the
 		a Unix stream socket under /tmp: /tmp/&ctlsocket;. This socket is also the
 		default for &sercmd;.
 		default for &sercmd;.
 	</para>
 	</para>
 	<para>
 	<para>
-		In general it's used in conjunction with &sercmd;. &sercmd; it's a unix
-		tool for invoking ser/sip-router rpcs. It can be used both in
+		In general it's used in conjunction with &sercmd;. &sercmd; is a Unix
+		tool for invoking &kamailio; RPC functions. It can be used both in
 		interactive mode (supports tab-completion and history) or command
 		interactive mode (supports tab-completion and history) or command
 		line mode.
 		line mode.
 		<example>
 		<example>
@@ -83,8 +83,8 @@ $ &sercmd; ps
 	</para>
 	</para>
 	</section>
 	</section>
 
 
-    <xi:include href="params.xml"/>
-    <xi:include href="rpc.xml"/>
+    <xi:include href="ctl_params.xml"/>
+    <xi:include href="ctl_rpc.xml"/>
 
 
-</section>
+</book>
 
 

+ 0 - 0
modules/ctl/doc/params.xml → modules/ctl/doc/ctl_params.xml


+ 0 - 0
modules/ctl/doc/rpc.xml → modules/ctl/doc/ctl_rpc.xml