config: follow-up (#2268)

Some changes in the parameters names.
Add a fuzzer to fuzz the configuration file format.
Add the infrastructure to configuratin callbacks.
Add an helper to map LRU cache indexes to names.
This commit is contained in:
Ivan Nardi
2024-01-20 16:14:41 +01:00
committed by GitHub
parent 8651ce9811
commit 42d23cff6a
62 changed files with 264 additions and 118 deletions
+3
View File
@@ -2236,6 +2236,9 @@ extern "C" {
/* ******************************* */
const char *ndpi_lru_cache_idx_to_name(lru_cache_type idx);
#ifdef __cplusplus
}
#endif
+1 -2
View File
@@ -315,8 +315,6 @@ struct ndpi_detection_module_struct {
/* NDPI_PROTOCOL_ZOOM */
struct ndpi_lru_cache *zoom_cache;
u_int32_t zoom_cache_num_entries;
u_int32_t zoom_cache_ttl;
/* NDPI_PROTOCOL_STUN and subprotocols */
struct ndpi_lru_cache *stun_cache;
@@ -435,6 +433,7 @@ int load_categories_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE
int load_malicious_sha1_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd);
int load_malicious_ja3_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd);
int load_risk_domain_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd);
int load_config_file_fd(struct ndpi_detection_module_struct *ndpi_str, FILE *fd);
/* TLS */
+1
View File
@@ -239,6 +239,7 @@ typedef enum {
NDPI_CFG_NOT_FOUND = -2,
NDPI_CFG_INVALID_PARAM = -3,
NDPI_CFG_CONTEXT_ALREADY_INITIALIZED = -4,
NDPI_CFG_CALLBACK_ERROR = -5,
NDPI_CFG_OK = 0,
} ndpi_cfg_error;