2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
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
10 http://www.apache.org/licenses/LICENSE-2.0
14 m = Map("network", translate("interfaces"), translate("a_n_ifaces1"))
16 s = m:section(TypedSection, "interface", "")
19 s:depends("proto", "static")
20 s:depends("proto", "dhcp")
22 p = s:option(ListValue, "proto", translate("protocol"))
23 p:value("static", translate("static"))
24 p:value("dhcp", "DHCP")
27 br = s:option(Flag, "type", translate("a_n_i_bridge"), translate("a_n_i_bridge1"))
31 ifname = s:option(Value, "ifname", translate("interface"))
33 for i,d in ipairs(luci.sys.net.devices()) do
39 s:option(Value, "ipaddr", translate("ipaddress"))
41 nm = s:option(Value, "netmask", translate("netmask"))
42 nm:depends("proto", "static")
43 nm:value("255.255.255.0")
44 nm:value("255.255.0.0")
47 gw = s:option(Value, "gateway", translate("gateway"))
48 gw:depends("proto", "static")
51 dns = s:option(Value, "dns", translate("dnsserver"))
52 dns:depends("proto", "static")
55 mtu = s:option(Value, "mtu", "MTU")
59 mac = s:option(Value, "macaddr", translate("macaddress"))