mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Adds missing tcp_flow_state_utils.lua
This commit is contained in:
parent
4525350096
commit
9cb2a3a89b
1 changed files with 23 additions and 0 deletions
23
scripts/lua/modules/tcp_flow_state_utils.lua
Normal file
23
scripts/lua/modules/tcp_flow_state_utils.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
--
|
||||
-- (C) 2018 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
local tcp_flow_state_utils = {}
|
||||
|
||||
function tcp_flow_state_utils.state2i18n(state)
|
||||
local states = {syn_only = i18n("flows_page.tcp_state_syn_only"),
|
||||
rst = i18n("flows_page.tcp_state_rst"),
|
||||
fin = i18n("flows_page.tcp_state_fin"),
|
||||
syn_rst_only = i18n("flows_page.tcp_state_syn_rst_only"),
|
||||
fin_rst = i18n("flows_page.tcp_state_fin_rst"),
|
||||
established_only = i18n("flows_page.tcp_state_established_only"),
|
||||
not_established_only = i18n("flows_page.tcp_state_not_established_only")
|
||||
}
|
||||
|
||||
return states[state or ''] or i18n("flows_page.tcp_state_unknown")
|
||||
end
|
||||
|
||||
return tcp_flow_state_utils
|
||||
Loading…
Add table
Add a link
Reference in a new issue