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
16 m = Map("olsr", "OLSR")
18 s = m:section(NamedSection, "general", "olsr")
20 debug = s:option(ListValue, "DebugLevel")
25 ipv = s:option(ListValue, "IpVersion")
26 ipv:value("4", "IPv4")
27 ipv:value("6", "IPv6")
29 noint = s:option(Flag, "AllowNoInt")
33 s:option(Value, "Pollrate")
35 tcr = s:option(ListValue, "TcRedundancy")
36 tcr:value("0", translate("olsr_general_tcredundancy_0"))
37 tcr:value("1", translate("olsr_general_tcredundancy_1"))
38 tcr:value("2", translate("olsr_general_tcredundancy_2"))
40 s:option(Value, "MprCoverage")
42 lql = s:option(ListValue, "LinkQualityLevel")
43 lql:value("0", translate("disable"))
44 lql:value("1", translate("olsr_general_linkqualitylevel_1"))
45 lql:value("2", translate("olsr_general_linkqualitylevel_2"))
47 lqfish = s:option(Flag, "LinkQualityFishEye")
49 s:option(Value, "LinkQualityWinSize")
51 s:option(Value, "LinkQualityDijkstraLimit")
53 hyst = s:option(Flag, "UseHysteresis")
58 i = m:section(TypedSection, "Interface", translate("interfaces"))
63 network = i:option(ListValue, "Interface", translate("network"))
65 luci.model.uci.foreach("network", "interface",
67 if section[".name"] ~= "loopback" then
68 network:value(section[".name"])
72 i:option(Value, "HelloInterval")
73 i:option(Value, "HelloValidityTime")
74 i:option(Value, "TcInterval")
75 i:option(Value, "TcValidityTime")
76 i:option(Value, "MidInterval")
77 i:option(Value, "MidValidityTime")
78 i:option(Value, "HnaInterval")
79 i:option(Value, "HnaValidityTime")
82 p = m:section(TypedSection, "LoadPlugin")
86 lib = p:option(ListValue, "Library", translate("library"))
88 for k, v in pairs(luci.fs.dir("/usr/lib")) do
89 if v:sub(1, 6) == "olsrd_" then