Commit Graph

29 Commits

Author SHA1 Message Date
Toni Uhlig
464450486b bump libnDPI to a944514ddec73f79704f55aab1423e39f4ce7a03
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2023-01-09 11:24:40 +01:00
Toni Uhlig
c5930e3510 Add collectd statistics diff test.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-12-06 19:51:53 +01:00
Toni Uhlig
60741d5649 Strace support for diff tests.
* tiny README update

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-12-03 01:21:20 +01:00
Toni Uhlig
57c5d8532b Test for diff's in flow-analyse CSV generator daemon.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-11-16 23:06:37 +01:00
lns
49ea4f8474 Small fixes.
Signed-off-by: lns <matzeton@googlemail.com>
2022-10-01 22:37:25 +02:00
Toni Uhlig
9a28475bba Improved flown analyse event:
* store packet directions
 * merged direction based IATs
 * merged direction based PKTLENs

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-09-22 19:07:08 +02:00
Toni Uhlig
28971cd764 flow-info.py: Command line arguments --no-color, --no-statusbar (both useful for tests/CI) and --print-analyse-results.
* run_tests.sh: Use flow-info.py for additional DIFF tests.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-09-22 08:00:21 +02:00
lns
905545487d Split flow_packets_processed' into flow_src_packets_processed' and `flow_dst_packets_processed'.
* no use for `flow_avg_l4_payload_len' -> removed
 * test/run_tests.sh does not fail if git-worktree's are used

Signed-off-by: lns <matzeton@googlemail.com>
2022-08-15 18:36:49 +02:00
Toni Uhlig
1a0d7ddbfa Process additional layer 3 protocols.
* bump libnDPI to c53c82d4823b5a8f856d1375155ac5112b68e8af
 * run_tests.sh: improved execution from non-git directories e.g. via `make dist`
 * updated JSON schema to be more restrictive
 * nDPId: splitted generic get_ip_from_sockaddr into IPv4/IPv6 to prevent compiler warnings on some platforms

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-01-31 20:54:02 +01:00
Toni Uhlig
9e07a57566 Major nDPId extension. Sorry for the huge commit.
- nDPId: fixed invalid IP4/IP6 tuple compare
 - nDPIsrvd: fixed caching issue (finally)
 - added tiny c example (can be used to check flow manager sanity)
 - c-captured: use flow_last_seen timestamp from `struct nDPIsrvd_flow`
 - README.md update: added example JSON sequence
 - nDPId: added new flow event `update` necessary for correct
   timeout handling (and other future use-cases)
 - nDPIsrvd.h and nDPIsrvd.py: switched to an instance
   (consists of an alias/source tuple) based flow manager
 - every flow related event **must** now serialize `alias`, `source`,
   `flow_id`, `flow_last_seen` and `flow_idle_time` to make the timeout
   handling and verification process work correctly
 - nDPIsrvd.h: ability to profile any dynamic memory (de-)allocation
 - nDPIsrvd.py: removed PcapPacket class (unused)
 - py-flow-dashboard and py-flow-multiprocess: fixed race condition
 - py-flow-info: print statusbar with probably useful information
 - nDPId/nDPIsrvd.h: switched from packet-flow only timestamps (`pkt_*sec`)
   to a generic flow event timestamp `ts_msec`
 - nDPId-test: added additional checks
 - nDPId: increased ICMP flow timeout
 - nDPId: using event based i/o if capturing packets from a device
 - nDPIsrvd: fixed memory leak on shutdown if remote descriptors
   were still connected

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-01-20 00:50:38 +01:00
Toni Uhlig
992d3a207d dumb fuzzer: randpkt vs nDPId-test
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-09-20 00:28:44 +02:00
Toni Uhlig
7829bfe4e6 CI extended and fixups
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-09-19 11:30:55 +02:00
Toni Uhlig
19e4038ce5 bump libnDPI to ced6fca184a4549333c2d582e53419f66cd99ec1
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-06-29 17:32:37 +02:00
Toni Uhlig
114365a480 Enable memory profiling for nDPId-test.
* print a summary

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-06-18 13:37:44 +02:00
Toni Uhlig
7daeee141d make dist
* fixed run_tests.sh file check bug, CI compat
 * updated results due to libnDPI submodule update

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-06-08 16:18:54 +02:00
Toni Uhlig
a41ddafa88 Git tag/commit version printing for nDPId/nDPIsrvd. Reduces confusion.
* disabled subshell spawn for run_tests.sh, common pitfall while using counters

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-06-08 15:23:33 +02:00
Toni Uhlig
db39772aa7 Fixed CMake global CFLAGS misuse which can cause xcompile errors.
nDPIsrvd-captured supports skipping flows w/o any layer 4 payload.

 * libndpi update
 * run_tests does not generate any *.out files for fuzz-*.pcap anymore and
   does not fail if nDPId-test exits with value 1 (most likely caused by a libpcap failure)

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-05-19 15:56:20 +02:00
Toni Uhlig
fa079d2346 Git submodule libnDPI update.
* enable ctest to run integration tests (**only** if BUILD_NDPI=ON)

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-05-12 12:46:49 +02:00
Toni Uhlig
5b0a751159 README.md updated
* removed all those outdated Makefile.old references
 * added additional CMake build instructions

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-05-10 15:38:01 +02:00
Toni Uhlig
4e3dda70a3 Unified and improved dependency build/mgmt via CMake and travis-ci.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-04-22 17:37:55 +02:00
Toni Uhlig
a0fa598cee travis-ci build CMake project
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-04-15 11:21:37 +02:00
Toni Uhlig
f713ec702b Added nDPId semantic validation test.
* fixed inconsistent processing of remaining flows during nDPId shutdown phase
 * fixed multiple `detected' flow events
   (instead only `detection-update' flow events can occur after a `detected' flow event)
 * fixed nDPIsrvd.py invalid message buffer handling
 * improved run_tests.sh so only valid pcap capture files are getting processed
   (and some more cosmetics + logging)

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-04-14 22:04:42 +02:00
Toni Uhlig
131cf5385b Added IPv6 support for -I / -E.
* added another Python search path and try-catch ModuleNotFoundError again
 * run_tests.sh checks for OpenBSD netcat (required for -q)

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-04-11 00:16:52 +02:00
Toni Uhlig
4e583cd4de Added JSON schema validation to run_tests.sh
* Python3 scripts are now compatible with versions <3.6
 * improved and prettified run_tests.sh

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-04-09 14:12:48 +02:00
Toni Uhlig
0a7ad7a76a nDPId-test: added JSON distribution + JSON parsing (Multithreaded design re-using most of nDPId/nDPIsrvd core)
* improved Makefile.old install targets
 * splitted nDPIsrvd_parse into nDPIsrvd_parse_line and nDPIsrvd_parse_all for the sake of readability
 * minor Python script improvments (check for nDPIsrvd.py on multiple locations, may be superseeded by setuptools in the future)
 * some paths needs to be absolute (chdir() during daemonize) and therefor additional checks introduced
 * test run script checks and fails if certain files are are missing (PCAP file <=> result output file)
 * removed not very useful "internal format error" JSON serialization if a BUG for same exists
 * fixed invalid l4 type statistics counters for nDPIsrvd-collectd

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-04-09 00:18:35 +02:00
Toni Uhlig
38c6904bff run_tests.sh checks/print-stderr-on-fail
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-03-24 15:04:59 +01:00
Toni Uhlig
1ab6b9e042 Updated test outputs and pinned travis-ci's nDPI git repo sync to a specific commit hash.
* fixed Makefile.old COpts hell

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-03-24 13:16:55 +01:00
Toni Uhlig
77b4b88b14 Added diff'able nDPId-test JSON dumps and travis-ci integration.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-03-24 11:33:04 +01:00
Toni Uhlig
e835d36f63 Added nDPId-test as all-in-one JSON dumper.
* fixed invalid flow event schema type
 * added run_tests.sh to generate/diff JSON dumps
 * renamed lot's of vars/fns in nDPId.c/nDPIsrvd.c, so nDPId-test.c can include "*.c"
 * improved CMake dependency checks

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-03-24 11:28:56 +01:00