diff options
author | Luca Deri <deri@ntop.org> | 2021-10-11 11:45:45 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2021-10-11 11:45:45 +0200 |
commit | 246d115d7bf126c284df739c35cd9b790bf140cf (patch) | |
tree | bae84ecf322e62ce1aaee5fa4ce467528421acfc /src/include | |
parent | 60eca79fdf552aa98e6a3505f7b690a5b9c3c87c (diff) |
Cleaned up code moving specific includes in files their are using it. Thi prevents ndpi_config.h to be included everywhere in apps using nDPI that might leade to #define redefinitions after the latest changes
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_define.h.in | 5 | ||||
-rw-r--r-- | src/include/ndpi_typedefs.h | 18 |
2 files changed, 2 insertions, 21 deletions
diff --git a/src/include/ndpi_define.h.in b/src/include/ndpi_define.h.in index 996cdfa8f..e63a137b9 100644 --- a/src/include/ndpi_define.h.in +++ b/src/include/ndpi_define.h.in @@ -179,11 +179,6 @@ #define NDPI_JABBER_FT_TIMEOUT 5 #define NDPI_SOULSEEK_CONNECTION_IP_TICK_TIMEOUT 600 -#ifndef _NDPI_CONFIG_H_ -#include "ndpi_config.h" /* To have access to NDPI_ENABLE_DEBUG_MESSAGES */ -#define _NDPI_CONFIG_H_ -#endif - #ifdef NDPI_ENABLE_DEBUG_MESSAGES #define NDPI_LOG(proto, m, log_level, args...) \ { \ diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 123c9edec..c3dc63e3a 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -31,10 +31,6 @@ /* Used by both nDPI core and patricia code under third-party */ #include "ndpi_patricia_typedefs.h" -#ifdef HAVE_MAXMINDDB -#include <maxminddb.h> -#endif - /* NDPI_LOG_LEVEL */ typedef enum { NDPI_LOG_ERROR, @@ -1034,15 +1030,6 @@ typedef struct ndpi_proto { #define _NDPI_CONFIG_H_ #endif -#ifdef HAVE_PCRE -#include <pcre.h> - -struct pcre_struct { - pcre *compiled; - pcre_extra *optimized; -}; -#endif - typedef enum { ndpi_stun_cache, ndpi_hangout_cache @@ -1171,10 +1158,9 @@ struct ndpi_detection_module_struct { #include "../../../nDPI-custom/custom_ndpi_typedefs.h" #endif -#ifdef HAVE_MAXMINDDB - MMDB_s mmdb_city, mmdb_as; + /* GeoIP */ + void *mmdb_city, *mmdb_as; u_int8_t mmdb_city_loaded, mmdb_as_loaded; -#endif /* Current packet */ struct ndpi_packet_struct packet; |