d9d7b01a942df757fa2b6157ecebd4cd2340d8be
[project/luci.git] / protocols / ipv6 / luasrc / model / cbi / admin_network / proto_6to4.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2011 Jo-Philipp Wich <xm@subsignal.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
13 local map, section, net = ...
14
15 local ipaddr, defaultroute, metric, ttl, mtu
16
17
18 ipaddr = section:taboption("general", Value, "ipaddr",
19         translate("Local IPv4 address"),
20         translate("Leave empty to use the current WAN address"))
21
22 ipaddr.datatype = "ip4addr"
23
24 defaultroute = section:taboption("advanced", Flag, "defaultroute",
25         translate("Use default gateway"),
26         translate("If unchecked, no default route is configured"))
27
28 defaultroute.default = defaultroute.enabled
29
30
31 metric = section:taboption("advanced", Value, "metric",
32         translate("Use gateway metric"))
33
34 metric.placeholder = "0"
35 metric.datatype    = "uinteger"
36 metric:depends("defaultroute", defaultroute.enabled)
37
38
39 ttl = section:taboption("advanced", Value, "ttl", translate("Use TTL on tunnel interface"))
40 ttl.placeholder = "64"
41 ttl.datatype    = "range(1,255)"
42
43
44 mtu = section:taboption("advanced", Value, "mtu", translate("Use MTU on tunnel interface"))
45 mtu.placeholder = "1280"
46 mtu.datatype    = "max(1500)"