2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
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
10 http://www.apache.org/licenses/LICENSE-2.0
15 require("luci.tools.webadmin")
17 m = Map("olsrd", translate("olsrd", "OLSR Daemon"))
19 s = m:section(TypedSection, "olsrd", translate("olsrd_general"))
23 debug = s:option(ListValue, "DebugLevel")
29 ipv = s:option(ListValue, "IpVersion")
30 ipv:value("4", "IPv4")
31 ipv:value("6", "IPv6")
33 noint = s:option(Flag, "AllowNoInt")
38 s:option(Value, "Pollrate").optional = true
40 tcr = s:option(ListValue, "TcRedundancy")
41 tcr:value("0", translate("olsrd_olsrd_tcredundancy_0"))
42 tcr:value("1", translate("olsrd_olsrd_tcredundancy_1"))
43 tcr:value("2", translate("olsrd_olsrd_tcredundancy_2"))
46 s:option(Value, "MprCoverage").optional = true
48 lql = s:option(ListValue, "LinkQualityLevel")
49 lql:value("0", translate("disable"))
50 lql:value("1", translate("olsrd_olsrd_linkqualitylevel_1"))
51 lql:value("2", translate("olsrd_olsrd_linkqualitylevel_2"))
54 s:option(Value, "LinkQualityAging").optional = true
56 lqa = s:option(ListValue, "LinkQualityAlgorithm")
58 lqa:value("etx_fpm", translate("olsrd_etx_fpm"))
59 lqa:value("etx_float", translate("olsrd_etx_float"))
60 lqa:value("etx_ff", translate("olsrd_etx_ff"))
63 lqfish = s:option(Flag, "LinkQualityFishEye")
64 lqfish.optional = true
66 s:option(Value, "LinkQualityWinSize").optional = true
68 s:option(Value, "LinkQualityDijkstraLimit").optional = true
70 hyst = s:option(Flag, "UseHysteresis")
75 fib = s:option(ListValue, "FIBMetric")
82 clrscr = s:option(Flag, "ClearScreen")
83 clrscr.enabled = "yes"
84 clrscr.disabled = "no"
85 clrscr.optional = true
87 willingness = s:option(ListValue, "Willingness")
91 willingness.optional = true
95 i = m:section(TypedSection, "Interface", translate("interfaces"))
100 ign = i:option(Flag, "ignore", "Enable")
104 network = i:option(ListValue, "interface", translate("network"))
105 luci.tools.webadmin.cbi_add_networks(network)
107 i:option(Value, "Ip4Broadcast").optional = true
109 ip6t = i:option(ListValue, "Ip6AddrType")
110 ip6t:value("", translate("cbi_select"))
112 ip6t:value("site-local")
113 ip6t:value("unique-local")
117 i:option(Value, "HelloInterval").optional = true
118 i:option(Value, "HelloValidityTime").optional = true
119 i:option(Value, "TcInterval").optional = true
120 i:option(Value, "TcValidityTime").optional = true
121 i:option(Value, "MidInterval").optional = true
122 i:option(Value, "MidValidityTime").optional = true
123 i:option(Value, "HnaInterval").optional = true
124 i:option(Value, "HnaValidityTime").optional = true
126 adc = i:option(Flag, "AutoDetectChanges")
132 ipc = m:section(TypedSection, "IpcConnect")
135 conns = ipc:option(Value, "MaxConnections")
136 conns.isInteger = true
138 nets = ipc:option(Value, "Net")
141 hosts = ipc:option(Value, "Host")
142 hosts.optional = true