* Added DHCP page
[project/luci.git] / src / ffluci / model / cbi / admin_network / ifaces.lua
1 -- ToDo: Translate, Add descriptions and help texts
2 m = Map("network", "Schnittstellen")
3
4 s = m:section(TypedSection, "interface")
5 s.addremove = true
6 s:exclude("loopback")
7 s:depends("proto", "static")
8 s:depends("proto", "dhcp")
9
10 p = s:option(ListValue, "proto", "Protokoll")
11 p:value("static", "statisch")
12 p:value("dhcp", "DHCP")
13 p.default = "static"
14
15 br = s:option(Flag, "type", "Netzwerkbrücke", "überbrückt angegebene Schnittstelle(n)")
16 br.enabled = "bridge"
17 br.rmempty = true
18
19 s:option(Value, "ifname", "Schnittstelle")
20
21 s:option(Value, "ipaddr", "IP-Adresse")
22
23 s:option(Value, "netmask", "Netzmaske"):depends("proto", "static")
24
25 gw = s:option(Value, "gateway", "Gateway")
26 gw:depends("proto", "static")
27 gw.rmempty = true
28
29 dns = s:option(Value, "dns", "DNS-Server")
30 dns:depends("proto", "static")
31 dns.optional = true
32
33 mtu = s:option(Value, "mtu", "MTU")
34 mtu.optional = true
35 mtu.isinteger = true
36
37 mac = s:option(Value, "macaddr", "MAC-Adresse")
38 mac.optional = true
39
40 return m