From e6b332aa4a1399e33df68998cf8351bccaee3fc4 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Sun, 24 Jul 2022 17:46:24 +0200 Subject: Add support for flow client/server information (#1671) In a lot of places in ndPI we use *packet* source/dest info (address/port/direction) when we are interested in *flow* client/server info, instead. Add basic logic to autodetect this kind of information. nDPI doesn't perform any "flow management" itself but this task is delegated to the external application. It is then likely that the application might provide more reliable hints about flow client/server direction and about the TCP handshake presence: in that case, these information might be (optionally) passed to the library, disabling the internal "autodetect" logic. These new fields have been used in some LRU caches and in the "guessing" algorithm. It is quite likely that some other code needs to be updated. --- tests/result/dnp3.pcap.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/result/dnp3.pcap.out') diff --git a/tests/result/dnp3.pcap.out b/tests/result/dnp3.pcap.out index d5da026aa..ece43267b 100644 --- a/tests/result/dnp3.pcap.out +++ b/tests/result/dnp3.pcap.out @@ -2,7 +2,7 @@ Guessed flow protos: 0 DPI Packets (TCP): 80 (10.00 pkts/flow) Confidence DPI : 8 (flows) -Num dissector calls: 351 (43.88 diss/flow) +Num dissector calls: 248 (31.00 diss/flow) DNP3 543 38754 8 -- cgit v1.2.3