1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;
]>
<section id="ctl.parameters" xmlns:xi="http://www.w3.org/2001/XInclude">
<sectioninfo>
</sectioninfo>
<title>Parameters</title>
<section id="binrpc">
<title><varname>binrpc</varname> (string)</title>
<para>
Specifies the transport used for the binrpc protocol.
The following transport protocol are supported: Unix datagram
sockets, Unix stream sockets, UDP and TCP.
</para>
<para>
The format is: [ protocol:] address_port|path .
</para>
<para>
<itemizedlist>
<listitem><para>
For <emphasis>Unix</emphasis> sockets: [unixd|unixs|unix]:path
where <varname>"unixd"</varname> means Unix datagram sockets and
<varname>"unix"</varname> <varname>"unixs"</varname> mean Unix
stream sockets.
Examples: "unixd:/tmp/unix_dgram", "unixs:/tmp/unix_stream",
"unix:/tmp/unix_stream".
</para></listitem>
<listitem><para>
For <emphasis>UDP</emphasis> or <emphasis>TCP</emphasis> sockets:
[udp|tcp]:address:port.
If the address is "*" or missing, it will bind to all the local
addresses (0.0.0.0).
Examples: "udp:localhost:2046", "tcp:localhost:2046",
"tcp:3012", "udp:*:3012".
</para></listitem>
</itemizedlist>
</para>
<para>
If the protocol part is missing and the address/path part looks like a
file system path it will default to a Unix stream socket and if not to
an Unix UDP socket.
Examples:
<itemizedlist>
<listitem>
"/tmp/unix_test" - equivalent to "unixs:/tmp/unix_test".
</listitem>
<listitem>
"localhost:3000" - equivalent to "udp:localhost:3000".
</listitem>
</itemizedlist>
</para>
<para>
Multiple transports / listen addresses can be specified, just by
setting the parameter multiple times.
</para>
<para>
<emphasis>Default:</emphasis>"unix:/tmp/&ctlsocket;" (Unix stream socket).
The default value is used <emphasis>only</emphasis> if no
<varname>binrpc</varname> parameter is found in the config file.
</para>
<example>
<title>Set <varname>binrpc</varname> parameter</title>
<programlisting>
loadmodule "ctl"
# optional listen addresses, if no one is specified,
# ctl will listen on unixs:/tmp/ser_ctl
modparam("ctl", "binrpc", "unix:/tmp/&ctlsocket;") # default
modparam("ctl", "binrpc", "udp:localhost:2046")
modparam("ctl", "binrpc", "tcp:localhost:2046")
modparam("ctl", "binrpc", "unixd:/tmp/unix_dgram") # unix datagram
modparam("ctl", "binrpc", "unixs:/tmp/unix_stream") # unix stream
modparam("ctl", "binrpc", "unix:/tmp/unix_default") # unix stream
modparam("ctl", "binrpc", "/tmp/unix_test") # unix stream
modparam("ctl", "binrpc", "localhost:3000") # udp
modparam("ctl", "binrpc", "tcp:3012") # tcp any , port 3012
modparam("ctl", "binrpc", "udp:*:3012") # udp any , port 3012
</programlisting>
</example>
</section>
<section id="mode">
<title><varname>mode</varname> (integer)</title>
<para>
Permissions used for the created Unix sockets or for the fifo.
</para>
<para>
Default: 0600.
</para>
<example>
<title>Set <varname>mode</varname> parameter</title>
<programlisting>
modparam("ctl", "mode", 0600) # permissions
</programlisting>
</example>
</section>
<section id="user">
<title><varname>user</varname> (integer or string)</title>
<para>
Username or uid used for the created Unix sockets or for the fifo.
</para>
<para>
Default: not set (the user under which &ser; runs).
</para>
<example>
<title>Set <varname>user</varname> parameter</title>
<programlisting>
modparam("ctl", "user", "andrei")
</programlisting>
</example>
</section>
<section id="group">
<title><varname>group</varname> (integer or string)</title>
<para>
Group name or gid used for the created Unix sockets or for the fifo.
</para>
<para>
Default: not set (the group under which &ser; runs).
</para>
<example>
<title>Set <varname>group</varname> parameter</title>
<programlisting>
modparam("ctl", "group", 100)
</programlisting>
</example>
</section>
<section id="fifo">
<title><varname>fifo</varname> (integer)</title>
<para>
fifo used for the obsolete fifo protocol.
The fifo protocol can be run over a real fifo, over UDP or over TCP.
Format: [protocol:]path|address.
If no protocol is specified the default is "fifo".
Examples: "fifo:/tmp/ser_fifo", "/tmp/ser_fifo2", "udp:*:2050",
"tcp:localhost:2050".
For more details on the UDP and TCP formats see
<varname>binrpc</varname>.
Multiple fifos or fifo transports can be used in the same time
(just by setting the <varname>fifo</varname> parameter multiple
times in the config).
</para>
<para>
Default: not set (no fifo will be used).
</para>
<example>
<title>Set <varname>fifo</varname> parameter</title>
<programlisting>
# old fifo support
modparam("ctl", "fifo", "fifo:/tmp/ser_fifo") # clasic fifo
modparam("ctl", "fifo", "/tmp/ser_fifo2")
modparam("ctl", "fifo", "udp:*:2050") # fifo protocol over udp
modparam("ctl", "fifo", "tcp:*:2050") # fifo over tcp
</programlisting>
</example>
</section>
<section id="autoconversion">
<title><varname>autoconversion</varname> (integer)</title>
<para>
Enable or disable automatic type conversion globally, for all the
methods parameters.
If on, a type mismatch in a method parameter will not cause a fault
if it is possible to automatically convert it to the expected type.
</para>
<para>
Default: off
</para>
<para>
It is recommended to leave this parameter to its default off value
and fix instead the client application (which should use the
proper types) or to modify the target rpc to accept any type
(see the rpc scan '.' modifier).
</para>
<example>
<title>Set the <varname>autoconversion</varname> parameter
</title>
<programlisting>
modparam("ctl", "autoconversion", 1)
</programlisting>
</example>
</section>
<section id="binrpc_max_body_size">
<title><varname>binrpc_max_body_size</varname> (integer)</title>
<para>
Set the size of binrpc buffer for RPC reply. Value represents
kilobytes.
</para>
<para>
Default: 4 (meaning 4KB);
</para>
<example>
<title>Set the <varname>binrpc_max_body_size</varname> parameter
</title>
<programlisting>
modparam("ctl", "binrpc_max_body_size", 10)
</programlisting>
</example>
</section>
<section id="binrpc_struct_max_body_size">
<title><varname>binrpc_struct_max_body_size</varname> (integer)</title>
<para>
Set the size of binrpc structure buffer for RPC reply. Value represents
kilobytes.
</para>
<para>
Default: 1 (meaning 1KB);
</para>
<example>
<title>Set the <varname>binrpc_struct_max_body_size</varname> parameter
</title>
<programlisting>
modparam("ctl", "binrpc_struct_max_body_size", 3)
</programlisting>
</example>
</section>
</section>
|