nDPI/example
Ivan Nardi 91bb77a880
A final(?) effort to reduce memory usage per flow (#1389)
Remove some unused fields and re-organize other ones.
In particular:
* Update the parameters of `ndpi_ssl_version2str()` function
* Zattoo, Thunder: these timestamps aren't really used.
* Ftp/mail: these protocols are dissected only over TCP.
* Attention must be paid to TLS.Bittorrent flows to avoid invalid
read/write to `flow->protos.bittorrent.hash` field.

This is the last(?) commit of a long series (see 22241a1d, 227e586e,
730c2360, a8ffcd8b) aiming to reduce library memory consumption.

Before, at nDPI 4.0 (more precisly, at a6b10cf7, because memory stats
were wrong until that commit):
```
nDPI Memory statistics:
	nDPI Memory (once):      221.15 KB
	Flow Memory (per flow):  2.94 KB
```
Now:
```
nDPI Memory statistics:
	nDPI Memory (once):      231.71 KB
	Flow Memory (per flow):  1008 B       <---------
```
i.e. memory usage per flow has been reduced by 66%, dropping below the
psychological threshold of 1 KB.

To further reduce this value, we probably need to look into #1279:
let's fight this battle another day.
2021-12-22 19:54:06 +01:00
..
MacOS Fix the Xcode project 2019-05-15 09:56:10 +08:00
categories.txt Add categories test PCAP 2019-09-27 10:15:20 +02:00
intrusion_detection.c Compile everything with "-W -Wall -Wno-unused-parameter" flags (#1276) 2021-08-20 18:11:13 +02:00
intrusion_detection.h (C) Update 2021-01-07 11:13:36 +01:00
ja3_fingerprints.csv Added NDPI_MALICIOUS_JA3 flow risk 2021-02-22 23:19:23 +01:00
Makefile.dpdk.in Improved libm check via Autoconf. (#1263) 2021-07-28 22:24:03 +02:00
Makefile.in Fixed Mingw64 build, SonerCloud-CI and more. (#1273) 2021-08-18 11:34:16 +02:00
mining_hosts.txt Implemented custom category loading. 2018-04-26 21:10:59 +02:00
ndpi2timeline.py Implemented nDPI timeline visualizer 2019-12-15 23:35:43 +01:00
ndpiReader.c A final(?) effort to reduce memory usage per flow (#1389) 2021-12-22 19:54:06 +01:00
ndpiSimpleIntegration.c A final(?) effort to reduce memory usage per flow (#1389) 2021-12-22 19:54:06 +01:00
protos.txt Improved risk detection mask algorithm 2021-07-26 09:38:53 +02:00
reader_util.c A final(?) effort to reduce memory usage per flow (#1389) 2021-12-22 19:54:06 +01:00
reader_util.h Rework how hostname/SNI info is saved (#1330) 2021-11-24 10:46:48 +01:00
README.DPDK Added DPDK support to ndpiReader 2018-11-10 16:10:22 +01:00
risky_domains.txt Added risky domain flow-risk support 2021-02-21 21:45:46 +01:00
sha1_fingerprints.csv Added NDPI_MALICIOUS_SHA1 flow risk. (#1142) 2021-02-26 17:00:05 +01:00

Prerequisites
-------------

You need to install and compile DPDK in your HOME directory as explained in
See http://core.dpdk.org/doc/quick-start/ for DPDK installation and setup

Once DPDK is built make sure to create a symbolic link

$ cd
$ ln -s dpdk-18.08 DPDK

so the build process will use the DPDK directory letting you have multiple
DPDK versions available on your system


Build
-----
Everything will happen automagically but if you want to do it by hand
do: make -f Makefile.dpdk


Run Application
---------------
Supposing to capture packets from device eno1 you can start the
application as follows:

sudo ./build/ndpiReader -c 1 --vdev=net_pcap0,iface=eno1 -- -v 1

NOTE:
- ndpiReader without DPDK support sits in this directory
- ndpiReader with DPDK support can be found inside the ./build directory