mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixed flow statistics in host_get_json.lua
Fixed TCP flags Smaller cosmetic fixes
This commit is contained in:
parent
1013df7db9
commit
79022c7238
6 changed files with 56 additions and 27 deletions
|
|
@ -1134,6 +1134,11 @@ function flowinfo2hostname(flow_info, host_type, vlan)
|
|||
local name
|
||||
local orig_name
|
||||
|
||||
if(host_type == "srv") then
|
||||
if(flow_info["host_server_name"] ~= nil) then return(flow_info["host_server_name"]) end
|
||||
if(flow_info["ssl.certificate"] ~= nil) then return(flow_info["ssl.certificate"]) end
|
||||
end
|
||||
|
||||
name = flow_info[host_type..".host"]
|
||||
|
||||
if((name == "") or (name == nil)) then
|
||||
|
|
@ -2020,3 +2025,13 @@ end
|
|||
function purgedErrorString()
|
||||
return 'Very likely it is expired and ntopng has purged it from memory. You can set purge idle timeout settings from the <A HREF="'..ntop.getHttpPrefix()..'/lua/admin/prefs.lua?subpage_active=data_purge"><i class="fa fa-flask"></i> Preferences</A>.'
|
||||
end
|
||||
|
||||
-- print TCP flags
|
||||
function printTCPFlags(flags)
|
||||
if(hasbit(flags,0x01)) then print('<span class="label label-info">FIN</span> ') end
|
||||
if(hasbit(flags,0x02)) then print('<span class="label label-info">SYN</span> ') end
|
||||
if(hasbit(flags,0x04)) then print('<span class="label label-danger">RST</span> ') end
|
||||
if(hasbit(flags,0x08)) then print('<span class="label label-info">PUSH</span> ') end
|
||||
if(hasbit(flags,0x10)) then print('<span class="label label-info">ACK</span> ') end
|
||||
if(hasbit(flags,0x20)) then print('<span class="label label-info">URG</span> ') end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue