diff options
Diffstat (limited to 'src/lib/protocols/afp.c')
-rw-r--r-- | src/lib/protocols/afp.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/lib/protocols/afp.c b/src/lib/protocols/afp.c index 73d623457..4560ac71a 100644 --- a/src/lib/protocols/afp.c +++ b/src/lib/protocols/afp.c @@ -2,7 +2,7 @@ * afp.c * * Copyright (C) 2009-11 by 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 @@ -58,7 +58,7 @@ static void ndpi_search_afp(struct ndpi_detection_module_struct *ndpi_struct, st as they are not an indication that this flow is not AFP */ if(flow->packet_counter > 5) - NDPI_EXCLUDE_PROTO(ndpi_struct, flow); + NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow); return; } @@ -72,18 +72,15 @@ static void ndpi_search_afp(struct ndpi_detection_module_struct *ndpi_struct, st } } - NDPI_EXCLUDE_PROTO(ndpi_struct, flow); + NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow); } -void init_afp_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id) +void init_afp_dissector(struct ndpi_detection_module_struct *ndpi_struct) { - ndpi_set_bitmask_protocol_detection("AFP", ndpi_struct, *id, - NDPI_PROTOCOL_AFP, - ndpi_search_afp, - NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION, - SAVE_DETECTION_BITMASK_AS_UNKNOWN, - ADD_TO_DETECTION_BITMASK); - *id += 1; + register_dissector("AFP", ndpi_struct, + ndpi_search_afp, + NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION, + 1, NDPI_PROTOCOL_AFP); } |