8731561cb5efa663be9da03914e37b0740ed30e1
[paraslash.git] / ggo / server.m4
1 include(header.m4)
2 define(CURRENT_PROGRAM,para_server)
3 define(DEFAULT_CONFIG_FILE,~/.paraslash/server.conf)
4
5 <qu>
6 #########################
7 section "General options"
8 #########################
9 </qu>
10
11 include(loglevel.m4)
12 include(log_timing.m4)
13 include(color.m4)
14 include(daemon.m4)
15 include(user.m4)
16 include(group.m4)
17
18 <qu>
19 option "port" p
20 #~~~~~~~~~~~~~~
21 "listening port"
22 int typestr="portnumber"
23 default="2990"
24 optional
25 details="
26         para_server listens on this tcp port for incoming connections
27         from clients such as para_client. If the default port is
28         changed, the corresponding option of para_client must be used
29         to connect to para_server.
30 "
31
32 #############################
33 section "Configuration files"
34 #############################
35 </qu>
36
37 include(logfile.m4)
38 include(config_file.m4)
39
40 <qu>
41 option "user_list" -
42 #~~~~~~~~~~~~~~~~~~~
43 "(default='~/.paraslash/server.users')"
44
45 string typestr="filename"
46 optional
47
48
49 ##################################
50 section "virtual streaming system"
51 ##################################
52
53
54 option "autoplay" a
55 #~~~~~~~~~~~~~~~~~~
56 "start playing on startup"
57 flag off
58
59 option "autoplay_delay" -
60 #~~~~~~~~~~~~~~~~~~~~~~~~
61 "time to wait before streaming"
62 int typestr="ms"
63 default="0"
64 optional
65 dependon="autoplay"
66 details="
67         If para_server is started with the autoplay option, this option
68         may be used to set up a delay before para_server streams its
69         first audio file. This is useful for example if para_server
70         and para_audiod are started during system startup. The delay
71         time should be choosen large enough so that para_audiod is
72         already up when para_server starts to stream. Of course, this
73         option depends on the autoplay option.
74 "
75 option "announce_time" A
76 #~~~~~~~~~~~~~~~~~~~~~~~
77 "grace time for clients"
78
79 int typestr="ms"
80 default="300"
81 optional
82 details="
83         Clients such as para_audiod connect to para_server and execute
84         the stat command to find out whether an audio stream is
85         currently available. This sets the delay betweeen announcing
86         the stream via the output of the stat command and sending
87         the first chunk of data.
88 "
89
90 #############################
91 section "audio file selector"
92 #############################
93
94 option "afs_database_dir" D
95 #~~~~~~~~~~~~~~~~~~~~~~~~~~
96 "location of the database"
97 string typestr="path"
98 optional
99 details="
100         Where para_server should look for the osl database of the audio
101         file selector. The default is '~/.paraslash/afs_database-0.4'.
102 "
103
104 option "afs_socket" s
105 #~~~~~~~~~~~~~~~~~~~~
106 "Command socket for afs"
107 string typestr="path"
108 default="/var/paraslash/afs_command_socket-0.4"
109 optional
110 details="
111         For each server command that is handled by the audio file
112         selector, the child process of para_server connects to the
113         audio file selector via a local socket. This option specifies
114         the location of that socket in the file system.
115 "
116 option "afs_initial_mode" i
117 #~~~~~~~~~~~~~~~~~~~~~~~~~~
118
119 "Mood or playlist to load on startup."
120 string typestr="<specifier>/<name>"
121 optional
122
123 details="
124         The argument of this option must be prefixed with either 'p/'
125         or 'm/' to indicate whether a playlist or a mood should be
126         loaded. Example:
127                 --afs_initial_mode p/foo
128         loads the playlist named 'foo'.
129 "
130
131 #####################
132 section "http sender"
133 #####################
134
135
136 option "http_port" -
137 #~~~~~~~~~~~~~~~~~~~
138 "tcp port for http streaming"
139 int typestr="portnumber"
140 default="8000"
141 optional
142 details="
143         The http sender of para_server listens on this port for
144         incoming connections. Clients are expected to send the usual
145         http request message such as 'GET / HTTP/'.
146 "
147
148 option "http_default_deny" -
149 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
150 "make the http ACL a whitelist"
151 flag off
152 details="
153         The default is to use blacklists instead, i.e. connections
154         to the http sender are allowed unless the connecting host
155         matches a pattern given by a http_access option. This allows
156         to use access control the other way round: Connections are
157         denied from hosts which are not explicitly allowed by one or
158         more http_access options.
159 "
160
161 option "http_access" -
162 #~~~~~~~~~~~~~~~~~~~~~
163 "add an entry to the http ACL"
164 string typestr="a.b.c.d/n"
165 optional
166 multiple
167 details="
168         Add given host/network to access control list (whitelist if
169         http_default_deny was given, blacklist otherwise) before
170         opening the tcp port. This option can be given multiple
171         times. Example: '192.168.0.0/24' whitelists/blacklists the
172         256 hosts 192.168.0.x
173 "
174
175 option "http_no_autostart" -
176 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
177 "do not open tcp port on startup"
178 flag off
179 details="
180         If this option is given, the http sender does not listen on
181         its tcp port. It may be instructed to open this port at a
182         later time by using the sender command.
183 "
184
185 option "http_max_clients" -
186 #~~~~~~~~~~~~~~~~~~~~~~~~~~
187 "maximal number of connections"
188 int typestr="number"
189 default="-1"
190 optional
191 details="
192         The http sender will refuse connections if already that number
193         of clients are currently connected. A non-positive value
194         (the default) allows an unlimited number of simultaneous
195         connections.
196 "
197
198 #####################
199 section "dccp sender"
200 #####################
201
202
203 option "dccp_port" -
204 #~~~~~~~~~~~~~~~~~~~
205 "port for dccp streaming"
206 int typestr="portnumber"
207 default="8000"
208 optional
209 details="
210         See http_port for details.
211 "
212
213 option "dccp_default_deny" -
214 #~~~~~~~~~~~~~~~~~~~~~~~~~~~
215 "make the dccp ACL a whitelist"
216 flag off
217 details="
218         See http_default_deny for details.
219 "
220
221 option "dccp_access" -
222 #~~~~~~~~~~~~~~~~~~~~~
223 "add an entry to the dccp ACL"
224 string typestr="a.b.c.d/n"
225 optional
226 multiple
227 details="
228         See http_access for details.
229 "
230
231 option "dccp_max_clients" -
232 #~~~~~~~~~~~~~~~~~~~~~~~~~~
233 "maximal number of connections"
234 int typestr="number"
235 default="-1"
236 optional
237 details="
238         See http_max_clients for details.
239 "
240
241 option "dccp_max_slice_size" -
242 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
243 "Upper bound for the FEC slice size"
244 int typestr = "size"
245 optional
246 default = "0"
247 details = "
248         If this value is non-positive (the default) the dccp sender
249         uses the maximum packet size (MPS) of the connection as the
250         slice size. The MPS is a network parameter and depends on
251         the path maximum transmission unit (path MTU) of an incoming
252         connection, i.e. on the largest packet size that can be
253         transmitted without causing fragmentation.
254
255         This option allows to use a value less than the MPS in order
256         to fine-tune application performance. Values greater than
257         the MPS of an incoming connection can not be set.
258 "
259
260 option "dccp_data_slices_per_group" -
261 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262 "The number of non-redundant slices per FEC group"
263 int typestr = "num"
264 optional
265 default = "3"
266 details = "
267         This determines the number of slices in each FEC group that are
268         necessary to decode the group. The given number must be smaller
269         than the value of the dccp_slices_per_group option below.
270
271         Note that the duration of a FEC group is proportional to the
272         product dccp_max_slice_size * dccp_data_slices_per_group.
273 "
274
275 option "dccp_slices_per_group" -
276 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
277 "The total number of slices per FEC group"
278 int typestr = "num"
279 optional
280 default = "4"
281 details = "
282         This value must be larger than the value given for above
283         dccp_data_slices_per_group above. The difference being the
284         number of redundant slices per group, i.e.  the number of
285         data packets that may be lost without causing interruptions
286         of the resulting audio stream.
287
288         Increase this value if for lossy networks.
289 "
290
291 ####################
292 section "udp sender"
293 ####################
294
295 option "udp_target" -
296 #~~~~~~~~~~~~~~~~~~~~
297 "add udp target with optional port"
298 string typestr="host[:port]"
299 optional
300 multiple
301 details="
302         Add given host/port to the list of targets. The 'host' argument
303         can be either an IPv4/v6 address or hostname (RFC 3986 syntax).
304         The 'port' argument is an optional port number. If the 'port'
305         part is absent, the 'udp_default_port' value is used.
306
307         The following examples are possible targets:
308         '10.10.1.2:8000' (host:port); '10.10.1.2' (with default port);
309         '224.0.1.38:1500' (IPv4 multicast); 'localhost:8001' (hostname
310         with port); '[::1]:8001' (IPv6 localhost); '[badc0de::1]' (IPv6
311         host with default port); '[FF00::beef]:1500' (IPv6 multicast).
312
313         This option can be given multiple times, for multiple targets.
314 "
315
316 option "udp_no_autostart" -
317 #~~~~~~~~~~~~~~~~~~~~~~~~~~
318 "do not start sending"
319 flag off
320 details="
321         If this option is given, udp streaming may be activated at
322         a later time by using the sender command.
323 "
324
325 option "udp_default_port" -
326 #~~~~~~~~~~~~~~~~~~~~~~~~~~
327 "udp port to send to"
328 int typestr="port"
329 default="8000"
330 optional
331
332 option "udp_mcast_iface" -
333 #~~~~~~~~~~~~~~~~~~~~~~~~~~
334 "outgoing udp multicast interface"
335 string
336 optional
337
338 option "udp_header_interval" H
339 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
340 "duration for sending header"
341 int typestr="ms"
342 default="2000"
343 optional
344 details="
345         As the udp sender has no idea about connected clients it
346         sends the audio file header periodically if necessary. This
347         option is used to specify the duration of the interval between
348         sending the header. Shorter values decrease the average time
349         clients have to wait before being able to start playback,
350         but this also increases the amount network traffic. Note
351         that this affects only ogg vorbis streams as this is the only
352         audio format that needs an audio file header.
353 "
354
355 option "udp_ttl" t
356 #~~~~~~~~~~~~~~~~~
357 "set time to live value"
358 int typestr="num"
359 default="-1"
360 optional
361 details="
362         This option applies exclusively to multicast UDPv4/v6 streaming.
363
364         For the sending UDPv4 socket it sets the multicast Time-To-Live
365         value to \"num\".  Traditional TTL scope values are: 0=host,
366         1=network, 32=same site, 64=same region, 128=same continent,
367         255=unrestricted. Please note however that this scoping is not
368         a good solution: RFC 2365 e.g. presents a better alternative.
369
370         When using UDPv6 multicasting, the option sets the number of
371         multicast hops (as described in RFC 3493); a value of -1
372         allows the kernel to auto-select the hop value.
373 "
374 </qu>