config: remove enum ndpi_prefs
This commit is contained in:
@@ -36,12 +36,11 @@ void fuzz_set_alloc_callbacks_and_seed(int seed)
|
||||
|
||||
void fuzz_init_detection_module(struct ndpi_detection_module_struct **ndpi_info_mod)
|
||||
{
|
||||
ndpi_init_prefs prefs = ndpi_no_prefs;
|
||||
NDPI_PROTOCOL_BITMASK all;
|
||||
NDPI_PROTOCOL_BITMASK debug_bitmask;
|
||||
|
||||
if(*ndpi_info_mod == NULL) {
|
||||
*ndpi_info_mod = ndpi_init_detection_module(prefs);
|
||||
*ndpi_info_mod = ndpi_init_detection_module();
|
||||
|
||||
NDPI_BITMASK_SET_ALL(debug_bitmask);
|
||||
ndpi_set_log_level(*ndpi_info_mod, 4);
|
||||
|
||||
@@ -39,7 +39,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
/* To allow memory allocation failures */
|
||||
fuzz_set_alloc_callbacks_and_seed(size);
|
||||
|
||||
ndpi_info_mod = ndpi_init_detection_module(fuzzed_data.ConsumeIntegral<u_int32_t>());
|
||||
ndpi_info_mod = ndpi_init_detection_module();
|
||||
|
||||
set_ndpi_debug_function(ndpi_info_mod, NULL);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
/* To allow memory allocation failures */
|
||||
fuzz_set_alloc_callbacks_and_seed(size);
|
||||
|
||||
ndpi_struct = ndpi_init_detection_module(ndpi_no_prefs);
|
||||
ndpi_struct = ndpi_init_detection_module();
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
ndpi_set_protocol_detection_bitmask2(ndpi_struct, &all);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
/* To allow memory allocation failures */
|
||||
fuzz_set_alloc_callbacks_and_seed(size);
|
||||
|
||||
ndpi_struct = ndpi_init_detection_module(ndpi_no_prefs);
|
||||
ndpi_struct = ndpi_init_detection_module();
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
ndpi_set_protocol_detection_bitmask2(ndpi_struct, &all);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
/* To allow memory allocation failures */
|
||||
fuzz_set_alloc_callbacks_and_seed(size);
|
||||
|
||||
ndpi_struct = ndpi_init_detection_module(ndpi_no_prefs);
|
||||
ndpi_struct = ndpi_init_detection_module();
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
ndpi_set_protocol_detection_bitmask2(ndpi_struct, &all);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
/* To allow memory allocation failures */
|
||||
fuzz_set_alloc_callbacks_and_seed(size);
|
||||
|
||||
ndpi_struct = ndpi_init_detection_module(ndpi_no_prefs);
|
||||
ndpi_struct = ndpi_init_detection_module();
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
ndpi_set_protocol_detection_bitmask2(ndpi_struct, &all);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
/* To allow memory allocation failures */
|
||||
fuzz_set_alloc_callbacks_and_seed(size);
|
||||
|
||||
ndpi_struct = ndpi_init_detection_module(ndpi_no_prefs);
|
||||
ndpi_struct = ndpi_init_detection_module();
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
ndpi_set_protocol_detection_bitmask2(ndpi_struct, &all);
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ u_int8_t enable_protocol_guess = 1, enable_payload_analyzer = 0;
|
||||
u_int8_t enable_flow_stats = 1;
|
||||
u_int8_t human_readeable_string_len = 5;
|
||||
u_int8_t max_num_udp_dissected_pkts = 16 /* 8 is enough for most protocols, Signal requires more */, max_num_tcp_dissected_pkts = 80 /* due to telnet */;
|
||||
ndpi_init_prefs init_prefs = ndpi_track_flow_payload | ndpi_enable_tcp_ack_payload_heuristic;
|
||||
int enable_malloc_bins = 1;
|
||||
int malloc_size_stats = 0;
|
||||
int max_malloc_bins = 14;
|
||||
@@ -72,6 +71,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
NDPI_BITMASK_SET_ALL(all);
|
||||
ndpi_set_protocol_detection_bitmask2(workflow->ndpi_struct, &all);
|
||||
|
||||
ndpi_set_config(workflow->ndpi_struct, NULL, "flow.track_payload.enable", "1");
|
||||
ndpi_set_config(workflow->ndpi_struct, NULL, "tcp_ack_payload_heuristic.enable", "1");
|
||||
ndpi_set_config(workflow->ndpi_struct, "tls", "application_blocks_tracking.enable", "1");
|
||||
|
||||
memset(workflow->stats.protocol_counter, 0,
|
||||
|
||||
@@ -13,7 +13,6 @@ u_int8_t enable_protocol_guess = 1, enable_payload_analyzer = 0;
|
||||
u_int8_t enable_flow_stats = 0;
|
||||
u_int8_t human_readeable_string_len = 5;
|
||||
u_int8_t max_num_udp_dissected_pkts = 16 /* 8 is enough for most protocols, Signal requires more */, max_num_tcp_dissected_pkts = 80 /* due to telnet */;
|
||||
ndpi_init_prefs init_prefs = ndpi_track_flow_payload | ndpi_enable_tcp_ack_payload_heuristic;
|
||||
int enable_malloc_bins = 0;
|
||||
int malloc_size_stats = 0;
|
||||
int max_malloc_bins = 14;
|
||||
|
||||
@@ -15,7 +15,6 @@ u_int8_t enable_protocol_guess = 1, enable_payload_analyzer = 0;
|
||||
u_int8_t enable_flow_stats = 0;
|
||||
u_int8_t human_readeable_string_len = 5;
|
||||
u_int8_t max_num_udp_dissected_pkts = 16 /* 8 is enough for most protocols, Signal requires more */, max_num_tcp_dissected_pkts = 80 /* due to telnet */;
|
||||
ndpi_init_prefs init_prefs = ndpi_track_flow_payload | ndpi_enable_tcp_ack_payload_heuristic;
|
||||
int enable_malloc_bins = 0;
|
||||
int malloc_size_stats = 0;
|
||||
int max_malloc_bins = 14;
|
||||
|
||||
Reference in New Issue
Block a user