Added information about traffic shapers in case you use ntopng inline

When using packet bridges, the local interface networks are now added to ntopng configuration
This commit is contained in:
Luca Deri 2015-09-14 00:19:57 +02:00
parent c7de08f89c
commit 9d3e29ff74
8 changed files with 102 additions and 40 deletions

View file

@ -1770,4 +1770,21 @@ end
function intToIPv4(num)
return(math.floor(num / 2^24).. "." ..math.floor((num % 2^24) / 2^16).. "." ..math.floor((num % 2^16) / 2^8).. "." ..num % 2^8)
end
function getFlowMaxRate(cli_max_rate, srv_max_rate)
cli_max_rate = tonumber(cli_max_rate)
srv_max_rate = tonumber(srv_max_rate)
if((cli_max_rate == 0) or (srv_max_rate == 0)) then
max_rate = 0
elseif((cli_max_rate == -1) and (srv_max_rate > 0)) then
max_rate = srv_max_rate
elseif((cli_max_rate > 0) and (srv_max_rate == -1)) then
max_rate = cli_max_rate
else
max_rate = math.min(cli_max_rate, srv_max_rate)
end
return(max_rate)
end