libs/core: add luci.model.network.get_protocol(protoname[, networkname])
This commit is contained in:
parent
63608d2636
commit
ce024e350a
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue