Implement flow status and unidirectional flows filters

This commit is contained in:
emanuele-f 2017-03-30 13:01:54 +02:00
parent 1854b884a2
commit b7e0669c33
7 changed files with 149 additions and 13 deletions

View file

@ -220,6 +220,18 @@ local function validateClientOrServer(mode)
return validateChoice(modes, mode)
end
local function validateBroadcastUnicast(mode)
local modes = {"unicast", "broadcast_multicast"}
return validateChoice(modes, mode)
end
local function validateFlowStatus(mode)
local modes = {"normal", "alerted"}
return validateChoice(modes, mode)
end
local function validateStatsType(mode)
local modes = {"severity_pie", "type_pie", "count_sparkline", "top_origins",
"top_targets", "duration_pie", "longest_engaged", "counts_pie",
@ -826,6 +838,8 @@ local known_parameters = {
["drop_flow_policy"] = validateBool, -- true if target flow should be dropped
["export"] = validateEmpty, -- set if data has to be exported
["blocked_categories"] = validateCategoriesList, -- if_stats.lua
["traffic_type"] = validateBroadcastUnicast, -- flows_stats.lua
["flow_status"] = validateFlowStatus, -- flows_stats.lua
}
-- A special parameter is formed by a prefix, followed by a variable suffix