ctl.xml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  4. <!-- Include general documentation entities -->
  5. <!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
  6. %docentities;
  7. ]>
  8. <section id="ctl" xmlns:xi="http://www.w3.org/2001/XInclude">
  9. <sectioninfo>
  10. <authorgroup>
  11. <author>
  12. <firstname>Andrei</firstname>
  13. <surname>Pelinescu-Onciul</surname>
  14. <affiliation><orgname>iptelorg GmbH</orgname></affiliation>
  15. <address>
  16. <email>[email protected]</email>
  17. </address>
  18. </author>
  19. </authorgroup>
  20. <copyright>
  21. <year>2009</year>
  22. <holder>iptelorg GmbH</holder>
  23. </copyright>
  24. <revhistory>
  25. <revision>
  26. <revnumber>$Revision$</revnumber>
  27. <date>$Date$</date>
  28. </revision>
  29. </revhistory>
  30. </sectioninfo>
  31. <title>Ctl Module</title>
  32. <section id="ctl.overview">
  33. <title>Overview</title>
  34. <para>
  35. This module implements the binrpc transport interface for &ser; rpcs.
  36. It supports various transports over which it speaks binrpc:
  37. Unix datagram sockets, Unix stream sockets, UDP and TCP.
  38. It also supports a backward compatible FIFO interface (using the old
  39. ser FIFO protocol).
  40. </para>
  41. <para>
  42. By default (if no parameters are changed from the config file) it uses
  43. a Unix stream socket under /tmp: /tmp/&ctlsocket;. This socket is also the
  44. default for &sercmd;.
  45. </para>
  46. <para>
  47. In general it's used in conjunction with &sercmd;. &sercmd; it's a unix
  48. tool for invoking ser/sip-router rpcs. It can be used both in
  49. interactive mode (supports tab-completion and history) or command
  50. line mode.
  51. <example>
  52. <title><function>&sercmd; example</function> usage</title>
  53. <programlisting>
  54. $ &sercmd; ps
  55. 11262 attendant
  56. 11268 udp receiver child=0 sock=127.0.0.1:5060
  57. 11269 udp receiver child=1 sock=127.0.0.1:5060
  58. 11270 udp receiver child=0 sock=192.168.1.101:5060
  59. 11271 udp receiver child=1 sock=192.168.1.101:5060
  60. 11272 slow timer
  61. 11273 timer
  62. 11274 ctl handler
  63. 11275 tcp receiver child=0
  64. 11276 tcp receiver child=1
  65. 11277 tcp main process
  66. </programlisting>
  67. </example>
  68. See <ulink url='http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob;f=utils/sercmd/EXAMPLES' >utils/&sercmd;/EXAMPLES</ulink>
  69. for more examples.
  70. </para>
  71. </section>
  72. <section id="ctl.binrpc">
  73. <title>BINRPC</title>
  74. <para>
  75. binrpc is a ser proprietary binary protocol for invoking rpcs.
  76. It was designed such that it would minimize the packet sizes and it
  77. would be very fast to parse (as opposed to XML-rpc).
  78. </para>
  79. <para>
  80. The binrpc encoding format is fully documented inside
  81. <ulink url='http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob;f=modules_s/ctl/binrpc.h' >
  82. modules_s/ctl/binrpc.h</ulink>.
  83. </para>
  84. </section>
  85. <xi:include href="params.xml"/>
  86. <xi:include href="rpc.xml"/>
  87. </section>