aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols/sip.c')
-rw-r--r--src/lib/protocols/sip.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/lib/protocols/sip.c b/src/lib/protocols/sip.c
index 31166a175..42be61b51 100644
--- a/src/lib/protocols/sip.c
+++ b/src/lib/protocols/sip.c
@@ -2,7 +2,7 @@
* sip.c
*
* Copyright (C) 2009-11 - ipoque GmbH
- * Copyright (C) 2011-22 - ntop.org
+ * Copyright (C) 2011-25 - ntop.org
*
* This file is part of nDPI, an open source deep packet inspection
* library based on the OpenDPI and PACE technology by ipoque GmbH
@@ -236,7 +236,7 @@ static void ndpi_search_sip(struct ndpi_detection_module_struct *ndpi_struct, st
NDPI_LOG_DBG(ndpi_struct, "Searching for SIP\n");
if(flow->packet_counter >= 8) {
- NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+ NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow);
return;
}
@@ -251,7 +251,7 @@ static void ndpi_search_sip(struct ndpi_detection_module_struct *ndpi_struct, st
}
if(!isprint(packet_payload[0])) {
- NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+ NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow);
return;
}
}
@@ -273,14 +273,10 @@ static void ndpi_search_sip(struct ndpi_detection_module_struct *ndpi_struct, st
/* ********************************************************** */
-void init_sip_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id) {
- ndpi_set_bitmask_protocol_detection("SIP", ndpi_struct, *id,
- NDPI_PROTOCOL_SIP,
- ndpi_search_sip,
- NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_OR_UDP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,/* Fix courtesy of Miguel Quesada <mquesadab@gmail.com> */
- SAVE_DETECTION_BITMASK_AS_UNKNOWN,
- ADD_TO_DETECTION_BITMASK);
-
- *id += 1;
+void init_sip_dissector(struct ndpi_detection_module_struct *ndpi_struct) {
+ register_dissector("SIP", ndpi_struct,
+ ndpi_search_sip,
+ NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_OR_UDP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
+ 1, NDPI_PROTOCOL_SIP);
}