config: allow configuration of guessing algorithms

This commit is contained in:
Nardi Ivan
2024-01-18 10:21:24 +01:00
committed by Ivan Nardi
parent 6c85f10cd5
commit 0712d496fe
18 changed files with 140 additions and 23 deletions
-2
View File
@@ -290,14 +290,12 @@ extern "C" {
*
* @par ndpi_struct = the detection module
* @par flow = the flow given for the detection module
* @par enable_guess = guess protocol if unknown
* @par protocol_was_guessed = 1 if the protocol was guesses (requires enable_guess = 1), 0 otherwise
* @return the detected protocol even if the flow is not completed;
*
*/
ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int8_t enable_guess,
u_int8_t *protocol_was_guessed);
/**
+1
View File
@@ -167,6 +167,7 @@ struct ndpi_detection_module_config_struct {
int fully_encrypted_heuristic;
int track_payload_enabled;
int libgcrypt_init;
int guess_on_giveup;
char filename_config[CFG_MAX_LEN];
+2
View File
@@ -761,6 +761,8 @@ struct ndpi_lru_cache {
struct ndpi_lru_cache_entry *entries;
};
#define NDPI_GIVEUP_GUESS_BY_PORT 0x01
#define NDPI_GIVEUP_GUESS_BY_IP 0x02
/* Aggressiveness values */