aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/cpha.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols/cpha.c')
-rw-r--r--src/lib/protocols/cpha.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/lib/protocols/cpha.c b/src/lib/protocols/cpha.c
index b2967413f..6b2f1c79f 100644
--- a/src/lib/protocols/cpha.c
+++ b/src/lib/protocols/cpha.c
@@ -1,7 +1,7 @@
/*
* qq.c
*
- * 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
@@ -48,17 +48,13 @@ static void ndpi_search_cpha(struct ndpi_detection_module_struct *ndpi_struct, s
) {
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_CPHA, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
} else
- NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+ NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow);
}
-void init_cpha_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id) {
- ndpi_set_bitmask_protocol_detection("CPHA", ndpi_struct, *id,
- NDPI_PROTOCOL_CPHA,
- ndpi_search_cpha,
- NDPI_SELECTION_BITMASK_PROTOCOL_UDP_WITH_PAYLOAD, /* TODO: ipv6 support? */
- SAVE_DETECTION_BITMASK_AS_UNKNOWN,
- ADD_TO_DETECTION_BITMASK);
-
- *id += 1;
+void init_cpha_dissector(struct ndpi_detection_module_struct *ndpi_struct) {
+ register_dissector("CPHA", ndpi_struct,
+ ndpi_search_cpha,
+ NDPI_SELECTION_BITMASK_PROTOCOL_UDP_WITH_PAYLOAD, /* TODO: ipv6 support? */
+ 1, NDPI_PROTOCOL_CPHA);
}