mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add 6in4 gateway setting support
This commit is contained in:
parent
bd02a525f8
commit
3d2e8d9b85
17 changed files with 1021 additions and 0 deletions
49
luci-proto-ipv6/luasrc/model/network/proto_aiccu.lua
Normal file
49
luci-proto-ipv6/luasrc/model/network/proto_aiccu.lua
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
-- Copyright 2015 Paul Oranje <por@xs4all.nl>
|
||||
-- Licensed to the public under GPLv2
|
||||
|
||||
local netmod = luci.model.network
|
||||
local interface = luci.model.network.interface
|
||||
|
||||
local proto = netmod:register_protocol("aiccu")
|
||||
|
||||
function proto.get_i18n(self)
|
||||
return luci.i18n.translate("AICCU (SIXXS)")
|
||||
end
|
||||
|
||||
function proto.ifname(self)
|
||||
return "aiccu-" .. self.sid
|
||||
end
|
||||
|
||||
function proto.get_interface(self)
|
||||
return interface(self:ifname(), self)
|
||||
end
|
||||
|
||||
function proto.is_installed(self)
|
||||
return nixio.fs.access("/lib/netifd/proto/aiccu.sh")
|
||||
end
|
||||
|
||||
function proto.opkg_package(self)
|
||||
return "aiccu"
|
||||
end
|
||||
|
||||
function proto.is_floating(self)
|
||||
return true
|
||||
end
|
||||
|
||||
function proto.is_virtual(self)
|
||||
return true
|
||||
end
|
||||
|
||||
function proto.get_interfaces(self)
|
||||
return nil
|
||||
end
|
||||
|
||||
function proto.contains_interface(self, ifname)
|
||||
if self:is_floating() then
|
||||
return (netmod:ifnameof(ifc) == self:ifname())
|
||||
else
|
||||
return netmod.protocol.contains_interface(self, ifc)
|
||||
end
|
||||
end
|
||||
|
||||
netmod:register_pattern_virtual("^aiccu%-%w")
|
||||
Loading…
Add table
Add a link
Reference in a new issue