diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2024-06-17 10:11:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-17 10:11:17 +0200 |
commit | 2bedd14aae1294528bafbe03b9307a4eacb09bcb (patch) | |
tree | b3324e1a3791ec75e01ea934f0fd18ac9969d528 /src/lib | |
parent | f796c943753b3125950d75a64dee7e869d21d775 (diff) |
Update main Readme and remove commented out code (#2471)
Avoid that useless code is copy-and-pasted into new dissector, as in
https://github.com/ntop/nDPI/pull/2470#discussion_r1639384434
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/protocols/amqp.c | 6 | ||||
-rw-r--r-- | src/lib/protocols/crossfire.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/qq.c | 3 | ||||
-rw-r--r-- | src/lib/protocols/world_of_warcraft.c | 3 | ||||
-rw-r--r-- | src/lib/protocols/zabbix.c | 3 |
5 files changed, 6 insertions, 11 deletions
diff --git a/src/lib/protocols/amqp.c b/src/lib/protocols/amqp.c index 61c8f02a9..ce0397e70 100644 --- a/src/lib/protocols/amqp.c +++ b/src/lib/protocols/amqp.c @@ -35,8 +35,7 @@ struct amqp_header { } PACK_OFF; static void ndpi_int_amqp_add_connection(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow/* , */ - /* ndpi_protocol_type_t protocol_type */) { + struct ndpi_flow_struct *flow) { ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_AMQP, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); } @@ -45,7 +44,6 @@ static void ndpi_search_amqp(struct ndpi_detection_module_struct *ndpi_struct, s NDPI_LOG_DBG(ndpi_struct, "search amqp\n"); - if (packet->tcp != NULL) { if(packet->payload_packet_len > sizeof(struct amqp_header)) { struct amqp_header *h = (struct amqp_header*)packet->payload; @@ -69,7 +67,7 @@ static void ndpi_search_amqp(struct ndpi_detection_module_struct *ndpi_struct, s } } } - } + if(flow->packet_counter > 5) NDPI_EXCLUDE_PROTO(ndpi_struct, flow); } diff --git a/src/lib/protocols/crossfire.c b/src/lib/protocols/crossfire.c index 547db2e8b..e0f462f86 100644 --- a/src/lib/protocols/crossfire.c +++ b/src/lib/protocols/crossfire.c @@ -30,7 +30,7 @@ static void ndpi_int_crossfire_add_connection(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow/* , ndpi_protocol_type_t protocol_type */) + struct ndpi_flow_struct *flow) { ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_CROSSFIRE, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); diff --git a/src/lib/protocols/qq.c b/src/lib/protocols/qq.c index 3a9039874..efe35e8e5 100644 --- a/src/lib/protocols/qq.c +++ b/src/lib/protocols/qq.c @@ -31,8 +31,7 @@ static void ndpi_int_qq_add_connection(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow/* , */ - /* ndpi_protocol_type_t protocol_type */) + struct ndpi_flow_struct *flow) { ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_QQ, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); } diff --git a/src/lib/protocols/world_of_warcraft.c b/src/lib/protocols/world_of_warcraft.c index 6c0ab8ee4..e0e8dba08 100644 --- a/src/lib/protocols/world_of_warcraft.c +++ b/src/lib/protocols/world_of_warcraft.c @@ -29,8 +29,7 @@ #include "ndpi_private.h" static void ndpi_int_worldofwarcraft_add_connection(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow/* , */ - /* ndpi_protocol_type_t protocol_type */) + struct ndpi_flow_struct *flow) { ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_WORLDOFWARCRAFT, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); } diff --git a/src/lib/protocols/zabbix.c b/src/lib/protocols/zabbix.c index 0eb776307..84e466de5 100644 --- a/src/lib/protocols/zabbix.c +++ b/src/lib/protocols/zabbix.c @@ -28,8 +28,7 @@ /* *************************************************** */ static void ndpi_int_zabbix_add_connection(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow/* , */ - /* ndpi_protocol_type_t protocol_type */) { + struct ndpi_flow_struct *flow) { ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_ZABBIX, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); } |