summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/model/cbi
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-03-28 22:55:27 +0000
committerSteven Barth <steven@midlink.org>2008-03-28 22:55:27 +0000
commitbd32a8aac5de9beb321b3cdfe180a8798c5a3379 (patch)
treea0b5e2926066e23c7356122a8afeb0ed0ef0e505 /src/ffluci/model/cbi
parentfb2a9a328d619ecf329e64cb500ff1385e3f8290 (diff)
* CBI: improvements, bug fixes
* admin: Introduced wifi, olsr, password pages
Diffstat (limited to 'src/ffluci/model/cbi')
-rw-r--r--src/ffluci/model/cbi/admin_network/ifaces.lua7
-rw-r--r--src/ffluci/model/cbi/admin_wifi/devices.lua52
-rw-r--r--src/ffluci/model/cbi/admin_wifi/networks.lua67
3 files changed, 126 insertions, 0 deletions
diff --git a/src/ffluci/model/cbi/admin_network/ifaces.lua b/src/ffluci/model/cbi/admin_network/ifaces.lua
index aaabe653e4..193f83f514 100644
--- a/src/ffluci/model/cbi/admin_network/ifaces.lua
+++ b/src/ffluci/model/cbi/admin_network/ifaces.lua
@@ -12,6 +12,10 @@ p:value("static", "statisch")
p:value("dhcp", "DHCP")
p.default = "static"
+br = s:option(Flag, "type", "Netzwerkbrücke", "überbrückt angegebene Schnittstelle(n)")
+br.enabled = "bridge"
+br.rmempty = true
+
s:option(Value, "ifname", "Schnittstelle")
s:option(Value, "ipaddr", "IP-Adresse")
@@ -30,4 +34,7 @@ mtu = s:option(Value, "mtu", "MTU")
mtu.optional = true
mtu.isinteger = true
+mac = s:option(Value, "macaddr", "MAC-Adresse")
+mac.optional = true
+
return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_wifi/devices.lua b/src/ffluci/model/cbi/admin_wifi/devices.lua
new file mode 100644
index 0000000000..7ef794c7e4
--- /dev/null
+++ b/src/ffluci/model/cbi/admin_wifi/devices.lua
@@ -0,0 +1,52 @@
+-- ToDo: Translate, Add descriptions and help texts
+require("ffluci.util")
+
+m = Map("wireless", "Geräte")
+
+s = m:section(TypedSection, "wifi-device")
+--s.addremove = true
+
+en = s:option(Flag, "disabled", "Aktivieren")
+en.enabled = "0"
+en.disabled = "1"
+
+t = s:option(ListValue, "type", "Typ")
+t:value("broadcom")
+t:value("atheros")
+t:value("mac80211")
+t:value("prism2")
+--[[
+local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS"
+for driver in ffluci.util.execl(c)[1]:gmatch("[^ ]+") do
+ t:value(driver)
+end
+]]--
+
+mode = s:option(ListValue, "mode", "Modus")
+mode:value("", "standard")
+mode:value("11b", "802.11b")
+mode:value("11g", "802.11g")
+mode:value("11a", "802.11a")
+mode:value("11bg", "802.11b+g")
+mode.rmempty = true
+
+s:option(Value, "channel", "Funkkanal")
+
+s:option(Value, "txantenna", "Sendeantenne").rmempty = true
+
+s:option(Value, "rxantenna", "Empfangsantenne").rmempty = true
+
+s:option(Value, "distance", "Distanz",
+ "Distanz zum am weitesten entfernten Funkpartner (m)").rmempty = true
+
+s:option(Value, "diversity", "Diversität"):depends("type", "atheros")
+
+country = s:option(Value, "country", "Ländercode")
+country.optional = true
+country:depends("type", "broadcom")
+
+maxassoc = s:option(Value, "maxassoc", "Verbindungslimit")
+maxassoc:depends("type", "broadcom")
+maxassoc.optional = true
+
+return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_wifi/networks.lua b/src/ffluci/model/cbi/admin_wifi/networks.lua
new file mode 100644
index 0000000000..ebc25715e2
--- /dev/null
+++ b/src/ffluci/model/cbi/admin_wifi/networks.lua
@@ -0,0 +1,67 @@
+-- ToDo: Translate, Add descriptions and help texts
+m = Map("wireless", "Netze")
+
+s = m:section(TypedSection, "wifi-iface")
+s.addremove = true
+s.anonymous = true
+
+s:option(Value, "ssid", "Netzkennung (ESSID)").maxlength = 32
+
+device = s:option(ListValue, "device", "Gerät")
+for k, v in pairs(ffluci.model.uci.show("wireless").wireless) do
+ if v[".type"] == "wifi-device" then
+ device:value(k)
+ end
+end
+
+network = s:option(ListValue, "network", "Netzwerk")
+network:value("")
+for k, v in pairs(ffluci.model.uci.show("network").network) do
+ if v[".type"] == "interface" then
+ network:value(k)
+ end
+end
+
+mode = s:option(ListValue, "mode", "Modus")
+mode:value("ap", "Access Point")
+mode:value("adhoc", "Ad-Hoc")
+mode:value("sta", "Client")
+mode:value("wds", "WDS")
+
+s:option(Value, "bssid", "BSSID").optional = true
+
+s:option(Value, "txpower", "Sendeleistung", "dbm").rmempty = true
+
+encr = s:option(ListValue, "encryption", "Verschlüsselung")
+encr:value("none", "keine")
+encr:value("wep", "WEP")
+encr:value("psk", "WPA-PSK")
+encr:value("wpa", "WPA-Radius")
+encr:value("psk2", "WPA2-PSK")
+encr:value("wpa2", "WPA2-Radius")
+
+key = s:option(Value, "key", "Schlüssel")
+key:depends("encryption", "wep")
+key:depends("encryption", "psk")
+key:depends("encryption", "wpa")
+key:depends("encryption", "psk2")
+key:depends("encryption", "wpa2")
+key.rmempty = true
+
+server = s:option(Value, "server", "Radius-Server")
+server:depends("encryption", "wpa")
+server:depends("encryption", "wpa2")
+server.rmempty = true
+
+port = s:option(Value, "port", "Radius-Port")
+port:depends("encryption", "wpa")
+port:depends("encryption", "wpa2")
+port.rmempty = true
+
+s:option(Flag, "isolate", "AP-Isolation", "Unterbindet Client-Client-Verkehr").optional = true
+
+s:option(Flag, "hidden", "ESSID verstecken").optional = true
+
+
+
+return m \ No newline at end of file