mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
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:
parent
c7de08f89c
commit
9d3e29ff74
8 changed files with 102 additions and 40 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue