Commit Graph

26 Commits

Author SHA1 Message Date
Toni Uhlig
a733d536ad Added env check NDPID_STARTED_BY_SYSTEMD to prevent logging to stderr in such a case
* removed `nDPId` shutdown on poll/epoll error
 * fixed `chmod_chown()` rv check

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2024-11-07 11:32:42 +01:00
Toni Uhlig
ce5f448d3b Switched OpenWrt GitHub Actions SDK to main branch
* fixed some SonarCloud complaints
 * added more systemd CI tests
 * fixed debian package scripts to obey remove/purge
 * changed `chmod_chown()` error handling

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2024-11-02 18:36:54 +01:00
Toni Uhlig
25944e2089 Fixed some SonarCloud issues
* fixed dependabot werkzeug (3.0.3 to 3.0.6)

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2024-10-26 11:35:30 +02:00
Toni
efed6f196e Read and parse configuration files. Fixes #41. (#42)
Read and parse configuration files. Fixes #41.

 * supports nDPId / nDPIsrvd via command line parameter `-f`
 * nDPId: read general/tuning and libnDPI settings
 * support for settings risk domains libnDPI option via config file or via `-R` (Fixes #45, thanks to @UnveilTech)
 * added some documentation in the config file
 * adjusted Systemd and Debian packaging to make use of config files

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2024-10-16 14:13:55 +02:00
Toni Uhlig
f6f3a4daab Extended analyse application to write global stats to a CSV.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2024-08-16 12:33:46 +02:00
Toni Uhlig
142a435bf6 Add InfluxDB push daemon.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2023-12-07 10:00:25 +01:00
Toni
93498fff02 Apple/BSD port (#30)
* Add MacOS to Github CI builds.
* Fixed libnDPI-4.8 CI build.
* Fixed missing include for `struct sockaddr*`.
* Reworked IPv4 address and netmask retrieval.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2023-11-06 13:25:49 +01:00
Toni Uhlig
315dc32baf Improved syslog logging.
* fixed missing log level for non-error message, causes systemd to send broadcast messages
 * completly removed logging to stderr while started via systemd

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2023-10-19 13:38:26 +02:00
lns
5a9b40779d bump libnDPI to 04f5c5196e790db8b8cc39e42c8645fb7f3dd141
* added custom nDPI logging callback

Signed-off-by: lns <matzeton@googlemail.com>
2023-05-30 09:30:24 +02:00
Toni Uhlig
23816f1403 Revert "Revert "Minor fixes.""
This reverts commit 42aad33ec8.
2023-01-27 12:48:20 +01:00
Toni Uhlig
42aad33ec8 Revert "Minor fixes."
This reverts commit 58439a6761.
2023-01-27 02:02:16 +01:00
Toni Uhlig
58439a6761 Minor fixes.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2023-01-27 01:39:03 +01:00
Toni Uhlig
64f6abfdbe Unified nDPId/nDPIsrvd command line argument storage.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-11-21 11:26:05 +01:00
Toni Uhlig
d3f99f21e6 Create pidfile iff daemon mode enabled.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-10-31 12:45:49 +01:00
lns
cd22d56056 Add ArchLinux PKGBUILD.
Signed-off-by: lns <matzeton@googlemail.com>
2022-10-19 18:40:52 +02:00
Toni Uhlig
49352698a0 nDPId: Added error event threshold to prevent event spamming which may be abused.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-10-17 06:36:30 +02:00
Toni Uhlig
c0b7bdacbc Reworked nDPIsrvd.h C-API.
* nDPIsrvd.h: Provide nDPId thread storage.
 * nDPIsrvd.py: Fixed instance cleanup bug.
 * nDPIsrvd.h: Support for instance/thread user data and cleanup callback.
 * nDPIsrvd.h: Most recent flow time stored in thread ht instead of instance ht.
 * nDPId: Moved flow logger out the memory profilier into SIGUSR1 signal handling.
 * nDPId: Added signal fd to be usable within epoll's event handling (live-capture only!)
 * nDPId: Added information about ZLib compressions to daemon status/shutdown events.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-03-21 15:56:01 +01:00
Toni Uhlig
f9e4c58854 Added logging interface used by nDPId, nDPIsrvd and nDPId-test.
* fixed GitLab pipeline
 * nDPId: added static assert (just for a test)
 * nDPId: memory profiling for total bytes compressed
 * nDPId-test: enable zLib compression if configured with ENABLE_ZLIB

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2022-02-03 03:48:37 +01: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
6faded3cc7 Improved and Fixed another buffering issue caused by removing an outgoing fd too early from epoll queue (EPOLLOUT).
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2021-08-05 02:02:51 +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
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
3cfb4d9c73 nDPId/nDPIsrvd: change_user_group does now chown/chmod collector/distributor socket paths
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-10-07 14:38:10 +02:00
Toni Uhlig
ab374d193f nDPIsrvd: Change user/group, allow listening on UNIX socket for incoming distributor connections
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-09-05 17:52:34 +02:00
Toni Uhlig
5a7b0499ed nDPIsrvd sighandler and cmd opt parser
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-08-06 00:50:02 +02:00
Toni Uhlig
6031b07eb4 added utils module to share some code parts with other apps
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2020-08-05 16:03:28 +02:00