if included == "conf.h" and includer == "src/suricata-plugin.h":
# SCEveFileType structure field Init being a function pointer using a parameter ConfNode defined in conf.h
continue
+ if included == "util-prefilter.h" and includer == "src/util-mpm.h":
+ # MpmTableElmt_ structure field Search being a function pointer using a parameter PrefilterRuleStore
+ continue
+ if included == "flow.h" and includer == "src/output-tx.h":
+ # TxLogger type being a function pointer using a parameter Flow
+ continue
if included == "util-debug-filters.h" and includer == "src/util-debug.h":
# Macro SCEnter using SCLogCheckFDFilterEntry defined in util-debug-filters.h
continue
if included == "util-spm-bs.h" and includer == "src/util-spm.h":
# Macro SpmSearch using BasicSearch defined in util-spm-bs.h
continue
+ if included == "util-cpu.h" and includer == "src/threads-profile.h":
+ # Macro SCSpinLock_profile using UtilCpuGetTicks
+ continue
+ if included == "util-profiling-locks.h" and includer == "src/util-profiling.h":
+ # Macro SCSpinLock_profile using SCProfilingAddPacketLocks
+ continue
+ if included == "threads.h" and includer == "src/util-debug-filters.h":
+ # pthread_t needed on Windows
+ continue
print("Unnecessary include from %s for %s" % (includer, included))
retcode = 1
#include "util-logopenfile.h"
#include "util-time.h"
+#include "action-globals.h"
+
#define DEFAULT_LOG_FILENAME "fast.log"
#define MODULE_NAME "AlertFastLog"
#include "util-syslog.h"
#include "util-optimize.h"
#include "util-logopenfile.h"
+#include "action-globals.h"
#ifndef OS_WIN32
#include "util-print.h"
#include "util-profiling.h"
#include "util-validate.h"
+#include "action-globals.h"
uint32_t default_packet_size = 0;
extern bool stats_decoder_events;
#include "source-pfring.h"
#endif
-#include "action-globals.h"
-
#include "decode-ethernet.h"
#include "decode-gre.h"
#include "decode-ppp.h"
#define __DEFRAG_QUEUE_H__
#include "suricata-common.h"
-#include "decode.h"
#include "defrag.h"
/** Spinlocks or Mutex for the defrag tracker queues. */
#include "threads.h"
#include "util-pool.h"
+#include "threadvars.h"
+#include "decode.h"
/**
* A context for an instance of a fragmentation re-assembler, in case
#include "util-profiling.h"
#include "util-validate.h"
+#include "action-globals.h"
+
/** tag signature we use for tag alerts */
static Signature g_tag_signature;
/** tag packet alert structure for tag alerts */
#include "util-var-name.h"
#include "tm-threads.h"
+#include "action-globals.h"
+
static HostStorageId host_threshold_id = { .id = -1 }; /**< host storage id for thresholds */
static IPPairStorageId ippair_threshold_id = { .id = -1 }; /**< ip pair storage id for thresholds */
#include "suricata-common.h"
#include "flow.h"
-#include "app-layer-htp.h"
+#include <htp/htp.h>
#include "detect.h"
#include "detect-parse.h"
#include "detect-engine-iponly.h"
#include "app-layer-detect-proto.h"
+#include "action-globals.h"
+
/* Table with all SigMatch registrations */
SigTableElmt sigmatch_table[DETECT_TBLSIZE];
#include "util-detect.h"
#include "util-profiling.h"
+#include "action-globals.h"
+
typedef struct DetectRunScratchpad {
const AppProto alproto;
const uint8_t flow_flags; /* flow/state flags: STREAM_* */
#include "suricata-common.h"
#include "device-storage.h"
+#include "util-storage.h"
#include "util-unittest.h"
unsigned int LiveDevStorageSize(void)
#define __DEVICE_STORAGE_H__
#include "util-device.h"
-#include "util-storage.h"
typedef struct LiveDevStorageId_ {
int id;
#ifndef __FLOW_BYPASS_H__
#define __FLOW_BYPASS_H__
-#include "threadvars.h"
#include "flow.h"
struct flows_stats {
#include "flow-storage.h"
#include "flow-hash.h"
#include "flow-util.h"
+#include "util-storage.h"
#include "util-unittest.h"
unsigned int FlowStorageSize(void)
#define __FLOW_STORAGE_H__
#include "flow.h"
-#include "util-storage.h"
typedef struct FlowStorageId {
int id;
#include "util-buffer.h"
#include "util-validate.h"
+#include "action-globals.h"
+
#define MODULE_NAME "JsonAlertLog"
#define LOG_JSON_PAYLOAD BIT_U16(0)
#include "util-time.h"
#include "util-buffer.h"
+#include "action-globals.h"
+
#define MODULE_NAME "JsonDropLog"
#define LOG_DROP_ALERTS 1
#include "host.h"
#include "util-profiling.h"
#include "util-validate.h"
+#include "action-globals.h"
/** \brief issue drop action
*
*/
#include "suricata-common.h"
+#include "detect.h"
#include "reputation.h"
#include "threads.h"
#include "conf.h"
uint8_t rep[SREP_MAX_CATS];
} SReputation;
-#include "detect.h"
-
void SRepFreeHostData(Host *h);
uint8_t SRepCatGetByShortname(char *shortname);
int SRepInit(struct DetectEngineCtx_ *de_ctx);
#include "runmodes.h"
#include "flow-storage.h"
#include "util-validate.h"
+#include "action-globals.h"
#ifdef HAVE_AF_PACKET
#include "tm-threads.h"
#include "tmqh-packetpool.h"
#include "util-privs.h"
+#include "action-globals.h"
#ifndef HAVE_DPDK
#include "suricata.h"
#include "stream-tcp-private.h"
#include "stream-tcp-cache.h"
+#include "util-debug.h"
typedef struct TcpPoolCache {
bool cache_enabled; /**< cache should only be enabled for worker threads */
#ifndef __STREAM_TCP_CACHE_H__
#define __STREAM_TCP_CACHE_H__
-#include "suricata.h"
-#include "flow.h"
#include "stream-tcp-private.h"
void StreamTcpThreadCacheEnable(void);
#include "util-time.h"
#include "source-pcap-file.h"
+#include "action-globals.h"
//#define DEBUG
#ifndef __THREADS_PROFILE_H__
#define __THREADS_PROFILE_H__
+// UtilCpuGetTicks
#include "util-cpu.h"
#define PROFILING_MAX_LOCKS 64
#include "packet.h"
#include "util-profiling.h"
#include "util-validate.h"
+#include "action-globals.h"
/* Number of freed packet to save for one pool before freeing them. */
#define MAX_PENDING_RETURN_PACKETS 32
#ifndef __DEBUG_FILTERS_H__
#define __DEBUG_FILTERS_H__
+// pthread_t
#include "threads.h"
/**
#include "util-exception-policy.h"
#include "util-misc.h"
#include "stream-tcp-reassemble.h"
+#include "action-globals.h"
void ExceptionPolicyApply(Packet *p, enum ExceptionPolicy policy, enum PacketDropReason drop_reason)
{
#include "util-lua.h"
#include "util-lua-common.h"
+#include "action-globals.h"
int LuaCallbackError(lua_State *luastate, const char *msg)
{
#ifndef _UTIL_PRIVS_H
#define _UTIL_PRIVS_H
-#include "threadvars.h"
-
#define SC_CAP_NONE 0x01
#define SC_CAP_SYS_ADMIN 0x02
#define SC_CAP_SYS_RAW_IO 0x04
#define SC_CAP_NET_BIND_SERVICE 0x40
#define SC_CAP_NET_BROADCAST 0x80
-#ifndef HAVE_LIBCAP_NG
-#define SCDropCaps(...)
-#define SCDropMainThreadCaps(...)
-#else
+#ifdef HAVE_LIBCAP_NG
#include <cap-ng.h>
+#include "threadvars.h"
/**Drop the previliges of the given thread tv, based on the thread cap_flags
* which implies the capability requirement of the given thread. Initially all
*/
void SCDropMainThreadCaps(uint32_t , uint32_t );
+#else
+#define SCDropCaps(...)
+#define SCDropMainThreadCaps(...)
#endif /* HAVE_LIBCAP_NG */
int SCGetUserID(const char *, const char *, uint32_t *, uint32_t *);
#ifdef PROFILING
#include "detect.h"
-#include "util-cpu.h"
#include "util-profiling-locks.h"
extern int profiling_rules_enabled;
#define __UTIL_UNITTEST_HELPER__
#if defined(UNITTESTS)
-#include "packet.h"
#include "flow.h"
#include "detect.h"
#elif defined(FUZZ)