2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
5 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
15 m = Map("network", "Network")
17 s = m:section(NamedSection, "lan", "interface", translate("m_n_local"))
18 s:option(Value, "ipaddr", translate("ipaddress"))
20 nm = s:option(Value, "netmask", translate("netmask"))
21 nm:value("255.255.255.0")
22 nm:value("255.255.0.0")
25 gw = s:option(Value, "gateway", translate("gateway") .. translate("cbi_optional"))
27 dns = s:option(Value, "dns", translate("dnsserver") .. translate("cbi_optional"))
31 s = m:section(NamedSection, "wan", "interface", translate("m_n_inet"))
32 p = s:option(ListValue, "proto", translate("protocol"))
33 p:value("none", "disabled")
34 p:value("static", translate("manual", "manual"))
35 p:value("dhcp", translate("automatic", "automatic"))
36 p:value("pppoe", "PPPoE")
37 p:value("pptp", "PPTP")
39 ip = s:option(Value, "ipaddr", translate("ipaddress"))
40 ip:depends("proto", "static")
42 nm = s:option(Value, "netmask", translate("netmask"))
43 nm:depends("proto", "static")
45 gw = s:option(Value, "gateway", translate("gateway"))
46 gw:depends("proto", "static")
49 dns = s:option(Value, "dns", translate("dnsserver"))
50 dns:depends("proto", "static")
53 usr = s:option(Value, "username", translate("username"))
54 usr:depends("proto", "pppoe")
55 usr:depends("proto", "pptp")
57 pwd = s:option(Value, "password", translate("password"))
58 pwd:depends("proto", "pppoe")
59 pwd:depends("proto", "pptp")
61 kea = s:option(Flag, "keepalive", translate("m_n_keepalive"))
62 kea:depends("proto", "pppoe")
63 kea:depends("proto", "pptp")
68 cod = s:option(Value, "demand", translate("m_n_dialondemand"), "s")
69 cod:depends("proto", "pppoe")
70 cod:depends("proto", "pptp")
73 srv = s:option(Value, "server", translate("m_n_pptp_server"))
74 srv:depends("proto", "pptp")