summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ahcp/luasrc/model/cbi
diff options
context:
space:
mode:
authorPaul Donald <newtwen+github@gmail.com>2024-10-15 15:01:45 +0200
committerPaul Donald <newtwen+github@gmail.com>2024-10-15 15:01:45 +0200
commit8265e370dbf8bce748d7f506834ab18a5b3c6f41 (patch)
tree4068c93113f763f48bc5b63422652f618f64792f /applications/luci-app-ahcp/luasrc/model/cbi
parent148863ed8e0566b1ae953fa409e2ef2e9fbb1f9f (diff)
luci-app-ahcp: Remove app
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Diffstat (limited to 'applications/luci-app-ahcp/luasrc/model/cbi')
-rw-r--r--applications/luci-app-ahcp/luasrc/model/cbi/admin_network/proto_ahcp.lua67
-rw-r--r--applications/luci-app-ahcp/luasrc/model/cbi/ahcp.lua110
2 files changed, 0 insertions, 177 deletions
diff --git a/applications/luci-app-ahcp/luasrc/model/cbi/admin_network/proto_ahcp.lua b/applications/luci-app-ahcp/luasrc/model/cbi/admin_network/proto_ahcp.lua
deleted file mode 100644
index 0818199a93..0000000000
--- a/applications/luci-app-ahcp/luasrc/model/cbi/admin_network/proto_ahcp.lua
+++ /dev/null
@@ -1,67 +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 device, apn, service, pincode, username, password
-local ipv6, maxwait, defaultroute, metric, peerdns, dns,
- keepalive_failure, keepalive_interval, demand
-
-
-mca = s:taboption("ahcp", Value, "multicast_address", translate("Multicast address"))
-mca.optional = true
-mca.placeholder = "ff02::cca6:c0f9:e182:5359"
-mca.datatype = "ip6addr"
-mca:depends("proto", "ahcp")
-
-port = s:taboption("ahcp", Value, "port", translate("Port"))
-port.optional = true
-port.placeholder = 5359
-port.datatype = "port"
-port:depends("proto", "ahcp")
-
-fam = s:taboption("ahcp", ListValue, "_family", translate("Protocol family"))
-fam:value("", translate("IPv4 and IPv6"))
-fam:value("ipv4", translate("IPv4 only"))
-fam:value("ipv6", translate("IPv6 only"))
-fam:depends("proto", "ahcp")
-
-function fam.cfgvalue(self, section)
- local v4 = m.uci:get_bool("network", section, "ipv4_only")
- local v6 = m.uci:get_bool("network", section, "ipv6_only")
- if v4 then
- return "ipv4"
- elseif v6 then
- return "ipv6"
- end
- return ""
-end
-
-function fam.write(self, section, value)
- if value == "ipv4" then
- m.uci:set("network", section, "ipv4_only", "true")
- m.uci:delete("network", section, "ipv6_only")
- elseif value == "ipv6" then
- m.uci:set("network", section, "ipv6_only", "true")
- m.uci:delete("network", section, "ipv4_only")
- end
-end
-
-function fam.remove(self, section)
- m.uci:delete("network", section, "ipv4_only")
- m.uci:delete("network", section, "ipv6_only")
-end
-
-nodns = s:taboption("ahcp", Flag, "no_dns", translate("Disable DNS setup"))
-nodns.optional = true
-nodns.enabled = "true"
-nodns.disabled = "false"
-nodns.default = nodns.disabled
-nodns:depends("proto", "ahcp")
-
-ltime = s:taboption("ahcp", Value, "lease_time", translate("Lease validity time"))
-ltime.optional = true
-ltime.placeholder = 3666
-ltime.datatype = "uinteger"
-ltime:depends("proto", "ahcp")
-
diff --git a/applications/luci-app-ahcp/luasrc/model/cbi/ahcp.lua b/applications/luci-app-ahcp/luasrc/model/cbi/ahcp.lua
deleted file mode 100644
index 30897ebf1d..0000000000
--- a/applications/luci-app-ahcp/luasrc/model/cbi/ahcp.lua
+++ /dev/null
@@ -1,110 +0,0 @@
--- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
--- Licensed to the public under the Apache License 2.0.
-
-m = Map("ahcpd", translate("AHCP Server"), translate("AHCP is an autoconfiguration protocol " ..
- "for IPv6 and dual-stack IPv6/IPv4 networks designed to be used in place of router " ..
- "discovery or DHCP on networks where it is difficult or impossible to configure a " ..
- "server within every link-layer broadcast domain, for example mobile ad-hoc networks."))
-
-
-m:section(SimpleSection).template = "ahcp_status"
-
-s = m:section(TypedSection, "ahcpd")
-s:tab("general", translate("General Setup"))
-s:tab("advanced", translate("Advanced Settings"))
-s.addremove = false
-s.anonymous = true
-
-
-mode = s:taboption("general", ListValue, "mode", translate("Operation mode"))
-mode:value("server", translate("Server"))
-mode:value("forwarder", translate("Forwarder"))
-
-net = s:taboption("general", Value, "interface", translate("Served interfaces"))
-net.template = "cbi/network_netlist"
-net.widget = "checkbox"
-net.nocreate = true
-
-function net.cfgvalue(self, section)
- return m.uci:get("ahcpd", section, "interface")
-end
-
-pfx = s:taboption("general", DynamicList, "prefix", translate("Announced prefixes"),
- translate("Specifies the announced IPv4 and IPv6 network prefixes in CIDR notation"))
-pfx.optional = true
-pfx.datatype = "ipaddr"
-pfx:depends("mode", "server")
-
-nss = s:taboption("general", DynamicList, "name_server", translate("Announced DNS servers"),
- translate("Specifies the announced IPv4 and IPv6 name servers"))
-nss.optional = true
-nss.datatype = "ipaddr"
-nss:depends("mode", "server")
-
-ntp = s:taboption("general", DynamicList, "ntp_server", translate("Announced NTP servers"),
- translate("Specifies the announced IPv4 and IPv6 NTP servers"))
-ntp.optional = true
-ntp.datatype = "ipaddr"
-ntp:depends("mode", "server")
-
-mca = s:taboption("general", Value, "multicast_address", translate("Multicast address"))
-mca.optional = true
-mca.placeholder = "ff02::cca6:c0f9:e182:5359"
-mca.datatype = "ip6addr"
-
-port = s:taboption("general", Value, "port", translate("Port"))
-port.optional = true
-port.placeholder = 5359
-port.datatype = "port"
-
-fam = s:taboption("general", ListValue, "_family", translate("Protocol family"))
-fam:value("", translate("IPv4 and IPv6"))
-fam:value("ipv4", translate("IPv4 only"))
-fam:value("ipv6", translate("IPv6 only"))
-
-function fam.cfgvalue(self, section)
- local v4 = m.uci:get_bool("ahcpd", section, "ipv4_only")
- local v6 = m.uci:get_bool("ahcpd", section, "ipv6_only")
- if v4 then
- return "ipv4"
- elseif v6 then
- return "ipv6"
- end
- return ""
-end
-
-function fam.write(self, section, value)
- if value == "ipv4" then
- m.uci:set("ahcpd", section, "ipv4_only", "true")
- m.uci:delete("ahcpd", section, "ipv6_only")
- elseif value == "ipv6" then
- m.uci:set("ahcpd", section, "ipv6_only", "true")
- m.uci:delete("ahcpd", section, "ipv4_only")
- end
-end
-
-function fam.remove(self, section)
- m.uci:delete("ahcpd", section, "ipv4_only")
- m.uci:delete("ahcpd", section, "ipv6_only")
-end
-
-ltime = s:taboption("general", Value, "lease_time", translate("Lease validity time"))
-ltime.optional = true
-ltime.placeholder = 3666
-ltime.datatype = "uinteger"
-
-
-ld = s:taboption("advanced", Value, "lease_dir", translate("Lease directory"))
-ld.datatype = "directory"
-ld.placeholder = "/var/lib/leases"
-
-id = s:taboption("advanced", Value, "id_file", translate("Unique ID file"))
---id.datatype = "file"
-id.placeholder = "/var/lib/ahcpd-unique-id"
-
-log = s:taboption("advanced", Value, "log_file", translate("Log file"))
---log.datatype = "file"
-log.placeholder = "/var/log/ahcpd.log"
-
-
-return m