diff options
author | Luca Deri <deri@ntop.org> | 2017-06-06 21:22:46 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2017-06-06 21:22:46 +0200 |
commit | 9a4634adbbf360790086e6b9fd87eb4758dc972b (patch) | |
tree | 5341bff6ca3d311c2b622a54e21b979475d094c9 | |
parent | 984eedc5ea0c844cd73b3a10fe844845aaef7b32 (diff) |
Fixes for latency calculation
-rw-r--r-- | wireshark/ndpi.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/wireshark/ndpi.lua b/wireshark/ndpi.lua index 00740e3af..f9db38411 100644 --- a/wireshark/ndpi.lua +++ b/wireshark/ndpi.lua @@ -91,7 +91,8 @@ local first_payload_id = {} local num_pkts = 0 local last_processed_packet_number = 0 -local max_latency_discard = 5000 -- 5 sec +local max_latency_discard = 5000 -- 5 sec +local max_appl_lat_discard = 15000 -- 15 sec local debug = false -- ############################################## @@ -301,6 +302,12 @@ function ndpi_proto.init() max_nw_server_RRT = {} -- Application Latency + min_nw_client_RRT = {} + min_nw_server_RRT = {} + max_nw_client_RRT = {} + max_nw_server_RRT = {} + min_appl_RRT = {} + max_appl_RRT = {} first_payload_ts = {} first_payload_id = {} end @@ -563,7 +570,7 @@ function latency_dissector(tvb, pinfo, tree) if(first_payload_ts[revkey] ~= nil) then local appl_latency = abstime_diff(pinfo.abs_ts, first_payload_ts[revkey]) * 1000 - if((appl_latency > 0) + if((appl_latency > 0) and (appl_latency < max_appl_lat_discard) -- The trick below is used to set only the first latency packet and ((first_payload_id[revkey] == nil) or (first_payload_id[revkey] == pinfo.number)) ) then |