summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-ipv6/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-08-20 15:41:41 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-10 15:28:16 +0200
commit06f4feca1da3ca66e8dbb9d55aa2fa1de3172b94 (patch)
tree6488e643db34c177389373d068681c4733fb5ecf /protocols/luci-proto-ipv6/luasrc
parente4bc192012b05078eb7675e42908e0dd9d04ee88 (diff)
protocols: drop server side cbi implementations of protocol handlers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'protocols/luci-proto-ipv6/luasrc')
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_464xlat.lua33
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua102
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6rd.lua72
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6to4.lua37
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_dhcpv6.lua58
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_dslite.lua53
-rw-r--r--protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_map.lua88
7 files changed, 0 insertions, 443 deletions
diff --git a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_464xlat.lua b/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_464xlat.lua
deleted file mode 100644
index 5a37582faf..0000000000
--- a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_464xlat.lua
+++ /dev/null
@@ -1,33 +0,0 @@
--- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
--- Copyright 2013 Steven Barth <steven@midlink.org>
--- Licensed to the public under the Apache License 2.0.
-
-local map, section, net = ...
-local tunlink, defaultroute, metric, mtu
-
-section:taboption("general", Value, "ip6prefix",
- translate("NAT64 Prefix"), translate("Leave empty to autodetect"))
-
-tunlink = section:taboption("advanced", DynamicList, "tunlink", translate("Tunnel Link"))
-tunlink.template = "cbi/network_netlist"
-tunlink.nocreate = true
-
-
-defaultroute = section:taboption("advanced", Flag, "defaultroute",
- translate("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)
-
-
-mtu = section:taboption("advanced", Value, "mtu", translate("Use MTU on tunnel interface"))
-mtu.placeholder = "1280"
-mtu.datatype = "max(9200)"
diff --git a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua b/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua
deleted file mode 100644
index 3c9f41f6b5..0000000000
--- a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua
+++ /dev/null
@@ -1,102 +0,0 @@
--- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-local map, section, net = ...
-
-local ipaddr, peeraddr, ip6addr, tunnelid, username, password
-local defaultroute, metric, ttl, mtu
-
-
-ipaddr = s:taboption("general", Value, "ipaddr",
- translate("Local IPv4 address"),
- translate("Leave empty to use the current WAN address"))
-
-ipaddr.datatype = "ip4addr"
-
-
-peeraddr = s:taboption("general", Value, "peeraddr",
- translate("Remote IPv4 address"),
- translate("This is usually the address of the nearest PoP operated by the tunnel broker"))
-
-peeraddr.rmempty = false
-peeraddr.datatype = "ip4addr"
-
-
-ip6addr = s:taboption("general", Value, "ip6addr",
- translate("Local IPv6 address"),
- translate("This is the local endpoint address assigned by the tunnel broker, it usually ends with <code>...:2/64</code>"))
-
-ip6addr.datatype = "ip6addr"
-
-
-local ip6prefix = s:taboption("general", Value, "ip6prefix",
- translate("IPv6 routed prefix"),
- translate("This is the prefix routed to you by the tunnel broker for use by clients"))
-
-ip6prefix.datatype = "list(ip6addr)"
-
-
-local update = section:taboption("general", Flag, "_update",
- translate("Dynamic tunnel"),
- translate("Enable HE.net dynamic endpoint update"))
-
-update.enabled = "1"
-update.disabled = "0"
-
-function update.write() end
-function update.remove() end
-function update.cfgvalue(self, section)
- return (tonumber(m:get(section, "tunnelid")) ~= nil)
- and self.enabled or self.disabled
-end
-
-
-tunnelid = section:taboption("general", Value, "tunnelid", translate("Tunnel ID"))
-tunnelid.datatype = "uinteger"
-tunnelid:depends("_update", update.enabled)
-
-
-username = section:taboption("general", Value, "username",
- translate("HE.net username"),
- translate("This is the plain username for logging into the account"))
-
-username:depends("_update", update.enabled)
-username.validate = function(self, val, sid)
- if type(val) == "string" and #val == 32 and val:match("^[a-fA-F0-9]+$") then
- return nil, translate("The HE.net endpoint update configuration changed, you must now use the plain username instead of the user ID!")
- end
- return val
-end
-
-
-password = section:taboption("general", Value, "password",
- translate("HE.net password"),
- translate("This is either the \"Update Key\" configured for the tunnel or the account password if no update key has been configured"))
-
-password.password = true
-password:depends("_update", update.enabled)
-
-
-defaultroute = section:taboption("advanced", Flag, "defaultroute",
- translate("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(9200)"
diff --git a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6rd.lua b/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6rd.lua
deleted file mode 100644
index 708a9c5add..0000000000
--- a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6rd.lua
+++ /dev/null
@@ -1,72 +0,0 @@
--- Copyright 2011-2012 Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-local map, section, net = ...
-
-local ipaddr, peeraddr, ip6addr, tunnelid, username, password
-local defaultroute, metric, ttl, mtu
-
-
-ipaddr = s:taboption("general", Value, "ipaddr",
- translate("Local IPv4 address"),
- translate("Leave empty to use the current WAN address"))
-
-ipaddr.datatype = "ip4addr"
-
-
-peeraddr = s:taboption("general", Value, "peeraddr",
- translate("Remote IPv4 address"),
- translate("This IPv4 address of the relay"))
-
-peeraddr.rmempty = false
-peeraddr.datatype = "ip4addr"
-
-
-ip6addr = s:taboption("general", Value, "ip6prefix",
- translate("IPv6 prefix"),
- translate("The IPv6 prefix assigned to the provider, usually ends with <code>::</code>"))
-
-ip6addr.rmempty = false
-ip6addr.datatype = "ip6addr"
-
-
-ip6prefixlen = s:taboption("general", Value, "ip6prefixlen",
- translate("IPv6 prefix length"),
- translate("The length of the IPv6 prefix in bits"))
-
-ip6prefixlen.placeholder = "16"
-ip6prefixlen.datatype = "range(0,128)"
-
-
-ip6prefixlen = s:taboption("general", Value, "ip4prefixlen",
- translate("IPv4 prefix length"),
- translate("The length of the IPv4 prefix in bits, the remainder is used in the IPv6 addresses."))
-
-ip6prefixlen.placeholder = "0"
-ip6prefixlen.datatype = "range(0,32)"
-
-
-
-defaultroute = section:taboption("advanced", Flag, "defaultroute",
- translate("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(9200)"
diff --git a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6to4.lua b/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6to4.lua
deleted file mode 100644
index 50a706974d..0000000000
--- a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_6to4.lua
+++ /dev/null
@@ -1,37 +0,0 @@
--- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache 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(9200)"
diff --git a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_dhcpv6.lua b/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_dhcpv6.lua
deleted file mode 100644
index 49281ee41d..0000000000
--- a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_dhcpv6.lua
+++ /dev/null
@@ -1,58 +0,0 @@
--- Copyright 2013 Steven Barth <steven@midlink.org>
--- Licensed to the public under the Apache License 2.0.
-
-local map, section, net = ...
-
-
-local o = section:taboption("general", ListValue, "reqaddress",
- translate("Request IPv6-address"))
-o:value("try")
-o:value("force")
-o:value("none", "disabled")
-o.default = "try"
-
-
-o = section:taboption("general", Value, "reqprefix",
- translate("Request IPv6-prefix of length"))
-o:value("auto", translate("Automatic"))
-o:value("no", translate("disabled"))
-o:value("48")
-o:value("52")
-o:value("56")
-o:value("60")
-o:value("64")
-o.default = "auto"
-
-
-o = section:taboption("advanced", Flag, "defaultroute",
- translate("Use default gateway"),
- translate("If unchecked, no default route is configured"))
-o.default = o.enabled
-
-
-o = section:taboption("advanced", Flag, "peerdns",
- translate("Use DNS servers advertised by peer"),
- translate("If unchecked, the advertised DNS server addresses are ignored"))
-o.default = o.enabled
-
-
-o = section:taboption("advanced", Value, "ip6prefix",
- translate("Custom delegated IPv6-prefix"))
-o.dataype = "list(ip6addr)"
-
-
-o = section:taboption("advanced", DynamicList, "dns",
- translate("Use custom DNS servers"))
-o:depends("peerdns", "")
-o.datatype = "list(ip6addr)"
-o.cast = "string"
-
-
-o = section:taboption("advanced", Value, "clientid",
- translate("Client ID to send when requesting DHCP"))
-
-luci.tools.proto.opt_macaddr(section, ifc, translate("Override MAC address"))
-
-o = section:taboption("advanced", Value, "mtu", translate("Override MTU"))
-o.placeholder = "1500"
-o.datatype = "max(9200)"
diff --git a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_dslite.lua b/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_dslite.lua
deleted file mode 100644
index eca9750adb..0000000000
--- a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_dslite.lua
+++ /dev/null
@@ -1,53 +0,0 @@
--- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
--- Copyright 2013 Steven Barth <steven@midlink.org>
--- Licensed to the public under the Apache License 2.0.
-
-local map, section, net = ...
-
-local peeraddr, ip6addr
-local tunlink, defaultroute, metric, ttl, mtu
-
-
-
-
-peeraddr = section:taboption("general", Value, "peeraddr",
- translate("DS-Lite AFTR address"))
-
-peeraddr.rmempty = false
-peeraddr.datatype = "or(hostname,ip6addr)"
-
-ip6addr = section:taboption("general", Value, "ip6addr",
- translate("Local IPv6 address"),
- translate("Leave empty to use the current WAN address"))
-
-ip6addr.datatype = "ip6addr"
-
-
-tunlink = section:taboption("advanced", DynamicList, "tunlink", translate("Tunnel Link"))
-tunlink.template = "cbi/network_netlist"
-tunlink.nocreate = true
-
-
-defaultroute = section:taboption("advanced", Flag, "defaultroute",
- translate("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(9200)"
diff --git a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_map.lua b/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_map.lua
deleted file mode 100644
index 37d4ec901a..0000000000
--- a/protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_map.lua
+++ /dev/null
@@ -1,88 +0,0 @@
--- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
--- Copyright 2013 Steven Barth <steven@midlink.org>
--- Licensed to the public under the Apache License 2.0.
-
-local map, section, net = ...
-
-local peeraddr, ip6addr
-local tunlink, defaultroute, metric, ttl, mtu
-
-
-maptype = section:taboption("general", ListValue, "type", translate("Type"))
-maptype:value("map-e", "MAP-E")
-maptype:value("map-t", "MAP-T")
-maptype:value("lw4o6", "LW4over6")
-
-
-peeraddr = section:taboption("general", Value, "peeraddr",
- translate("BR / DMR / AFTR"))
-
-peeraddr.rmempty = false
-peeraddr.datatype = "ip6addr"
-
-
-ipaddr = section:taboption("general", Value, "ipaddr",
- translate("IPv4 prefix"))
-ipaddr.datatype = "ip4addr"
-
-
-ip4prefixlen = s:taboption("general", Value, "ip4prefixlen",
- translate("IPv4 prefix length"),
- translate("The length of the IPv4 prefix in bits, the remainder is used in the IPv6 addresses."))
-
-ip4prefixlen.placeholder = "32"
-ip4prefixlen.datatype = "range(0,32)"
-
-ip6addr = s:taboption("general", Value, "ip6prefix",
- translate("IPv6 prefix"),
- translate("The IPv6 prefix assigned to the provider, usually ends with <code>::</code>"))
-
-ip6addr.rmempty = false
-ip6addr.datatype = "ip6addr"
-
-
-ip6prefixlen = s:taboption("general", Value, "ip6prefixlen",
- translate("IPv6 prefix length"),
- translate("The length of the IPv6 prefix in bits"))
-
-ip6prefixlen.placeholder = "16"
-ip6prefixlen.datatype = "range(0,64)"
-
-
-s:taboption("general", Value, "ealen",
- translate("EA-bits length")).datatype = "range(0,48)"
-
-s:taboption("general", Value, "psidlen",
- translate("PSID-bits length")).datatype = "range(0,16)"
-
-s:taboption("general", Value, "offset",
- translate("PSID offset")).datatype = "range(0,16)"
-
-tunlink = section:taboption("advanced", DynamicList, "tunlink", translate("Tunnel Link"))
-tunlink.template = "cbi/network_netlist"
-tunlink.nocreate = true
-
-
-defaultroute = section:taboption("advanced", Flag, "defaultroute",
- translate("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(9200)"