1 -- Copyright 2012 David Woodhouse
2 -- Licensed to the public under the Apache License 2.0.
4 local netmod = luci.model.network
5 local interface = luci.model.network.interface
6 local proto = netmod:register_protocol("openconnect")
8 function proto.get_i18n(self)
9 return luci.i18n.translate("OpenConnect (CISCO AnyConnect)")
12 function proto.ifname(self)
13 return "vpn-" .. self.sid
16 function proto.get_interface(self)
17 return interface(self:ifname(), self)
20 function proto.opkg_package(self)
24 function proto.is_installed(self)
25 return nixio.fs.access("/lib/netifd/proto/openconnect.sh")
28 function proto.is_floating(self)
32 function proto.is_virtual(self)
36 function proto.get_interfaces(self)
40 function proto.contains_interface(self, ifc)
41 return (netmod:ifnameof(ifc) == self:ifname())
45 netmod:register_pattern_virtual("^vpn%-%w")