nDPI/example
Ivan Nardi 4421ae2cc9
Fix CI failures (#3327)
* Update WebattackRCE.pcap.out to the new "Known Proto on Non Std
  Port" risk description
* Windows: add missing MAX_NUM_TLS_MONITORED_BLOCKS define
* Mingw: avoid %zu in printf formats; with GCC 13 and mingw-w64 13
  headers (Ubuntu 26.04) it is rejected by -Wformat
* Python: switch from 3.9 (not available on Ubuntu 26.04) to 3.14
  and explicitly install setuptools
2026-11-13 17:38:19 +01: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 Build: compiler-driven header dependency tracking; fix --with-ndpi-pro (#3239) 2026-08-29 14:54:11 +02: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 Fix CI failures (#3327) 2026-11-13 17:38:19 +01:00
ndpiSimpleIntegration.c Fix CI failures (#3327) 2026-11-13 17:38:19 +01: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 HTTP subprotocols are not set only in case HTTP returns a positive response. 2026-11-12 12:47:04 +01:00
reader_util.h Kerberos: add helpers to describe and serialize the metadata (#3317) 2026-11-05 19:46:37 +01: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 Updated nDPI TCP fingerprint format 2026-09-29 10:32:21 +02:00
utests.c Compilation fixes 2026-11-12 16:29:00 +01: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().