summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-olsr/luasrc/model/cbi
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-06-06 15:50:21 +0000
committerSteven Barth <steven@midlink.org>2008-06-06 15:50:21 +0000
commit932280107232706c4605e475a6d969f0adf2e22d (patch)
treeffc20d5818255da0cb9a1d3b7453b747702beacb /applications/luci-olsr/luasrc/model/cbi
parentdd9606825da5d73883b8313f5af905ea1b2a4d7d (diff)
* Separated OLSR pages into separate application pack
* Minor bugfixes and enhancements
Diffstat (limited to 'applications/luci-olsr/luasrc/model/cbi')
-rw-r--r--applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua90
1 files changed, 90 insertions, 0 deletions
diff --git a/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua b/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua
new file mode 100644
index 000000000..3e3c68dff
--- /dev/null
+++ b/applications/luci-olsr/luasrc/model/cbi/olsr/olsrd.lua
@@ -0,0 +1,90 @@
+-- ToDo: Autodetect things, Translate, Add descriptions
+require("luci.fs")
+
+m = Map("olsr", "OLSR", [[OLSR ist ein flexibles Routingprotokoll,
+dass den Aufbau von mobilen Ad-Hoc Netzen unterstützt.]])
+
+s = m:section(NamedSection, "general", "olsr", "Allgemeine Einstellungen")
+
+debug = s:option(ListValue, "DebugLevel", "Debugmodus")
+for i=0, 9 do
+ debug:value(i)
+end
+
+ipv = s:option(ListValue, "IpVersion", "Internet Protokoll")
+ipv:value("4", "IPv4")
+ipv:value("6", "IPv6")
+
+noint = s:option(Flag, "AllowNoInt", "Start ohne Netzwerk")
+noint.enabled = "yes"
+noint.disabled = "no"
+
+s:option(Value, "Pollrate", "Abfragerate (Pollrate)", "s")
+
+tcr = s:option(ListValue, "TcRedundancy", "TC-Redundanz")
+tcr:value("0", "MPR-Selektoren")
+tcr:value("1", "MPR-Selektoren und MPR")
+tcr:value("2", "Alle Nachbarn")
+
+s:option(Value, "MprCoverage", "MPR-Erfassung")
+
+lql = s:option(ListValue, "LinkQualityLevel", "VQ-Level")
+lql:value("0", "deaktiviert")
+lql:value("1", "MPR-Auswahl")
+lql:value("2", "MPR-Auswahl und Routing")
+
+lqfish = s:option(Flag, "LinkQualityFishEye", "VQ-Fisheye")
+
+s:option(Value, "LinkQualityWinSize", "VQ-Fenstergröße")
+
+s:option(Value, "LinkQualityDijkstraLimit", "VQ-Dijkstralimit")
+
+hyst = s:option(Flag, "UseHysteresis", "Hysterese aktivieren")
+hyst.enabled = "yes"
+hyst.disabled = "no"
+
+
+i = m:section(TypedSection, "Interface", "Schnittstellen")
+i.anonymous = true
+i.addremove = true
+i.dynamic = true
+
+network = i:option(ListValue, "Interface", "Netzwerkschnittstellen")
+network:value("")
+luci.model.uci.foreach("network", "interface",
+ function (section)
+ if section[".name"] ~= "loopback" then
+ network:value(section[".name"])
+ end
+ end)
+
+i:option(Value, "HelloInterval", "Hello-Intervall")
+
+i:option(Value, "HelloValidityTime", "Hello-Gültigkeit")
+
+i:option(Value, "TcInterval", "TC-Intervall")
+
+i:option(Value, "TcValidityTime", "TC-Gültigkeit")
+
+i:option(Value, "MidInterval", "MID-Intervall")
+
+i:option(Value, "MidValidityTime", "MID-Gültigkeit")
+
+i:option(Value, "HnaInterval", "HNA-Intervall")
+
+i:option(Value, "HnaValidityTime", "HNA-Gültigkeit")
+
+
+p = m:section(TypedSection, "LoadPlugin", "Plugins")
+p.addremove = true
+p.dynamic = true
+
+lib = p:option(ListValue, "Library", "Bibliothek")
+lib:value("")
+for k, v in pairs(luci.fs.dir("/usr/lib")) do
+ if v:sub(1, 6) == "olsrd_" then
+ lib:value(v)
+ end
+end
+
+return m \ No newline at end of file