nDPI/example
Ivan Nardi 30aae910ed Kerberos: export S4U (S4U2Self and S4U2Proxy) requests
With S4U (MS-SFU) a service requests a ticket on behalf of a user: the
client name of the reply is the user, but the client of the flow is the
service. Without knowing it, the users of the metadata bind the user to
the host of the service.

Export it in the new field "s4u", set for the first TGS-REQ with:
- PA-FOR-USER (129) or PA-S4U-X509-USER (130): S4U2Self
- the cname-in-addl-tkt KDC option: S4U2Proxy (constrained delegation);
  additional tickets without this option are user-to-user
2026-11-05 13:28:09 +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 Kerberos: export S4U (S4U2Self and S4U2Proxy) requests 2026-11-05 13:28:09 +01:00
ndpiSimpleIntegration.c Dynamic host_server_name and add JA5 implementation(#3257) 2026-09-14 10:34:33 +02: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 Kerberos: export S4U (S4U2Self and S4U2Proxy) requests 2026-11-05 13:28:09 +01:00
reader_util.h Kerberos: export S4U (S4U2Self and S4U2Proxy) requests 2026-11-05 13:28:09 +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 Add TLS 1.3 negotiated non-PQC group risk (#3267) 2026-10-08 08:57:27 +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().