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.
This commit is contained in:
@@ -6,7 +6,7 @@ Confidence Unknown : 14 (flows)
|
||||
Confidence Match by port : 5 (flows)
|
||||
Confidence Match by IP : 1 (flows)
|
||||
Confidence DPI : 177 (flows)
|
||||
Num dissector calls: 5061 (25.69 diss/flow)
|
||||
Num dissector calls: 5058 (25.68 diss/flow)
|
||||
|
||||
Unknown 24 6428 14
|
||||
DNS 2 378 1
|
||||
|
||||
@@ -6,7 +6,7 @@ DPI Packets (other): 1 (1.00 pkts/flow)
|
||||
Confidence Match by port : 4 (flows)
|
||||
Confidence Match by IP : 1 (flows)
|
||||
Confidence DPI : 33 (flows)
|
||||
Num dissector calls: 878 (23.11 diss/flow)
|
||||
Num dissector calls: 879 (23.13 diss/flow)
|
||||
|
||||
DNS 2 217 1
|
||||
HTTP 1 56 1
|
||||
|
||||
@@ -5,7 +5,7 @@ DPI Packets (UDP): 6 (1.20 pkts/flow)
|
||||
Confidence Match by port : 4 (flows)
|
||||
Confidence Match by IP : 5 (flows)
|
||||
Confidence DPI : 11 (flows)
|
||||
Num dissector calls: 993 (49.65 diss/flow)
|
||||
Num dissector calls: 999 (49.95 diss/flow)
|
||||
|
||||
HTTP 5 280 1
|
||||
QQ 15 1727 1
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 1
|
||||
|
||||
DPI Packets (TCP): 33 (33.00 pkts/flow)
|
||||
Confidence Match by port : 1 (flows)
|
||||
Num dissector calls: 351 (351.00 diss/flow)
|
||||
Num dissector calls: 352 (352.00 diss/flow)
|
||||
|
||||
TLS 71 9386 1
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 0
|
||||
|
||||
DPI Packets (TCP): 9 (3.00 pkts/flow)
|
||||
Confidence DPI : 3 (flows)
|
||||
Num dissector calls: 398 (132.67 diss/flow)
|
||||
Num dissector calls: 401 (133.67 diss/flow)
|
||||
|
||||
AMQP 160 23514 3
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Confidence Unknown : 2 (flows)
|
||||
Confidence Match by port : 5 (flows)
|
||||
Confidence Match by IP : 1 (flows)
|
||||
Confidence DPI : 61 (flows)
|
||||
Num dissector calls: 1165 (16.88 diss/flow)
|
||||
Num dissector calls: 1170 (16.96 diss/flow)
|
||||
|
||||
Unknown 19 1054 2
|
||||
DNS 32 3655 16
|
||||
|
||||
@@ -3,7 +3,7 @@ Guessed flow protos: 4
|
||||
DPI Packets (TCP): 41 (5.12 pkts/flow)
|
||||
Confidence Match by IP : 3 (flows)
|
||||
Confidence DPI : 5 (flows)
|
||||
Num dissector calls: 285 (35.62 diss/flow)
|
||||
Num dissector calls: 286 (35.75 diss/flow)
|
||||
|
||||
Jabber 11 890 1
|
||||
Google 8 476 3
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 0
|
||||
|
||||
DPI Packets (TCP): 48 (8.00 pkts/flow)
|
||||
Confidence DPI : 6 (flows)
|
||||
Num dissector calls: 281 (46.83 diss/flow)
|
||||
Num dissector calls: 280 (46.67 diss/flow)
|
||||
|
||||
SMTP 626 438465 1
|
||||
HTTP 1601 1581542 3
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 0
|
||||
|
||||
DPI Packets (TCP): 8 (8.00 pkts/flow)
|
||||
Confidence DPI : 1 (flows)
|
||||
Num dissector calls: 161 (161.00 diss/flow)
|
||||
Num dissector calls: 160 (160.00 diss/flow)
|
||||
|
||||
FTP_CONTROL 18 1700 1
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ DPI Packets (other): 5 (1.00 pkts/flow)
|
||||
Confidence Unknown : 30 (flows)
|
||||
Confidence Match by port : 28 (flows)
|
||||
Confidence DPI : 193 (flows)
|
||||
Num dissector calls: 5303 (21.13 diss/flow)
|
||||
Num dissector calls: 5266 (20.98 diss/flow)
|
||||
|
||||
Unknown 30 3356 30
|
||||
FTP_CONTROL 36 2569 12
|
||||
|
||||
@@ -6,7 +6,7 @@ Confidence Unknown : 3 (flows)
|
||||
Confidence Match by port : 23 (flows)
|
||||
Confidence Match by IP : 2 (flows)
|
||||
Confidence DPI : 12 (flows)
|
||||
Num dissector calls: 1227 (30.67 diss/flow)
|
||||
Num dissector calls: 1232 (30.80 diss/flow)
|
||||
|
||||
Unknown 3 655 3
|
||||
HTTP 116 27378 35
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 1
|
||||
|
||||
DPI Packets (TCP): 28 (28.00 pkts/flow)
|
||||
Confidence Match by IP : 1 (flows)
|
||||
Num dissector calls: 252 (252.00 diss/flow)
|
||||
Num dissector calls: 253 (253.00 diss/flow)
|
||||
|
||||
Google 28 9108 1
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 0
|
||||
|
||||
DPI Packets (TCP): 10 (10.00 pkts/flow)
|
||||
Confidence DPI : 1 (flows)
|
||||
Num dissector calls: 193 (193.00 diss/flow)
|
||||
Num dissector calls: 192 (192.00 diss/flow)
|
||||
|
||||
IMAPS 32 7975 1
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Confidence Unknown : 1 (flows)
|
||||
Confidence Match by port : 6 (flows)
|
||||
Confidence Match by IP : 1 (flows)
|
||||
Confidence DPI : 30 (flows)
|
||||
Num dissector calls: 2069 (54.45 diss/flow)
|
||||
Num dissector calls: 2042 (53.74 diss/flow)
|
||||
|
||||
Unknown 1 66 1
|
||||
HTTP 116 91784 6
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 0
|
||||
|
||||
DPI Packets (TCP): 7 (7.00 pkts/flow)
|
||||
Confidence DPI : 1 (flows)
|
||||
Num dissector calls: 168 (168.00 diss/flow)
|
||||
Num dissector calls: 169 (169.00 diss/flow)
|
||||
|
||||
IRC 29 8945 1
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 1
|
||||
|
||||
DPI Packets (TCP): 26 (26.00 pkts/flow)
|
||||
Confidence Match by port : 1 (flows)
|
||||
Num dissector calls: 413 (413.00 diss/flow)
|
||||
Num dissector calls: 414 (414.00 diss/flow)
|
||||
|
||||
TLS 26 12163 1
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 1
|
||||
|
||||
DPI Packets (TCP): 20 (20.00 pkts/flow)
|
||||
Confidence Match by port : 1 (flows)
|
||||
Num dissector calls: 304 (304.00 diss/flow)
|
||||
Num dissector calls: 305 (305.00 diss/flow)
|
||||
|
||||
Oracle 20 2518 1
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Confidence Unknown : 61 (flows)
|
||||
Confidence Match by port : 27 (flows)
|
||||
Confidence Match by IP : 1 (flows)
|
||||
Confidence DPI : 204 (flows)
|
||||
Num dissector calls: 31948 (109.04 diss/flow)
|
||||
Num dissector calls: 31972 (109.12 diss/flow)
|
||||
|
||||
Unknown 1575 272476 61
|
||||
DNS 2 267 1
|
||||
|
||||
@@ -6,7 +6,7 @@ DPI Packets (other): 5 (1.00 pkts/flow)
|
||||
Confidence Unknown : 45 (flows)
|
||||
Confidence Match by port : 22 (flows)
|
||||
Confidence DPI : 200 (flows)
|
||||
Num dissector calls: 26144 (97.92 diss/flow)
|
||||
Num dissector calls: 26166 (98.00 diss/flow)
|
||||
|
||||
Unknown 850 152468 45
|
||||
DNS 2 267 1
|
||||
|
||||
@@ -3,7 +3,7 @@ Guessed flow protos: 1
|
||||
DPI Packets (TCP): 29 (9.67 pkts/flow)
|
||||
Confidence Match by port : 1 (flows)
|
||||
Confidence DPI : 2 (flows)
|
||||
Num dissector calls: 514 (171.33 diss/flow)
|
||||
Num dissector calls: 515 (171.67 diss/flow)
|
||||
|
||||
SOCKS 46 8383 3
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ DPI Packets (TCP): 19 (9.50 pkts/flow)
|
||||
DPI Packets (UDP): 2 (1.00 pkts/flow)
|
||||
Confidence DPI (cache) : 2 (flows)
|
||||
Confidence DPI : 2 (flows)
|
||||
Num dissector calls: 555 (138.75 diss/flow)
|
||||
Num dissector calls: 556 (139.00 diss/flow)
|
||||
|
||||
TINC 317 352291 4
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ Guessed flow protos: 1
|
||||
|
||||
DPI Packets (TCP): 30 (30.00 pkts/flow)
|
||||
Confidence Unknown : 1 (flows)
|
||||
Num dissector calls: 409 (409.00 diss/flow)
|
||||
Num dissector calls: 410 (410.00 diss/flow)
|
||||
|
||||
Unknown 30 37313 1
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ DPI Packets (UDP): 1 (1.00 pkts/flow)
|
||||
Confidence Unknown : 1 (flows)
|
||||
Confidence Match by port : 9 (flows)
|
||||
Confidence DPI : 23 (flows)
|
||||
Num dissector calls: 885 (26.82 diss/flow)
|
||||
Num dissector calls: 890 (26.97 diss/flow)
|
||||
|
||||
Unknown 10 786 1
|
||||
HTTP 65 64777 8
|
||||
|
||||
@@ -3,7 +3,7 @@ Guessed flow protos: 1
|
||||
DPI Packets (TCP): 26 (13.00 pkts/flow)
|
||||
Confidence Match by port : 1 (flows)
|
||||
Confidence DPI : 1 (flows)
|
||||
Num dissector calls: 493 (246.50 diss/flow)
|
||||
Num dissector calls: 494 (247.00 diss/flow)
|
||||
|
||||
Z3950 31 6308 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user