(no commit message)
[project/luci.git] / module / admin-core / src / model / cbi / admin_services / olsrd.lua
1 -- ToDo: Autodetect things, Translate, Add descriptions
2 require("ffluci.fs")
3
4 m = Map("olsr", "OLSR", [[OLSR ist ein flexibles Routingprotokoll,
5 dass den Aufbau von mobilen Ad-Hoc Netzen unterstützt.]])
6
7 s = m:section(NamedSection, "general", "olsr", "Allgemeine Einstellungen")
8
9 debug = s:option(ListValue, "DebugLevel", "Debugmodus")
10 for i=0, 9 do
11 debug:value(i)
12 end
13
14 ipv = s:option(ListValue, "IpVersion", "Internet Protokoll")
15 ipv:value("4", "IPv4")
16 ipv:value("6", "IPv6")
17
18 noint = s:option(Flag, "AllowNoInt", "Start ohne Netzwerk")
19 noint.enabled = "yes"
20 noint.disabled = "no"
21
22 s:option(Value, "Pollrate", "Abfragerate (Pollrate)", "s")
23
24 tcr = s:option(ListValue, "TcRedundancy", "TC-Redundanz")
25 tcr:value("0", "MPR-Selektoren")
26 tcr:value("1", "MPR-Selektoren und MPR")
27 tcr:value("2", "Alle Nachbarn")
28
29 s:option(Value, "MprCoverage", "MPR-Erfassung")
30
31 lql = s:option(ListValue, "LinkQualityLevel", "VQ-Level")
32 lql:value("0", "deaktiviert")
33 lql:value("1", "MPR-Auswahl")
34 lql:value("2", "MPR-Auswahl und Routing")
35
36 lqfish = s:option(Flag, "LinkQualityFishEye", "VQ-Fisheye")
37
38 s:option(Value, "LinkQualityWinSize", "VQ-Fenstergröße")
39
40 s:option(Value, "LinkQualityDijkstraLimit", "VQ-Dijkstralimit")
41
42 hyst = s:option(Flag, "UseHysteresis", "Hysterese aktivieren")
43 hyst.enabled = "yes"
44 hyst.disabled = "no"
45
46
47 i = m:section(TypedSection, "Interface", "Schnittstellen")
48 i.anonymous = true
49 i.addremove = true
50 i.dynamic = true
51
52 network = i:option(ListValue, "Interface", "Netzwerkschnittstellen")
53 network:value("")
54 for k, v in pairs(ffluci.model.uci.sections("network")) do
55 if v[".type"] == "interface" and k ~= "loopback" then
56 network:value(k)
57 end
58 end
59
60 i:option(Value, "HelloInterval", "Hello-Intervall")
61
62 i:option(Value, "HelloValidityTime", "Hello-Gültigkeit")
63
64 i:option(Value, "TcInterval", "TC-Intervall")
65
66 i:option(Value, "TcValidityTime", "TC-Gültigkeit")
67
68 i:option(Value, "MidInterval", "MID-Intervall")
69
70 i:option(Value, "MidValidityTime", "MID-Gültigkeit")
71
72 i:option(Value, "HnaInterval", "HNA-Intervall")
73
74 i:option(Value, "HnaValidityTime", "HNA-Gültigkeit")
75
76
77 p = m:section(TypedSection, "LoadPlugin", "Plugins")
78 p.addremove = true
79 p.dynamic = true
80
81 lib = p:option(ListValue, "Library", "Bibliothek")
82 lib:value("")
83 for k, v in pairs(ffluci.fs.dir("/usr/lib")) do
84 if v:sub(1, 6) == "olsrd_" then
85 lib:value(v)
86 end
87 end
88
89 return m