diff options
author | Vitaly Lavrov <vel21ripn@gmail.com> | 2017-10-14 14:38:48 +0300 |
---|---|---|
committer | Vitaly Lavrov <vel21ripn@gmail.com> | 2017-10-26 20:41:22 +0300 |
commit | 2787c2390cdd7129c2dcf50b0d4990d3f7d1bccc (patch) | |
tree | db110f640b9c1de43a0a64a43974ea90776c6588 /example/ndpi_util.h | |
parent | 4f72b954da705f8d54a9dd61eae46b2b36b24dc0 (diff) |
Refactoring the debugging output.
levels of debug output:
0 - ERROR: Only for errors.
1 - TRACE: Start of each packets and if found protocol.
2 - DEBUG: Start of searching each protocol and excluding protocols.
3 - DEBUG_EXTRA: For all other messages.
Added field ndpi_struct->debug_logging for enable debug output of each protocols.
Simple macros for debugging output are added:
NDPI_LOG_ERR(), NDPI_LOG_INFO(), NDPI_LOG_DBG(), NDPI_LOG_DBG2(),
NDPI_EXCLUDE_PROTO()
Diffstat (limited to 'example/ndpi_util.h')
-rw-r--r-- | example/ndpi_util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/example/ndpi_util.h b/example/ndpi_util.h index 51bc09ddb..7abebe4f5 100644 --- a/example/ndpi_util.h +++ b/example/ndpi_util.h @@ -179,4 +179,7 @@ int ndpi_workflow_node_cmp(const void *a, const void *b); void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_flow_info *flow); u_int32_t ethernet_crc32(const void* data, size_t n_bytes); void ndpi_flow_info_freer(void *node); + +extern int nDPI_LogLevel; + #endif |