From: Victor Julien Date: Wed, 29 Jan 2020 09:56:54 +0000 (+0100) Subject: ippair: fix global declarations X-Git-Tag: suricata-6.0.0-beta1~762 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5f4b41881369e099159c148de652f729124b4ed;p=thirdparty%2Fsuricata.git ippair: fix global declarations --- diff --git a/src/ippair.c b/src/ippair.c index 1d7c899082..07d4e4efb9 100644 --- a/src/ippair.c +++ b/src/ippair.c @@ -44,8 +44,14 @@ static IPPair *IPPairGetUsedIPPair(void); +/** ippair hash table */ +IPPairHashRow *ippair_hash; /** queue with spare ippairs */ static IPPairQueue ippair_spare_q; +IPPairConfig ippair_config; +SC_ATOMIC_DECLARE(uint64_t,ippair_memuse); +SC_ATOMIC_DECLARE(uint32_t,ippair_counter); +SC_ATOMIC_DECLARE(uint32_t,ippair_prune_idx); /** size of the ippair object. Maybe updated in IPPairInitConfig to include * the storage APIs additions. */ diff --git a/src/ippair.h b/src/ippair.h index e5142856ed..d89de6752c 100644 --- a/src/ippair.h +++ b/src/ippair.h @@ -84,7 +84,7 @@ typedef struct IPPairHashRow_ { } __attribute__((aligned(CLS))) IPPairHashRow; /** ippair hash table */ -IPPairHashRow *ippair_hash; +extern IPPairHashRow *ippair_hash; #define IPPAIR_VERBOSE 0 #define IPPAIR_QUIET 1 @@ -125,10 +125,10 @@ typedef struct IPPairConfig_ { } \ } while (0) -IPPairConfig ippair_config; -SC_ATOMIC_DECLARE(uint64_t,ippair_memuse); -SC_ATOMIC_DECLARE(uint32_t,ippair_counter); -SC_ATOMIC_DECLARE(uint32_t,ippair_prune_idx); +extern IPPairConfig ippair_config; +SC_ATOMIC_EXTERN(uint64_t,ippair_memuse); +SC_ATOMIC_EXTERN(uint32_t,ippair_counter); +SC_ATOMIC_EXTERN(uint32_t,ippair_prune_idx); void IPPairInitConfig(char quiet); void IPPairShutdown(void);