2008-06-08 18:02:47 +00:00
|
|
|
--[[
|
|
|
|
LuCI - Lua Configuration Interface
|
|
|
|
|
|
|
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
$Id$
|
|
|
|
]]--
|
2008-09-13 17:24:35 +00:00
|
|
|
|
2008-08-14 14:51:06 +00:00
|
|
|
require("luci.tools.webadmin")
|
2008-04-11 19:03:30 +00:00
|
|
|
|
2009-10-31 15:54:11 +00:00
|
|
|
m = Map("olsrd", translate("OLSR Daemon"))
|
2008-04-11 19:03:30 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
s = m:section(TypedSection, "olsrd", translate("General settings"))
|
2008-09-13 01:00:11 +00:00
|
|
|
s.dynamic = true
|
|
|
|
s.anonymous = true
|
2008-04-11 19:03:30 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
debug = s:option(ListValue, "DebugLevel", translate("Debugmode"))
|
2008-04-11 19:03:30 +00:00
|
|
|
for i=0, 9 do
|
|
|
|
debug:value(i)
|
|
|
|
end
|
2008-09-13 01:00:11 +00:00
|
|
|
debug.optional = true
|
2008-04-11 19:03:30 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
ipv = s:option(ListValue, "IpVersion", translate("Internet protocol"))
|
2008-04-11 19:03:30 +00:00
|
|
|
ipv:value("4", "IPv4")
|
|
|
|
ipv:value("6", "IPv6")
|
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
noint = s:option(Flag, "AllowNoInt", translate("Start without network"))
|
2008-09-10 22:53:49 +00:00
|
|
|
noint.enabled = "yes"
|
|
|
|
noint.disabled = "no"
|
2008-09-13 01:00:11 +00:00
|
|
|
noint.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
s:option(Value, "Pollrate", translate("Pollrate")).optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
tcr = s:option(ListValue, "TcRedundancy", translate("TC redundancy"))
|
2009-10-31 15:54:11 +00:00
|
|
|
tcr:value("0", translate("MPR selectors"))
|
|
|
|
tcr:value("1", translate("MPR selectors and MPR"))
|
|
|
|
tcr:value("2", translate("all neighbours"))
|
2008-09-13 01:00:11 +00:00
|
|
|
tcr.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
s:option(Value, "MprCoverage", translate("MPR coverage")).optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
lql = s:option(ListValue, "LinkQualityLevel", translate("LQ level"))
|
2008-09-10 22:53:49 +00:00
|
|
|
lql:value("0", translate("disable"))
|
2009-10-31 15:54:11 +00:00
|
|
|
lql:value("1", translate("MPR selection"))
|
|
|
|
lql:value("2", translate("MPR selection and routing"))
|
2008-09-13 01:00:11 +00:00
|
|
|
lql.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
s:option(Value, "LinkQualityAging", translate("LQ aging")).optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
lqa = s:option(ListValue, "LinkQualityAlgorithm", translate("LQ algorithm"))
|
2008-09-10 22:53:49 +00:00
|
|
|
lqa.optional = true
|
2009-10-31 15:54:11 +00:00
|
|
|
lqa:value("etx_fpm", translate("fixed point math"))
|
|
|
|
lqa:value("etx_float", translate("floating point"))
|
|
|
|
lqa:value("etx_ff", translate("Freifunk"))
|
2008-09-13 01:00:11 +00:00
|
|
|
lqa.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
lqfish = s:option(Flag, "LinkQualityFishEye", translate("LQ fisheye"))
|
2008-09-13 01:00:11 +00:00
|
|
|
lqfish.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
s:option(Value, "LinkQualityWinSize", translate("LQ window size")).optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
s:option(Value, "LinkQualityDijkstraLimit", translate("LQ Dijkstra limit")).optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
hyst = s:option(Flag, "UseHysteresis", translate("Use hysteresis"))
|
2008-09-10 22:53:49 +00:00
|
|
|
hyst.enabled = "yes"
|
|
|
|
hyst.disabled = "no"
|
2008-09-13 01:00:11 +00:00
|
|
|
hyst.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
fib = s:option(ListValue, "FIBMetric", translate("FIB metric"))
|
2008-09-10 22:53:49 +00:00
|
|
|
fib.optional = true
|
|
|
|
fib:value("flat")
|
|
|
|
fib:value("correct")
|
|
|
|
fib:value("approx")
|
2008-09-13 01:00:11 +00:00
|
|
|
fib.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
clrscr = s:option(Flag, "ClearScreen", translate ("Clear screen"))
|
2008-09-10 22:53:49 +00:00
|
|
|
clrscr.enabled = "yes"
|
|
|
|
clrscr.disabled = "no"
|
2008-09-13 01:00:11 +00:00
|
|
|
clrscr.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
willingness = s:option(ListValue, "Willingness", translate("Willingness"))
|
2008-09-10 22:53:49 +00:00
|
|
|
for i=0,7 do
|
|
|
|
willingness:value(i)
|
|
|
|
end
|
2008-09-13 01:00:11 +00:00
|
|
|
willingness.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
natthr = s:option(Value, "NatThreshold", translate("NAT threshold"))
|
2009-11-21 00:22:35 +00:00
|
|
|
natthr.optional = true
|
2008-09-10 22:53:49 +00:00
|
|
|
|
2008-04-11 19:03:30 +00:00
|
|
|
|
2009-10-31 15:54:11 +00:00
|
|
|
i = m:section(TypedSection, "Interface", translate("Interfaces"))
|
2008-04-11 19:03:30 +00:00
|
|
|
i.anonymous = true
|
|
|
|
i.addremove = true
|
|
|
|
i.dynamic = true
|
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
ign = i:option(Flag, "ignore", translate("Enable"))
|
2008-09-13 17:24:35 +00:00
|
|
|
ign.enabled = "0"
|
|
|
|
ign.disabled = "1"
|
2009-05-03 18:14:37 +00:00
|
|
|
ign.rmempty = false
|
2009-06-02 21:09:43 +00:00
|
|
|
function ign.cfgvalue(self, section)
|
|
|
|
return Flag.cfgvalue(self, section) or "0"
|
|
|
|
end
|
2008-06-14 01:22:12 +00:00
|
|
|
|
2009-10-31 15:54:11 +00:00
|
|
|
network = i:option(ListValue, "interface", translate("Network"))
|
2008-09-13 01:00:11 +00:00
|
|
|
luci.tools.webadmin.cbi_add_networks(network)
|
2008-06-14 01:22:12 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
i:option(Value, "Ip4Broadcast", translate("IPv4 broadcast")).optional = true
|
2008-11-29 01:54:00 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
ip6t = i:option(ListValue, "Ip6AddrType", translate("IPv6 address type"))
|
2009-10-31 15:54:11 +00:00
|
|
|
ip6t:value("", translate("-- Please choose --"))
|
2008-11-29 01:54:00 +00:00
|
|
|
ip6t:value("auto")
|
|
|
|
ip6t:value("site-local")
|
|
|
|
ip6t:value("unique-local")
|
|
|
|
ip6t:value("global")
|
|
|
|
ip6t.optional = true
|
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
i:option(Value, "HelloInterval", translate("Hello interval")).optional = true
|
|
|
|
i:option(Value, "HelloValidityTime", translate("Hello validity time")).optional = true
|
|
|
|
i:option(Value, "TcInterval", translate("TC interval")).optional = true
|
|
|
|
i:option(Value, "TcValidityTime", translate("TC validity time")).optional = true
|
|
|
|
i:option(Value, "MidInterval", translate("MID interval")).optional = true
|
|
|
|
i:option(Value, "MidValidityTime", translate("MID validity time")).optional = true
|
|
|
|
i:option(Value, "HnaInterval", translate("HNA interval")).optional = true
|
|
|
|
i:option(Value, "HnaValidityTime", translate("HNA validity time")).optional = true
|
2008-09-13 01:00:11 +00:00
|
|
|
|
2010-07-01 11:42:16 +00:00
|
|
|
adc = i:option(Flag, "AutoDetectChanges", translate("Autodetect changes"))
|
2008-09-13 01:00:11 +00:00
|
|
|
adc.enabled = "yes"
|
|
|
|
adc.disabled = "no"
|
|
|
|
adc.optional = true
|
2008-06-14 01:22:12 +00:00
|
|
|
|
2009-01-31 03:01:40 +00:00
|
|
|
--[[
|
2008-09-13 05:17:20 +00:00
|
|
|
ipc = m:section(TypedSection, "IpcConnect")
|
2008-09-14 23:17:10 +00:00
|
|
|
ipc.anonymous = true
|
|
|
|
|
2008-06-14 01:22:12 +00:00
|
|
|
conns = ipc:option(Value, "MaxConnections")
|
|
|
|
conns.isInteger = true
|
|
|
|
|
|
|
|
nets = ipc:option(Value, "Net")
|
|
|
|
nets.optional = true
|
|
|
|
|
|
|
|
hosts = ipc:option(Value, "Host")
|
|
|
|
hosts.optional = true
|
2009-01-31 03:01:40 +00:00
|
|
|
]]
|
2008-06-14 01:22:12 +00:00
|
|
|
|
|
|
|
return m
|