* Core translation
[project/luci.git] / modules / admin-core / luasrc / model / cbi / admin_network / ifaces.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14 m = Map("network", "Schnittstellen", [[An dieser Stelle können die einzelnen Schnittstellen
15 des Netzwerkes konfiguriert werden. Es können mehrere Schnittstellen zu einer Brücke zusammengefasst werden,
16 indem diese durch Leerzeichen getrennt aufgezählt werden und ein entsprechender Haken im Feld Netzwerkbrücke
17 gesetzt wird. Es können VLANs in der Notation SCHNITTSTELLE.VLANNR (z.B.: eth0.1) verwendet werden.]])
18
19 s = m:section(TypedSection, "interface", "")
20 s.addremove = true
21 s:exclude("loopback")
22 s:depends("proto", "static")
23 s:depends("proto", "dhcp")
24
25 p = s:option(ListValue, "proto", "Protokoll")
26 p:value("static", "statisch")
27 p:value("dhcp", "DHCP")
28 p.default = "static"
29
30 br = s:option(Flag, "type", "Netzwerkbrücke", "überbrückt angegebene Schnittstelle(n)")
31 br.enabled = "bridge"
32 br.rmempty = true
33
34 s:option(Value, "ifname", "Schnittstelle")
35
36 s:option(Value, "ipaddr", "IP-Adresse")
37
38 s:option(Value, "netmask", "Netzmaske"):depends("proto", "static")
39
40 gw = s:option(Value, "gateway", "Gateway")
41 gw:depends("proto", "static")
42 gw.rmempty = true
43
44 dns = s:option(Value, "dns", "DNS-Server")
45 dns:depends("proto", "static")
46 dns.optional = true
47
48 mtu = s:option(Value, "mtu", "MTU")
49 mtu.optional = true
50 mtu.isinteger = true
51
52 mac = s:option(Value, "macaddr", "MAC-Adresse")
53 mac.optional = true
54
55 return m