| .. | ||
| calls.conf | ||
| categories.txt | ||
| config.txt | ||
| config_only_classification.txt | ||
| ja4_fingerprints.csv | ||
| Makefile.dpdk.in | ||
| Makefile.in | ||
| mining_hosts.txt | ||
| ndpi2timeline.py | ||
| ndpiReader.c | ||
| ndpiSimpleIntegration.c | ||
| obfuscation.conf | ||
| only_classification.conf | ||
| perf.conf | ||
| perf.sh | ||
| protos.txt | ||
| protos_huge.txt | ||
| protos_overwrite_domains.txt | ||
| reader_util.c | ||
| reader_util.h | ||
| README.DPDK | ||
| README.md | ||
| risky_domains.txt | ||
| sha1_fingerprints.csv | ||
| tcp_fingerprints.csv | ||
| utests.c | ||
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().