Implements flows filter by client/server ASN

This commit is contained in:
Simone Mainardi 2017-10-08 22:54:24 +02:00
parent 420dbe8020
commit 4e4020a480
13 changed files with 150 additions and 49 deletions

View file

@ -32,6 +32,9 @@ local deviceIP = _GET["deviceIP"]
local inIfIdx = _GET["inIfIdx"]
local outIfIdx = _GET["outIfIdx"]
local client_asn = _GET["client_asn"]
local server_asn = _GET["server_asn"]
local vhost = _GET["vhost"]
local flowhosts_type = _GET["flowhosts_type"]
local ipversion = _GET["version"]
@ -167,6 +170,14 @@ if not isEmptyString(deviceIP) then
end
end
if not isEmptyString(client_asn) then
pageinfo["clientASNFilter"] = tonumber(client_asn)
end
if not isEmptyString(server_asn) then
pageinfo["serverASNFilter"] = tonumber(server_asn)
end
local flows_stats = interface.getFlowsInfo(host, pageinfo)
local total = flows_stats["numFlows"]
flows_stats = flows_stats["flows"]