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