diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2022-02-20 10:20:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-20 10:20:46 +0100 |
commit | 59993e294eb20d84db1a42b59cbd0f3be03d1400 (patch) | |
tree | 047b35fd1f0b114589e698313f44e4cff9a8801c | |
parent | 2f5f445f7229592c9a9a108e39fa5db3dc456dce (diff) |
EthernetIP: add missing initialization (#1448)
Fix:1e1cfb89
-rw-r--r-- | src/include/ndpi_protocols.h | 1 | ||||
-rw-r--r-- | src/lib/ndpi_main.c | 3 | ||||
-rw-r--r-- | tests/result/ethernetIP.pcap.out | 14 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/include/ndpi_protocols.h b/src/include/ndpi_protocols.h index ae72659dc..9338d5a71 100644 --- a/src/include/ndpi_protocols.h +++ b/src/include/ndpi_protocols.h @@ -220,6 +220,7 @@ void init_genshin_impact_dissector(struct ndpi_detection_module_struct *ndpi_str void init_z3950_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask); void init_avast_securedns_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask); void init_cassandra_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask); +void init_ethernet_ip_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask); /* ndpi_main.c */ extern u_int32_t ndpi_ip_port_hash_funct(u_int32_t ip, u_int16_t port); diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 33c291b96..825c1597b 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -4223,6 +4223,9 @@ void ndpi_set_protocol_detection_bitmask2(struct ndpi_detection_module_struct *n /* Cassandra */ init_cassandra_dissector(ndpi_str, &a, detection_bitmask); + /* EthernetIP */ + init_ethernet_ip_dissector(ndpi_str, &a, detection_bitmask); + #ifdef CUSTOM_NDPI_PROTOCOLS #include "../../../nDPI-custom/custom_ndpi_main_init.c" #endif diff --git a/tests/result/ethernetIP.pcap.out b/tests/result/ethernetIP.pcap.out index 50f7bd1b8..bd4589625 100644 --- a/tests/result/ethernetIP.pcap.out +++ b/tests/result/ethernetIP.pcap.out @@ -1,11 +1,11 @@ -Guessed flow protos: 4 +Guessed flow protos: 0 -DPI Packets (TCP): 100 (25.00 pkts/flow) -Confidence Match by port : 4 (flows) +DPI Packets (TCP): 4 (1.00 pkts/flow) +Confidence DPI : 4 (flows) EthernetIP 100 17384 4 - 1 TCP 141.81.0.10:50275 <-> 141.81.0.83:44818 [proto: 278/EthernetIP][ClearText][Confidence: Match by port][cat: Network/14][12 pkts/2716 bytes <-> 16 pkts/2580 bytes][Goodput ratio: 76/66][0.70 sec][bytes ratio: 0.026 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 72/38 231/232 96/75][Pkt Len c2s/s2c min/avg/max/stddev: 54/60 226/161 1258/406 330/99][PLAIN TEXT (99999999359)][Plen Bins: 0,20,45,0,10,0,0,5,0,5,0,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0] - 2 TCP 141.81.0.63:44818 <-> 141.81.0.10:52593 [proto: 278/EthernetIP][ClearText][Confidence: Match by port][cat: Network/14][16 pkts/2150 bytes <-> 13 pkts/2566 bytes][Goodput ratio: 58/73][0.78 sec][bytes ratio: -0.088 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/1 30/60 190/197 55/74][Pkt Len c2s/s2c min/avg/max/stddev: 60/54 134/197 406/528 92/158][PLAIN TEXT (99999999356)][Plen Bins: 0,15,43,0,5,0,10,5,0,0,5,5,5,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - 3 TCP 141.81.0.10:52594 <-> 141.81.0.43:44818 [proto: 278/EthernetIP][ClearText][Confidence: Match by port][cat: Network/14][9 pkts/1978 bytes <-> 12 pkts/1784 bytes][Goodput ratio: 75/62][0.66 sec][bytes ratio: 0.052 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 1/0 61/33 196/185 73/56][Pkt Len c2s/s2c min/avg/max/stddev: 54/60 220/149 528/406 163/113][PLAIN TEXT (rWKIm.)][Plen Bins: 0,14,35,0,7,0,14,0,0,7,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - 4 TCP 141.81.0.10:62717 <-> 141.81.0.23:44818 [proto: 278/EthernetIP][ClearText][Confidence: Match by port][cat: Network/14][11 pkts/2132 bytes <-> 11 pkts/1478 bytes][Goodput ratio: 72/58][0.65 sec][bytes ratio: 0.181 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 52/48 202/242 68/82][Pkt Len c2s/s2c min/avg/max/stddev: 54/60 194/134 528/406 156/96][PLAIN TEXT (DISABLE)][Plen Bins: 0,20,41,0,6,0,13,0,0,0,0,6,6,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 1 TCP 141.81.0.10:50275 <-> 141.81.0.83:44818 [proto: 278/EthernetIP][ClearText][Confidence: DPI][cat: Network/14][12 pkts/2716 bytes <-> 16 pkts/2580 bytes][Goodput ratio: 76/66][0.70 sec][bytes ratio: 0.026 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 72/38 231/232 96/75][Pkt Len c2s/s2c min/avg/max/stddev: 54/60 226/161 1258/406 330/99][PLAIN TEXT (99999999359)][Plen Bins: 0,20,45,0,10,0,0,5,0,5,0,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0] + 2 TCP 141.81.0.63:44818 <-> 141.81.0.10:52593 [proto: 278/EthernetIP][ClearText][Confidence: DPI][cat: Network/14][16 pkts/2150 bytes <-> 13 pkts/2566 bytes][Goodput ratio: 58/73][0.78 sec][bytes ratio: -0.088 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/1 30/60 190/197 55/74][Pkt Len c2s/s2c min/avg/max/stddev: 60/54 134/197 406/528 92/158][PLAIN TEXT (99999999356)][Plen Bins: 0,15,43,0,5,0,10,5,0,0,5,5,5,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 3 TCP 141.81.0.10:52594 <-> 141.81.0.43:44818 [proto: 278/EthernetIP][ClearText][Confidence: DPI][cat: Network/14][9 pkts/1978 bytes <-> 12 pkts/1784 bytes][Goodput ratio: 75/62][0.66 sec][bytes ratio: 0.052 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 1/0 61/33 196/185 73/56][Pkt Len c2s/s2c min/avg/max/stddev: 54/60 220/149 528/406 163/113][PLAIN TEXT (rWKIm.)][Plen Bins: 0,14,35,0,7,0,14,0,0,7,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] + 4 TCP 141.81.0.10:62717 <-> 141.81.0.23:44818 [proto: 278/EthernetIP][ClearText][Confidence: DPI][cat: Network/14][11 pkts/2132 bytes <-> 11 pkts/1478 bytes][Goodput ratio: 72/58][0.65 sec][bytes ratio: 0.181 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 0/0 52/48 202/242 68/82][Pkt Len c2s/s2c min/avg/max/stddev: 54/60 194/134 528/406 156/96][PLAIN TEXT (DISABLE)][Plen Bins: 0,20,41,0,6,0,13,0,0,0,0,6,6,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] |