mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add MPTCP upstream support
This commit is contained in:
parent
f7db294857
commit
d2d21d7d68
8 changed files with 137 additions and 64 deletions
|
@ -210,13 +210,23 @@ function mptcp_monitor_data()
|
|||
luci.http.prepare_content("text/plain")
|
||||
local fullmesh
|
||||
fullmesh = io.popen("cat /proc/net/mptcp_net/snmp")
|
||||
if fullmesh then
|
||||
if fullmesh:read() ~= nil then
|
||||
while true do
|
||||
local ln = fullmesh:read("*l")
|
||||
if not ln then break end
|
||||
luci.http.write(ln)
|
||||
luci.http.write("\n")
|
||||
end
|
||||
else
|
||||
fullmesh = io.popen("nstat -z")
|
||||
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
|
||||
end
|
||||
return
|
||||
end
|
||||
|
@ -225,7 +235,7 @@ function mptcp_connections_data()
|
|||
luci.http.prepare_content("text/plain")
|
||||
local connections
|
||||
connections = io.popen("multipath -c")
|
||||
if connections then
|
||||
if connections:read() ~= nil then
|
||||
while true do
|
||||
local ln = connections:read("*l")
|
||||
if not ln then break end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue