aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-01-25 11:44:09 +0100
committerGitHub <noreply@github.com>2023-01-25 11:44:09 +0100
commit29c5cc39fb7f714897c3d6a3454e696e263fb9bc (patch)
treec56dbdb0eb6a4763306adaa73171be77243a1ba9 /example/ndpiReader.c
parent5849863ef91b9b6a3acc8f1799c6b3642d35f34c (diff)
Some small changes (#1869)
All dissector callbacks should not be exported by the library; make static some other local functions. The callback logic in `ndpiReader` has never been used. With internal libgcrypt, `gcry_control()` should always return no errors. We can check `categories` length at compilation time.
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index d98754db7..66706044a 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -2361,17 +2361,6 @@ static void node_idle_scan_walker(const void *node, ndpi_VISIT which, int depth,
/* *********************************************** */
-/**
- * @brief On Protocol Discover - demo callback
- */
-static void on_protocol_discovered(struct ndpi_workflow * workflow,
- struct ndpi_flow_info * flow,
- void * udata) {
- ;
-}
-
-/* *********************************************** */
-
#if 0
/**
* @brief Print debug
@@ -2430,11 +2419,6 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) {
ndpi_thread_info[thread_id].workflow = ndpi_workflow_init(&prefs, pcap_handle, 1,
serialization_format);
- /* Preferences */
- ndpi_workflow_set_flow_detected_callback(ndpi_thread_info[thread_id].workflow,
- on_protocol_discovered,
- (void *)(uintptr_t)thread_id);
-
/* Protocols to enable/disable. Default: everything is enabled */
NDPI_BITMASK_SET_ALL(enabled_bitmask);
if(_disabled_protocols != NULL) {