From efed6f196ecab333b76b83a5d256c9e4e6b75867 Mon Sep 17 00:00:00 2001 From: Toni Date: Wed, 16 Oct 2024 14:13:55 +0200 Subject: 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 --- dependencies/nDPIsrvd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dependencies/nDPIsrvd.h') diff --git a/dependencies/nDPIsrvd.h b/dependencies/nDPIsrvd.h index 133beff5e..3b12304da 100644 --- a/dependencies/nDPIsrvd.h +++ b/dependencies/nDPIsrvd.h @@ -33,8 +33,8 @@ #define nDPIsrvd_JSON_KEY_STRLEN (32) #define nDPIsrvd_HASHKEY_SEED (0x995fd871u) -#define nDPIsrvd_ARRAY_LENGTH(s) (sizeof(s) / sizeof(s[0])) -#define nDPIsrvd_STRLEN_SZ(s) (sizeof(s) / sizeof(s[0]) - sizeof(s[0])) +#define nDPIsrvd_ARRAY_LENGTH(s) ((size_t)(sizeof(s) / sizeof(s[0]))) +#define nDPIsrvd_STRLEN_SZ(s) ((size_t)((sizeof(s) / sizeof(s[0])) - sizeof(s[0]))) #define TOKEN_GET_SZ(sock, ...) nDPIsrvd_get_token(sock, __VA_ARGS__, NULL) #define TOKEN_VALUE_EQUALS(sock, token, string_to_check, string_to_check_length) \ nDPIsrvd_token_value_equals(sock, token, string_to_check, string_to_check_length) -- cgit v1.2.3