nDPI/example
Vitaly Lavrov c79d883936
Some checks failed
CIFuzz / Fuzzing (address) (push) Has been cancelled
CIFuzz / Fuzzing (memory) (push) Has been cancelled
CIFuzz / Fuzzing (undefined) (push) Has been cancelled
Merge branch 'github.dev' into flow_info-4
2026-07-07 12:14:31 +03:00
..
calls.conf STUN: fix monitoring (#2639) 2024-12-06 20:19:28 +01:00
categories.txt IPv6: add support for custom categories (#2126) 2023-10-29 12:56:44 +01:00
config.txt Fix test configuration 2025-06-03 12:53:23 +02:00
config_only_classification.txt Add configuration for the new nDPI server fingerprint (#3147) 2026-03-27 19:52:04 +01:00
ja4_fingerprints.csv Add (kind of) support for loading a list of JA4C malicious fingerprints (#2678) 2025-01-14 12:05:03 +01:00
Makefile.dpdk.in Build system: Respect user CFLAGS and LDFLAGS, remove hardcoded -g (#3034) 2025-11-20 12:43:11 +01:00
Makefile.in ndpiReader: add perf support for "runtime" code (#3124) 2026-02-20 12:27:49 +01:00
mining_hosts.txt Implemented custom category loading. 2018-04-26 21:10:59 +02:00
ndpi2timeline.py ipaddr2list.py, ndpi2timeline.py: reformatted (#2509) 2024-07-18 20:35:47 +02:00
ndpiReader.c Merge commit 'cf193d33c1' into flow_info-4 2026-05-07 12:00:40 +03:00
ndpiSimpleIntegration.c Merge branch 'github.dev' into flow_info-4 2026-07-07 12:14:31 +03:00
obfuscation.conf Improved configuration to enable/disable export of flow risk info (#2780) 2025-03-25 21:35:01 +01:00
only_classification.conf Add configuration for the new nDPI server fingerprint (#3147) 2026-03-27 19:52:04 +01:00
perf.conf Add configuration for the new nDPI server fingerprint (#3147) 2026-03-27 19:52:04 +01:00
perf.sh ndpiReader: add perf support for "runtime" code (#3124) 2026-02-20 12:27:49 +01:00
protos.txt tests: extend utests 2025-11-18 13:32:14 +01:00
protos_huge.txt Add a configuration to test a huge number of custom protocols (#2865) 2025-06-03 20:46:58 +02:00
protos_overwrite_domains.txt Allow to overwrite domain matching via custom rules (#2999) 2025-10-20 15:28:16 +02:00
reader_util.c Merge branch 'github.dev' into flow_info-4 2026-07-07 12:14:31 +03:00
reader_util.h Merge commit '68c7159a72' into flow_info-4 2026-05-07 10:17:25 +03:00
README.DPDK Added DPDK support to ndpiReader 2018-11-10 16:10:22 +01:00
README.md ndpiReader: install custom memory allocators before any nDPI API usage (#3164) 2026-04-21 10:20:33 +02:00
risky_domains.txt Added risky domain flow-risk support 2021-02-21 21:45:46 +01:00
sha1_fingerprints.csv fuzz: extend fuzzing coverage (#2205) 2023-12-11 12:48:50 +01:00
tcp_fingerprints.csv fuzz: try to improve fuzzing coverage (#2981) 2025-10-06 20:44:31 +02:00
utests.c fuzz: harden ndpi_hex_decode and add targeted parser harnesses (#3163) 2026-04-20 16:21:30 +02:00

nDPI example tools

This directory contains sample programs that link against libnDPI, mainly ndpiReader (CLI over pcaps and live capture) and ndpiSimpleIntegration. DPDK-specific notes live in README.DPDK.

Custom memory allocators

nDPI can use application-provided allocators via ndpi_set_memory_alloction_functions() (see ndpi_api.h / ndpi_memory.c). Every pointer obtained through ndpi_malloc(), ndpi_calloc(), ndpi_strdup(), APIs that allocate internally (e.g. ndpi_init_bin()), or memory owned by the library must be released with the matching ndpi_free() path that uses the same allocator configuration as at allocation time. From a practical point of view, that means that the application code must installs its hooks once, via ndpi_set_memory_alloction_functions() before ANY library functions.

IF your own application wants to use ndpi_malloc() and similar functions also for its own allocations, ndpi_set_memory_alloction_functions() must be called before ANY allocations, from the library and from the application, both. All these memory must be freed via ndpi_free().