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