Move the configure include file inclusion and code depending on it in code protected by the NDPI_LIB_COMPILATION define, this should avoid it polluting the environment when including this file from ntopng.
This commit is contained in:
@@ -854,6 +854,22 @@ typedef struct ndpi_proto {
|
|||||||
|
|
||||||
#ifdef NDPI_LIB_COMPILATION
|
#ifdef NDPI_LIB_COMPILATION
|
||||||
|
|
||||||
|
/* Needed to have access to HAVE_* defines */
|
||||||
|
#include "ndpi_config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_HYPERSCAN
|
||||||
|
struct hs_list {
|
||||||
|
char *expression;
|
||||||
|
unsigned int id;
|
||||||
|
struct hs_list *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hs {
|
||||||
|
hs_database_t *database;
|
||||||
|
hs_scratch_t *scratch;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
struct ndpi_detection_module_struct {
|
struct ndpi_detection_module_struct {
|
||||||
NDPI_PROTOCOL_BITMASK detection_bitmask;
|
NDPI_PROTOCOL_BITMASK detection_bitmask;
|
||||||
NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
|
NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask;
|
||||||
|
|||||||
@@ -49,17 +49,6 @@
|
|||||||
|
|
||||||
#ifdef HAVE_HYPERSCAN
|
#ifdef HAVE_HYPERSCAN
|
||||||
#include <hs/hs.h>
|
#include <hs/hs.h>
|
||||||
|
|
||||||
struct hs_list {
|
|
||||||
char *expression;
|
|
||||||
unsigned int id;
|
|
||||||
struct hs_list *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct hs {
|
|
||||||
hs_database_t *database;
|
|
||||||
hs_scratch_t *scratch;
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NDPI_CONST_GENERIC_PROTOCOL_NAME "GenericProtocol"
|
#define NDPI_CONST_GENERIC_PROTOCOL_NAME "GenericProtocol"
|
||||||
|
|||||||
Reference in New Issue
Block a user