Implements filtering per flow status in the active flows page

This commit is contained in:
Alfredo Cardigliano 2019-05-20 18:54:50 +02:00
parent a94f3422fb
commit 9cdb84a875
25 changed files with 231 additions and 53 deletions

View file

@ -324,12 +324,6 @@ local function validateBroadcastUnicast(mode)
return validateChoice(modes, mode)
end
local function validateFlowStatus(mode)
local modes = {"normal", "alerted", "filtered"}
return validateChoice(modes, mode)
end
local function validateFlowStatusNumber(status)
if not validateNumber(status) then
return false
@ -339,6 +333,16 @@ local function validateFlowStatusNumber(status)
return((num >= 0) and (num < 2^8))
end
local function validateFlowStatus(mode)
local modes = {"normal", "alerted", "filtered"}
if validateFlowStatusNumber(mode) then
return true
end
return validateChoice(modes, mode)
end
local function validateTCPFlowState(mode)
local modes = { "established", "connecting", "closed", "reset" }