aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/whatsapp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols/whatsapp.c')
-rw-r--r--src/lib/protocols/whatsapp.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/lib/protocols/whatsapp.c b/src/lib/protocols/whatsapp.c
index 2a9564501..f53dbfce3 100644
--- a/src/lib/protocols/whatsapp.c
+++ b/src/lib/protocols/whatsapp.c
@@ -93,7 +93,7 @@ static void ndpi_search_whatsapp(struct ndpi_detection_module_struct *ndpi_struc
if (flow->packet_counter > 3)
{
- NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+ NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow);
return;
}
@@ -116,20 +116,14 @@ static void ndpi_search_whatsapp(struct ndpi_detection_module_struct *ndpi_struc
return;
}
- NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+ NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow);
}
-void init_whatsapp_dissector(struct ndpi_detection_module_struct *ndpi_struct,
- u_int32_t *id)
+void init_whatsapp_dissector(struct ndpi_detection_module_struct *ndpi_struct)
{
- ndpi_set_bitmask_protocol_detection(
- "WhatsApp", ndpi_struct, *id,
- NDPI_PROTOCOL_WHATSAPP,
- ndpi_search_whatsapp,
- NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
- SAVE_DETECTION_BITMASK_AS_UNKNOWN,
- ADD_TO_DETECTION_BITMASK
- );
- *id += 1;
+ register_dissector("WhatsApp", ndpi_struct,
+ ndpi_search_whatsapp,
+ NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
+ 1, NDPI_PROTOCOL_WHATSAPP);
}