1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add MPTCP fullmesh info in interface

This commit is contained in:
Ycarus 2019-01-03 11:47:02 +01:00
parent 08f6f0b6b2
commit 42a8d0317c
2 changed files with 66 additions and 0 deletions

View file

@ -13,6 +13,8 @@ function index()
entry({"admin", "network", "mptcp", "interface_bandwidth"}, call("interface_bandwidth")).leaf = true
entry({"admin", "network", "mptcp", "mptcp_check"}, template("mptcp/mptcp_check"), _("MPTCP Support Check"), 4).leaf = true
entry({"admin", "network", "mptcp", "mptcp_check_trace"}, post("mptcp_check_trace")).leaf = true
entry({"admin", "network", "mptcp", "mptcp_fullmesh"}, template("mptcp/mptcp_fullmesh"), _("MPTCP Fullmesh"), 4).leaf = true
entry({"admin", "network", "mptcp", "mptcp_fullmesh_data"}, post("mptcp_fullmesh_data")).leaf = true
end
function interface_bandwidth(iface)
@ -80,3 +82,18 @@ function mptcp_check_trace(iface)
end
return
end
function mptcp_fullmesh_data()
luci.http.prepare_content("text/plain")
local fullmash
fullmesh = io.popen("multipath -f")
if fullmesh then
while true do
local ln = fullmesh:read("*l")
if not ln then break end
luci.http.write(ln)
luci.http.write("\n")
end
end
return
end