Globally reduce copyright headers
[project/luci.git] / protocols / luci-proto-ipv6 / luasrc / model / cbi / admin_network / proto_6rd.lua
1 -- Copyright 2011-2012 Jo-Philipp Wich <xm@subsignal.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 local map, section, net = ...
5
6 local ipaddr, peeraddr, ip6addr, tunnelid, username, password
7 local defaultroute, metric, ttl, mtu
8
9
10 ipaddr = s:taboption("general", Value, "ipaddr",
11         translate("Local IPv4 address"),
12         translate("Leave empty to use the current WAN address"))
13
14 ipaddr.datatype = "ip4addr"
15
16
17 peeraddr = s:taboption("general", Value, "peeraddr",
18         translate("Remote IPv4 address"),
19         translate("This IPv4 address of the relay"))
20
21 peeraddr.rmempty  = false
22 peeraddr.datatype = "ip4addr"
23
24
25 ip6addr = s:taboption("general", Value, "ip6prefix",
26         translate("IPv6 prefix"),
27         translate("The IPv6 prefix assigned to the provider, usually ends with <code>::</code>"))
28
29 ip6addr.rmempty  = false
30 ip6addr.datatype = "ip6addr"
31
32
33 ip6prefixlen = s:taboption("general", Value, "ip6prefixlen",
34         translate("IPv6 prefix length"),
35         translate("The length of the IPv6 prefix in bits"))
36
37 ip6prefixlen.placeholder = "16"
38 ip6prefixlen.datatype    = "range(0,128)"
39
40
41 ip6prefixlen = s:taboption("general", Value, "ip4prefixlen",
42         translate("IPv4 prefix length"),
43         translate("The length of the IPv4 prefix in bits, the remainder is used in the IPv6 addresses."))
44
45 ip6prefixlen.placeholder = "0"
46 ip6prefixlen.datatype    = "range(0,32)"
47
48
49
50 defaultroute = section:taboption("advanced", Flag, "defaultroute",
51         translate("Default gateway"),
52         translate("If unchecked, no default route is configured"))
53
54 defaultroute.default = defaultroute.enabled
55
56
57 metric = section:taboption("advanced", Value, "metric",
58         translate("Use gateway metric"))
59
60 metric.placeholder = "0"
61 metric.datatype    = "uinteger"
62 metric:depends("defaultroute", defaultroute.enabled)
63
64
65 ttl = section:taboption("advanced", Value, "ttl", translate("Use TTL on tunnel interface"))
66 ttl.placeholder = "64"
67 ttl.datatype    = "range(1,255)"
68
69
70 mtu = section:taboption("advanced", Value, "mtu", translate("Use MTU on tunnel interface"))
71 mtu.placeholder = "1280"
72 mtu.datatype    = "max(9200)"