projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63608d2
)
libs/core: add luci.model.network.get_protocol(protoname[, networkname])
author
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 9 Oct 2011 21:16:59 +0000
(21:16 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sun, 9 Oct 2011 21:16:59 +0000
(21:16 +0000)
libs/core/luasrc/model/network.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/model/network.lua
b/libs/core/luasrc/model/network.lua
index b1db9dbfced3c00d1f777893c745246d3243e1c1..a85def89a2619d0189c92b8d1f611eec4e40378b 100644
(file)
--- a/
libs/core/luasrc/model/network.lua
+++ b/
libs/core/luasrc/model/network.lua
@@
-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