diff options
author | Vladimir Gavrilov <105977161+0xA50C1A1@users.noreply.github.com> | 2024-01-29 11:25:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-29 09:25:29 +0100 |
commit | fb095a339db96151bd69e1b6c221906a856f4d7c (patch) | |
tree | 1f45001dcad3c29ca3f5c423c6135e322d256a8a | |
parent | c807d84054f605202bd9633092b16627a8a5e790 (diff) |
Add missing NDPI_LOG_DBG in some dissectors (#2290)
* Add missing NDPI_LOG_DBG
* Add missing NDPI_LOG_DBG in yojimbo.c
-rw-r--r-- | src/lib/protocols/fins.c | 4 | ||||
-rw-r--r-- | src/lib/protocols/hislip.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/json-rpc.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/mumble.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/mysql.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/opc-ua.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/radmin.c | 2 | ||||
-rw-r--r-- | src/lib/protocols/yojimbo.c | 3 |
8 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/protocols/fins.c b/src/lib/protocols/fins.c index 8fd16f562..f4b2c4d86 100644 --- a/src/lib/protocols/fins.c +++ b/src/lib/protocols/fins.c @@ -54,7 +54,9 @@ static void ndpi_search_fins(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct const * const packet = &ndpi_struct->packet; - + + NDPI_LOG_DBG(ndpi_struct, "search Omron FINS\n"); + /* FINS/TCP header is 20 bytes long, but it's usually followed * by 10 byte FINS header and command data */ diff --git a/src/lib/protocols/hislip.c b/src/lib/protocols/hislip.c index fbb04d545..28df9017d 100644 --- a/src/lib/protocols/hislip.c +++ b/src/lib/protocols/hislip.c @@ -46,6 +46,8 @@ static void ndpi_search_hislip(struct ndpi_detection_module_struct *ndpi_struct, { struct ndpi_packet_struct const * const packet = &ndpi_struct->packet; + NDPI_LOG_DBG(ndpi_struct, "search HiSLIP\n"); + if ((packet->payload_packet_len >= 16) && (memcmp(packet->payload, "HS", 2) == 0) && ((packet->payload[2] - 26) < 0x65) && (ndpi_ntohll(get_u_int64_t(packet->payload, 8)) == (u_int64_t)(packet->payload_packet_len - 16))) diff --git a/src/lib/protocols/json-rpc.c b/src/lib/protocols/json-rpc.c index c989fbea4..694e3ce5e 100644 --- a/src/lib/protocols/json-rpc.c +++ b/src/lib/protocols/json-rpc.c @@ -34,6 +34,8 @@ static void ndpi_search_json_rpc(struct ndpi_detection_module_struct *ndpi_struc { struct ndpi_packet_struct const * const packet = &ndpi_struct->packet; + NDPI_LOG_DBG(ndpi_struct, "search JSON-RPC\n"); + if (flow->detected_protocol_stack[0] == NDPI_PROTOCOL_HTTP || flow->detected_protocol_stack[1] == NDPI_PROTOCOL_HTTP) { diff --git a/src/lib/protocols/mumble.c b/src/lib/protocols/mumble.c index ed9dbd8a4..f8ae1208a 100644 --- a/src/lib/protocols/mumble.c +++ b/src/lib/protocols/mumble.c @@ -34,6 +34,8 @@ static void ndpi_search_mumble(struct ndpi_detection_module_struct *ndpi_struct, { struct ndpi_packet_struct const * const packet = &ndpi_struct->packet; + NDPI_LOG_DBG(ndpi_struct, "search Mumble\n"); + if (current_pkt_from_client_to_server(ndpi_struct, flow) && packet->payload_packet_len == 12) { diff --git a/src/lib/protocols/mysql.c b/src/lib/protocols/mysql.c index 7560f6030..5e9e4e090 100644 --- a/src/lib/protocols/mysql.c +++ b/src/lib/protocols/mysql.c @@ -35,6 +35,8 @@ static void ndpi_search_mysql_tcp(struct ndpi_detection_module_struct *ndpi_stru { struct ndpi_packet_struct const * const packet = &ndpi_struct->packet; + NDPI_LOG_DBG(ndpi_struct, "search MySQL\n"); + if(packet->payload_packet_len > 70 && packet->payload_packet_len < 120) { u_int32_t length = (packet->payload[2] << 16) + (packet->payload[1] << 8) + packet->payload[0]; diff --git a/src/lib/protocols/opc-ua.c b/src/lib/protocols/opc-ua.c index 8f2ab50a6..d01e7795c 100644 --- a/src/lib/protocols/opc-ua.c +++ b/src/lib/protocols/opc-ua.c @@ -45,6 +45,8 @@ static void ndpi_search_opc_ua(struct ndpi_detection_module_struct *ndpi_struct, { struct ndpi_packet_struct const * const packet = &ndpi_struct->packet; + NDPI_LOG_DBG(ndpi_struct, "search OPC UA\n"); + /* Shortest OPC UA packet I've ever seen */ if (packet->payload_packet_len >= 16) { /* Each OPC UA MessageChunk starts with a 3 byte ASCII code that defines diff --git a/src/lib/protocols/radmin.c b/src/lib/protocols/radmin.c index 4ecf12f1b..174c8e3f7 100644 --- a/src/lib/protocols/radmin.c +++ b/src/lib/protocols/radmin.c @@ -44,6 +44,8 @@ static void ndpi_search_radmin(struct ndpi_detection_module_struct *ndpi_struct, { struct ndpi_packet_struct const * const packet = &ndpi_struct->packet; + NDPI_LOG_DBG(ndpi_struct, "search Radmin\n"); + if (current_pkt_from_client_to_server(ndpi_struct, flow) && packet->payload_packet_len == 10 && !flow->l4.tcp.radmin_stage) { diff --git a/src/lib/protocols/yojimbo.c b/src/lib/protocols/yojimbo.c index d59fa3e90..9434bb5ee 100644 --- a/src/lib/protocols/yojimbo.c +++ b/src/lib/protocols/yojimbo.c @@ -39,6 +39,9 @@ static void ndpi_search_yojimbo(struct ndpi_detection_module_struct *ndpi_struct struct ndpi_flow_struct *flow) { struct ndpi_packet_struct const * const packet = &ndpi_struct->packet; + + NDPI_LOG_DBG(ndpi_struct, "search Yojimbo\n"); + uint64_t const magic = 0x4e4554434f444520; // "NETCODE " if (packet->payload_packet_len < 9) |