fb3080afc47bfe1661d5a3ba24de94ff83585caf
[project/luci.git] / applications / luci-udpxy / luasrc / model / cbi / udpxy.lua
1 --[[
2 LuCI - Lua Configuration Interface - udpxy support
3
4 Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14
15 m = Map("udpxy", "udpxy", translate("udpxy is a UDP-to-HTTP multicast traffic relay daemon, here you can configure the settings."))
16
17 s = m:section(TypedSection, "udpxy", "")
18 s.addremove = true
19 s.anonymous = false
20
21 enable=s:option(Flag, "disabled", translate("Enabled"))
22 enable.enabled="0"
23 enable.disabled="1"
24 enable.default = "1"
25 respawn=s:option(Flag, "respawn", translate("Respawn"))
26 respawn.default = false
27
28 verbose=s:option(Flag, "verbose", translate("Verbose"))
29 verbose.default = false
30
31 status=s:option(Flag, "status", translate("Status"))
32
33 bind=s:option(Value, "bind", translate("Bind IP/Interface"))
34 bind.rmempty = true
35 bind.datatype = "or(ipaddr, network)"
36
37 port=s:option(Value, "port", translate("Port"))
38 port.rmempty = true
39 port.datatype = "port"
40
41 source=s:option(Value, "source", translate("Source IP/Interface"))
42 source.rmempty = true
43 source.datatype = "or(ipaddr, network)"
44
45 max_clients=s:option(Value, "max_clients", translate("Max clients"))
46 max_clients.rmempty = true
47 max_clients.datatype = "range(1, 5000)"
48
49 log_file=s:option(Value, "log_file", translate("Log file"))
50 log_file.rmempty = true
51 --log_file.datatype = "file"
52
53 buffer_size=s:option(Value, "buffer_size", translate("Buffer size"))
54 buffer_size.rmempty = true
55 buffer_size.datatype = "range(4096,2097152)"
56
57 buffer_messages=s:option(Value, "buffer_messages", translate("Buffer messages"))
58 buffer_messages.rmempty = true
59 buffer_messages.datatype = "or(-1, and(min(1), uinteger))"
60
61 buffer_time=s:option(Value, "buffer_time", translate("Buffer time"))
62 buffer_time.rmempty = true
63 buffer_time.datatype = "or(-1, and(min(1), uinteger))"
64
65 nice_increment=s:option(Value, "nice_increment", translate("Nice increment"))
66 nice_increment.rmempty = true
67 nice_increment.datatype = "or(and(max(-1), integer),and(min(1), integer))"
68
69 mcsub_renew=s:option(Value, "mcsub_renew", translate("Multicast subscription renew"))
70 mcsub_renew.rmempty = true
71 mcsub_renew.datatype = "or(0, range(30, 64000))"
72
73 return m