aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/checkmk.c3
-rw-r--r--src/lib/protocols/irc.c3
-rw-r--r--src/lib/protocols/someip.c14
-rw-r--r--src/lib/protocols/ssh.c2
4 files changed, 10 insertions, 12 deletions
diff --git a/src/lib/protocols/checkmk.c b/src/lib/protocols/checkmk.c
index 281e80bed..e349118bc 100644
--- a/src/lib/protocols/checkmk.c
+++ b/src/lib/protocols/checkmk.c
@@ -69,8 +69,7 @@ static void ndpi_search_checkmk(struct ndpi_detection_module_struct *ndpi_struct
}
}
- NDPI_LOG_DBG(ndpi_struct, "Check_MK excluded.\n");
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_CHECKMK);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
}
diff --git a/src/lib/protocols/irc.c b/src/lib/protocols/irc.c
index 9a0e0b903..5fa2bd2dd 100644
--- a/src/lib/protocols/irc.c
+++ b/src/lib/protocols/irc.c
@@ -99,8 +99,7 @@ static void ndpi_search_irc_tcp(struct ndpi_detection_module_struct *ndpi_struct
NDPI_LOG_DBG(ndpi_struct, "search irc\n");
if((flow->detected_protocol_stack[0] != NDPI_PROTOCOL_IRC && (flow->packet_counter > 10))
|| (flow->packet_counter >= 10)) {
- NDPI_LOG_DBG(ndpi_struct, "exclude irc, packet_counter too high0\n");
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_IRC);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
return;
}
diff --git a/src/lib/protocols/someip.c b/src/lib/protocols/someip.c
index c2e4ee330..ec34787df 100644
--- a/src/lib/protocols/someip.c
+++ b/src/lib/protocols/someip.c
@@ -101,7 +101,7 @@ static void ndpi_search_someip(struct ndpi_detection_module_struct *ndpi_struct,
if (packet->payload_packet_len < 16) {
NDPI_LOG_DBG(ndpi_struct,
"Excluding SOME/IP .. mandatory header not found (not enough data for all fields)\n");
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SOMEIP);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
return;
}
@@ -122,7 +122,7 @@ static void ndpi_search_someip(struct ndpi_detection_module_struct *ndpi_struct,
u_int32_t someip_len = ntohl(someip_data_cover_32(&packet->payload[4]));
if (packet->payload_packet_len != (someip_len + 8)) {
NDPI_LOG_DBG(ndpi_struct, "Excluding SOME/IP .. Length field invalid!\n");
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SOMEIP);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
return;
}
@@ -130,7 +130,7 @@ static void ndpi_search_someip(struct ndpi_detection_module_struct *ndpi_struct,
NDPI_LOG_DBG2(ndpi_struct,"====>>>> SOME/IP protocol version: [%d]\n",protocol_version);
if (protocol_version != LEGAL_PROTOCOL_VERSION){
NDPI_LOG_DBG(ndpi_struct, "Excluding SOME/IP .. invalid protocol version!\n");
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SOMEIP);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
return;
}
@@ -144,7 +144,7 @@ static void ndpi_search_someip(struct ndpi_detection_module_struct *ndpi_struct,
(message_type != SOMEIP_REQUEST_NO_RETURN_ACK) && (message_type != SOMEIP_NOTIFICATION_ACK) && (message_type != SOMEIP_RESPONSE) &&
(message_type != SOMEIP_ERROR) && (message_type != SOMEIP_RESPONSE_ACK) && (message_type != SOMEIP_ERROR_ACK)) {
NDPI_LOG_DBG(ndpi_struct, "Excluding SOME/IP .. invalid message type!\n");
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SOMEIP);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
return;
}
@@ -152,7 +152,7 @@ static void ndpi_search_someip(struct ndpi_detection_module_struct *ndpi_struct,
NDPI_LOG_DBG2(ndpi_struct,"====>>>> SOME/IP return code: [%d]\n", return_code);
if ((return_code >= E_RETURN_CODE_LEGAL_THRESHOLD)) {
NDPI_LOG_DBG(ndpi_struct, "Excluding SOME/IP .. invalid return code!\n");
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SOMEIP);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
return;
}
@@ -165,7 +165,7 @@ static void ndpi_search_someip(struct ndpi_detection_module_struct *ndpi_struct,
}
else{
NDPI_LOG_DBG(ndpi_struct, "Excluding SOME/IP, invalid header for Magic Cookie\n");
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SOMEIP);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
return;
}
}
@@ -179,7 +179,7 @@ static void ndpi_search_someip(struct ndpi_detection_module_struct *ndpi_struct,
}
else{
NDPI_LOG_DBG(ndpi_struct, "Excluding SOME/IP, invalid header for Magic Cookie ACK\n");
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SOMEIP);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
return;
}
}
diff --git a/src/lib/protocols/ssh.c b/src/lib/protocols/ssh.c
index 899b153f1..8c6830727 100644
--- a/src/lib/protocols/ssh.c
+++ b/src/lib/protocols/ssh.c
@@ -530,7 +530,7 @@ static void ndpi_search_ssh_tcp(struct ndpi_detection_module_struct *ndpi_struct
#endif
NDPI_LOG_DBG(ndpi_struct, "excluding ssh at stage %d\n", flow->l4.tcp.ssh_stage);
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SSH);
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
}
/* ************************************************************************ */