2 LuCI - Network model - 6to4, 6in4 & 6rd protocol extensions
4 Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
5 Copyright 2013 Steven Barth <steven@midlink.org>
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
21 local netmod = luci.model.network
24 for _, p in ipairs({"dslite"}) do
26 local proto = netmod:register_protocol(p)
28 function proto.get_i18n(self)
30 return luci.i18n.translate("Dual-Stack Lite (RFC6333)")
34 function proto.ifname(self)
35 return p .. "-" .. self.sid
38 function proto.opkg_package(self)
44 function proto.is_installed(self)
45 return nixio.fs.access("/lib/netifd/proto/" .. p .. ".sh")
48 function proto.is_floating(self)
52 function proto.is_virtual(self)
56 function proto.get_interfaces(self)
60 function proto.contains_interface(self, ifname)
61 return (netmod:ifnameof(ifc) == self:ifname())
64 netmod:register_pattern_virtual("^%s-%%w" % p)