libs/core: add luci.model.network.get_protocol(protoname[, networkname])

This commit is contained in:
Jo-Philipp Wich 2011-10-09 21:16:59 +00:00
parent 63608d2636
commit ce024e350a

View file

@ -279,6 +279,13 @@ function ifnameof(self, x)
end
end
function get_protocol(self, protoname, netname)
local v = _protocols[protoname]
if v then
return v(netname or "__dummy__")
end
end
function get_protocols(self)
local p = { }
local _, v