params.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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.parameters" xmlns:xi="http://www.w3.org/2001/XInclude">
  9. <sectioninfo>
  10. <revhistory>
  11. <revision>
  12. <revnumber>$Revision$</revnumber>
  13. <date>$Date$</date>
  14. </revision>
  15. </revhistory>
  16. </sectioninfo>
  17. <title>Parameters</title>
  18. <section id="binrpc">
  19. <title><varname>binrpc</varname> (string)</title>
  20. <para>
  21. Specifies the transport used for the binrpc protocol.
  22. The following transport protocol are supported: Unix datagram
  23. sockets, Unix stream sockets, UDP and TCP.
  24. </para>
  25. <para>
  26. The format is: [ protocol:] address_port|path .
  27. </para>
  28. <para>
  29. <itemizedlist>
  30. <listitem><para>
  31. For <emphasis>Unix</emphasis> sockets: [unixd|unixs|unix]:path
  32. where <varname>"unixd"</varname> means Unix datagram sockets and
  33. <varname>"unix"</varname> <varname>"unixs"</varname> mean Unix
  34. stream sockets.
  35. Examples: "unixd:/tmp/unix_dgram", "unixs:/tmp/unix_stream",
  36. "unix:/tmp/unix_stream".
  37. </para></listitem>
  38. <listitem><para>
  39. For <emphasis>UDP</emphasis> or <emphasis>TCP</emphasis> sockets:
  40. [udp|tcp]:address:port.
  41. If the address is "*" or missing, it will bind to all the local
  42. addresses (0.0.0.0).
  43. Examples: "udp:localhost:2046", "tcp:localhost:2046",
  44. "tcp:3012", "udp:*:3012".
  45. </para></listitem>
  46. </itemizedlist>
  47. </para>
  48. <para>
  49. If the protocol part is missing and the address/path part looks like a
  50. file system path it will default to a Unix stream socket and if not to
  51. an Unix UDP socket.
  52. Examples:
  53. <itemizedlist>
  54. <listitem>
  55. "/tmp/unix_test" - equivalent to "unixs:/tmp/unix_test".
  56. </listitem>
  57. <listitem>
  58. "localhost:3000" - equivalent to "udp:localhost:3000".
  59. </listitem>
  60. </itemizedlist>
  61. </para>
  62. <para>
  63. Multiple transports / listen addresses can be specified, just by
  64. setting the parameter multiple times.
  65. </para>
  66. <para>
  67. <emphasis>Default:</emphasis>"unix:/tmp/&ctlsocket;" (Unix stream socket).
  68. The default value is used <emphasis>only</emphasis> if no
  69. <varname>binrpc</varname> parameter is found in the config file.
  70. </para>
  71. <example>
  72. <title>Set <varname>binrpc</varname> parameter</title>
  73. <programlisting>
  74. loadmodule "ctl"
  75. # optional listen addresses, if no one is specified,
  76. # ctl will listen on unixs:/tmp/ser_ctl
  77. modparam("ctl", "binrpc", "unix:/tmp/&ctlsocket;") # default
  78. modparam("ctl", "binrpc", "udp:localhost:2046")
  79. modparam("ctl", "binrpc", "tcp:localhost:2046")
  80. modparam("ctl", "binrpc", "unixd:/tmp/unix_dgram") # unix datagram
  81. modparam("ctl", "binrpc", "unixs:/tmp/unix_stream") # unix stream
  82. modparam("ctl", "binrpc", "unix:/tmp/unix_default") # unix stream
  83. modparam("ctl", "binrpc", "/tmp/unix_test") # unix stream
  84. modparam("ctl", "binrpc", "localhost:3000") # udp
  85. modparam("ctl", "binrpc", "tcp:3012") # tcp any , port 3012
  86. modparam("ctl", "binrpc", "udp:*:3012") # udp any , port 3012
  87. </programlisting>
  88. </example>
  89. </section>
  90. <section id="mode">
  91. <title><varname>mode</varname> (integer)</title>
  92. <para>
  93. Permissions used for the created Unix sockets or for the fifo.
  94. </para>
  95. <para>
  96. Default: 0600.
  97. </para>
  98. <example>
  99. <title>Set <varname>mode</varname> parameter</title>
  100. <programlisting>
  101. modparam("ctl", "mode", 0600) # permissions
  102. </programlisting>
  103. </example>
  104. </section>
  105. <section id="user">
  106. <title><varname>user</varname> (integer or string)</title>
  107. <para>
  108. Username or uid used for the created Unix sockets or for the fifo.
  109. </para>
  110. <para>
  111. Default: not set (the user under which &ser; runs).
  112. </para>
  113. <example>
  114. <title>Set <varname>user</varname> parameter</title>
  115. <programlisting>
  116. modparam("ctl", "user", "andrei")
  117. </programlisting>
  118. </example>
  119. </section>
  120. <section id="group">
  121. <title><varname>group</varname> (integer or string)</title>
  122. <para>
  123. Group name or gid used for the created Unix sockets or for the fifo.
  124. </para>
  125. <para>
  126. Default: not set (the group under which &ser; runs).
  127. </para>
  128. <example>
  129. <title>Set <varname>group</varname> parameter</title>
  130. <programlisting>
  131. modparam("ctl", "group", 100)
  132. </programlisting>
  133. </example>
  134. </section>
  135. <section id="fifo">
  136. <title><varname>fifo</varname> (integer)</title>
  137. <para>
  138. fifo used for the obsolete fifo protocol.
  139. The fifo protocol can be run over a real fifo, over UDP or over TCP.
  140. Format: [protocol:]path|address.
  141. If no protocol is specified the default is "fifo".
  142. Examples: "fifo:/tmp/ser_fifo", "/tmp/ser_fifo2", "udp:*:2050",
  143. "tcp:localhost:2050".
  144. For more details on the UDP and TCP formats see
  145. <varname>binrpc</varname>.
  146. Multiple fifos or fifo transports can be used in the same time
  147. (just by setting the <varname>fifo</varname> parameter multiple
  148. times in the config).
  149. </para>
  150. <para>
  151. Default: not set (no fifo will be used).
  152. </para>
  153. <example>
  154. <title>Set <varname>fifo</varname> parameter</title>
  155. <programlisting>
  156. # old fifo support
  157. modparam("ctl", "fifo", "fifo:/tmp/ser_fifo") # clasic fifo
  158. modparam("ctl", "fifo", "/tmp/ser_fifo2")
  159. modparam("ctl", "fifo", "udp:*:2050") # fifo protocol over udp
  160. modparam("ctl", "fifo", "tcp:*:2050") # fifo over tcp
  161. </programlisting>
  162. </example>
  163. </section>
  164. <section id="autoconversion">
  165. <title><varname>autoconversion</varname> (integer)</title>
  166. <para>
  167. Enable or disable automatic type conversion globally, for all the
  168. methods parameters.
  169. If on, a type mismatch in a method parameter will not cause a fault
  170. if it is possible to automatically convert it to the expected type.
  171. </para>
  172. <para>
  173. Default: off
  174. </para>
  175. <para>
  176. It is recommended to leave this parameter to its default off value
  177. and fix instead the client application (which should use the
  178. proper types) or to modify the target rpc to accept any type
  179. (see the rpc scan '.' modifier).
  180. </para>
  181. <example>
  182. <title>Set the <varname>autoconversion</varname> parameter
  183. </title>
  184. <programlisting>
  185. modparam("ctl", "autoconversion", 1)
  186. </programlisting>
  187. </example>
  188. </section>
  189. </section>