mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Refactors eBPF code with ebpf_utils.lua module
This commit is contained in:
parent
004a6cbbc8
commit
ffabf83511
6 changed files with 259 additions and 438 deletions
|
|
@ -225,18 +225,12 @@ local function validateHttpMode(mode)
|
|||
return validateChoice(modes, mode)
|
||||
end
|
||||
|
||||
local function validateUsernameData(mode)
|
||||
local function validateEBPFData(mode)
|
||||
local modes = {"categories", "breeds", "applications", "processes"}
|
||||
|
||||
return validateChoice(modes, mode)
|
||||
end
|
||||
|
||||
local function validateProcessData(mode)
|
||||
local modes = {"categories", "breeds", "applications"}
|
||||
|
||||
return validateChoice(modes, mode)
|
||||
end
|
||||
|
||||
local function validatePidMode(mode)
|
||||
local modes = {"l4", "l7", "host", "apps"}
|
||||
|
||||
|
|
@ -933,8 +927,7 @@ local known_parameters = {
|
|||
["inIfIdx"] = validateNumber, -- A switch/router INPUT port id (%INPUT_SNMP)
|
||||
["outIfIdx"] = validateNumber, -- A switch/router OUTPUT port id (%OUTPUT_SNMP)
|
||||
["deviceIP"] = validateIPV4, -- The switch/router exporter ip address (%EXPORTER_IPV4_ADDRESS)
|
||||
["username_data"] = validateUsernameData, -- mode for get_username_data.lua
|
||||
["process_data" ] = validateProcessData, -- mode for get_process_data.lua
|
||||
["ebpf_data"] = validateEBPFData, -- mode for get_username_data.lua and get_process_data.lua
|
||||
["uid"] = validateNumber, -- user id
|
||||
["pid_mode"] = validatePidMode, -- pid mode for pid_stats.lua
|
||||
["pid_name"] = validateSingleWord, -- A process name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue