1 -- Copyright 2015 Paul Oranje <por@xs4all.nl>
2 -- Licensed to the public under GPLv2
4 local netmod = luci.model.network
5 local interface = luci.model.network.interface
7 local proto = netmod:register_protocol("aiccu")
9 function proto.get_i18n(self)
10 return luci.i18n.translate("AICCU (SIXXS)")
13 function proto.ifname(self)
14 return "aiccu-" .. self.sid
17 function proto.get_interface(self)
18 return interface(self:ifname(), self)
21 function proto.is_installed(self)
22 return nixio.fs.access("/lib/netifd/proto/aiccu.sh")
25 function proto.opkg_package(self)
29 function proto.is_floating(self)
33 function proto.is_virtual(self)
37 function proto.get_interfaces(self)
41 function proto.contains_interface(self, ifname)
42 if self:is_floating() then
43 return (netmod:ifnameof(ifc) == self:ifname())
45 return netmod.protocol.contains_interface(self, ifc)
49 netmod:register_pattern_virtual("^aiccu-%%w")