move dhcpv6 support into luci-proto-6x4, rename luci-proto-6x4 to luci-proto-ipv6
[project/luci.git] / protocols / ipv6 / luasrc / model / cbi / admin_network / proto_6to4.lua
diff --git a/protocols/ipv6/luasrc/model/cbi/admin_network/proto_6to4.lua b/protocols/ipv6/luasrc/model/cbi/admin_network/proto_6to4.lua
new file mode 100644 (file)
index 0000000..d9d7b01
--- /dev/null
@@ -0,0 +1,46 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+]]--
+
+local map, section, net = ...
+
+local ipaddr, defaultroute, metric, ttl, mtu
+
+
+ipaddr = section:taboption("general", Value, "ipaddr",
+       translate("Local IPv4 address"),
+       translate("Leave empty to use the current WAN address"))
+
+ipaddr.datatype = "ip4addr"
+
+defaultroute = section:taboption("advanced", Flag, "defaultroute",
+       translate("Use default gateway"),
+       translate("If unchecked, no default route is configured"))
+
+defaultroute.default = defaultroute.enabled
+
+
+metric = section:taboption("advanced", Value, "metric",
+       translate("Use gateway metric"))
+
+metric.placeholder = "0"
+metric.datatype    = "uinteger"
+metric:depends("defaultroute", defaultroute.enabled)
+
+
+ttl = section:taboption("advanced", Value, "ttl", translate("Use TTL on tunnel interface"))
+ttl.placeholder = "64"
+ttl.datatype    = "range(1,255)"
+
+
+mtu = section:taboption("advanced", Value, "mtu", translate("Use MTU on tunnel interface"))
+mtu.placeholder = "1280"
+mtu.datatype    = "max(1500)"