aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/telnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols/telnet.c')
-rw-r--r--src/lib/protocols/telnet.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/lib/protocols/telnet.c b/src/lib/protocols/telnet.c
index 42b7624b5..dd451b173 100644
--- a/src/lib/protocols/telnet.c
+++ b/src/lib/protocols/telnet.c
@@ -1,7 +1,7 @@
/*
* telnet.c
*
- * Copyright (C) 2011-22 - ntop.org
+ * Copyright (C) 2011-25 - ntop.org
* Copyright (C) 2009-11 - ipoque GmbH
*
* This file is part of nDPI, an open source deep packet inspection
@@ -209,20 +209,17 @@ static void ndpi_search_telnet_tcp(struct ndpi_detection_module_struct *ndpi_str
#ifdef TELNET_DEBUG
printf("==> [%s:%d] %s()\n", __FILE__, __LINE__, __FUNCTION__);
#endif
- NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+ NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow);
}
return;
}
-void init_telnet_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id)
+void init_telnet_dissector(struct ndpi_detection_module_struct *ndpi_struct)
{
- ndpi_set_bitmask_protocol_detection("Telnet", ndpi_struct, *id,
- NDPI_PROTOCOL_TELNET,
- ndpi_search_telnet_tcp,
- NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
- SAVE_DETECTION_BITMASK_AS_UNKNOWN,
- ADD_TO_DETECTION_BITMASK);
- *id += 1;
+ register_dissector("Telnet", ndpi_struct,
+ ndpi_search_telnet_tcp,
+ NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
+ 1, NDPI_PROTOCOL_TELNET);
}