Skip to content

Commit

Permalink
Read and parse configuration files. Fixes #41.
Browse files Browse the repository at this point in the history
Signed-off-by: Toni Uhlig <[email protected]>
  • Loading branch information
utoni committed Sep 26, 2024
1 parent 9ef17b7 commit 99e327d
Show file tree
Hide file tree
Showing 6 changed files with 652 additions and 278 deletions.
10 changes: 5 additions & 5 deletions nDPId-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extern void nDPIsrvd_memprof_log(char const * const format, ...);
extern void nDPIsrvd_memprof_log_alloc(size_t alloc_size);
extern void nDPIsrvd_memprof_log_free(size_t free_size);

//#define VERBOSE_MEMORY_PROFILING 1
// #define VERBOSE_MEMORY_PROFILING 1
#define NO_MAIN 1
#include "utils.c"
#include "nio.c"
Expand Down Expand Up @@ -1668,26 +1668,26 @@ int main(int argc, char ** argv)
}

nDPIsrvd_options.max_write_buffers = 32;
nDPId_options.enable_data_analysis = 1;
set_cmdarg_boolean(&nDPId_options.enable_data_analysis, 1);
nDPId_options.max_packets_per_flow_to_send = 5;
#ifdef ENABLE_ZLIB
/*
* zLib compression is forced enabled for testing.
* Remember to compile nDPId with zlib enabled.
* There will be diff's while running `test/run_tests.sh' otherwise.
*/
nDPId_options.enable_zlib_compression = 1;
set_cmdarg_boolean(&nDPId_options.enable_zlib_compression, 1);
#endif
nDPId_options.memory_profiling_log_interval = (unsigned long long int)-1;
nDPId_options.reader_thread_count = 1; /* Please do not change this! Generating meaningful pcap diff's relies on a
single reader thread! */
set_cmdarg(&nDPId_options.instance_alias, "nDPId-test");
set_cmdarg_string(&nDPId_options.instance_alias, "nDPId-test");
if (access(argv[1], R_OK) != 0)
{
logger(1, "%s: pcap file `%s' does not exist or is not readable", argv[0], argv[1]);
return 1;
}
set_cmdarg(&nDPId_options.pcap_file_or_interface, argv[1]);
set_cmdarg_string(&nDPId_options.pcap_file_or_interface, argv[1]);
if (validate_options() != 0)
{
return 1;
Expand Down
Loading

0 comments on commit 99e327d

Please sign in to comment.