622240f1fc8d1a19e4cf97a27a953c1c19ebeac5
[project/luci.git] / modules / admin-core / luasrc / model / cbi / admin_network / ptp.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", "Punkt-zu-Punkt Verbindungen", [[Punkt-zu-Punkt Verbindungen
15 über PPPoE oder PPTP werden häufig dazu verwendet, um über DSL o.ä. Techniken eine
16 Verbindung zum Internetgateway eines Internetzugangsanbieters aufzubauen.]])
17
18 s = m:section(TypedSection, "interface", "")
19 s.addremove = true
20 s:depends("proto", "pppoe")
21 s:depends("proto", "pptp")
22
23 p = s:option(ListValue, "proto", "Protokoll")
24 p:value("pppoe", "PPPoE")
25 p:value("pptp", "PPTP")
26 p.default = "pppoe"
27
28 s:option(Value, "ifname", "Schnittstelle")
29
30 s:option(Value, "username", "Benutzername")
31 s:option(Value, "password", "Passwort")
32
33 s:option(Value, "keepalive", "Keep-Alive", "Bei einer Verbindungstrennung automatisch neu verbinden").optional = true
34
35 s:option(Value, "demand", "Dial on Demand (idle time)", "Zeit nach der die Verbindung bei Inaktivität getrennt wird").optional = true
36
37 srv = s:option(Value, "server", "PPTP-Server")
38 srv:depends("proto", "pptp")
39 srv.optional = true
40
41 mtu = s:option(Value, "mtu", "MTU")
42 mtu.optional = true
43 mtu.isinteger = true
44
45 return m