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", "Local Network")
18 s:option(Value, "ipaddr", translate("ipaddress"))
19 s:option(Value, "netmask", translate("netmask"))
20 gw = s:option(Value, "gateway", translate("gateway") .. translate("cbi_optional"))
22 dns = s:option(Value, "dns", translate("dnsserver") .. translate("cbi_optional"))
26 s = m:section(NamedSection, "wan", "interface", "Internet Connection")
27 p = s:option(ListValue, "proto", translate("protocol"))
28 p:value("none", "disabled")
29 p:value("static", translate("manual", "manual"))
30 p:value("dhcp", translate("automatic", "automatic"))
31 p:value("pppoe", "PPPoE")
32 p:value("pptp", "PPTP")
34 ip = s:option(Value, "ipaddr", translate("ipaddress"))
35 ip:depends("proto", "static")
37 nm = s:option(Value, "netmask", translate("netmask"))
38 nm:depends("proto", "static")
40 gw = s:option(Value, "gateway", translate("gateway"))
41 gw:depends("proto", "static")
44 dns = s:option(Value, "dns", translate("dnsserver"))
45 dns:depends("proto", "static")
48 usr = s:option(Value, "username", translate("username"))
49 usr:depends("proto", "pppoe")
50 usr:depends("proto", "pptp")
52 pwd = s:option(Value, "password", translate("password"))
53 pwd:depends("proto", "pppoe")
54 pwd:depends("proto", "pptp")
56 kea = s:option(Value, "keepalive", "Keep-Alive" .. translate("cbi_optional"))
57 kea:depends("proto", "pppoe")
58 kea:depends("proto", "pptp")
62 cod = s:option(Value, "demand", "Dial on Demand" .. translate("cbi_optional"))
63 cod:depends("proto", "pppoe")
64 cod:depends("proto", "pptp")
67 srv = s:option(Value, "server", "PPTP-Server")
68 srv:depends("proto", "pptp")
71 mtu = s:option(Value, "mtu", "MTU" .. translate("cbi_optional"))
72 mtu:depends("proto", "static")
73 mtu:depends("proto", "dhcp")
74 mtu:depends("proto", "pppoe")
75 mtu:depends("proto", "pptp")