1 -- Copyright 2018 Florian Eckert <fe@dev.tdt.de>
2 -- Licensed to the public under the Apache License 2.0.
4 local netmod = luci.model.network
5 local interface = luci.model.network.interface
7 local proto = netmod:register_protocol("3g")
9 function proto.get_i18n(self)
10 return luci.i18n.translate("UMTS/GPRS/EV-DO")
13 function proto.ifname(self)
14 return "3g-" .. 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/3g.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("^3g%-%w")