added function to get max speed of eth - modified interface speed page

This commit is contained in:
Campus 2015-08-15 01:48:08 +02:00
parent b98009fc65
commit 2deb319f57
6 changed files with 167 additions and 38 deletions

View file

@ -1711,3 +1711,19 @@ function getservbyport(port_num, proto)
-- io.write(port_num.."@"..proto.."\n")
return(ntop.getservbyport(port_num, proto))
end
-- getSpeedMax
function getSpeedMax(ifname)
if(ifname == nil) then
return -1
end
if(ifname ~= "eth0") then
return -1
end
ifname = tostring(ifname)
return(ntop.getSpeedMax(ifname))
end