From 7c8c9fff3250c5bb5f9dce90f157be4030aaf04e Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Thu, 7 Mar 2024 15:40:03 -0600 Subject: [PATCH] plugins: remove conf.h from suricata-plugin.h Remove "conf.h" from suricata-plugin.h as its not needed by that header. However, some other files became transitively dependent on through other includes, so fix those up. --- src/decode-erspan.c | 1 + src/defrag-config.c | 1 + src/source-pcap-file.c | 1 + src/suricata-plugin.h | 2 -- src/util-ebpf.h | 1 + src/util-exception-policy.c | 1 + src/util-macset.c | 1 + src/util-plugin.c | 1 + 8 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/decode-erspan.c b/src/decode-erspan.c index ccdf64aeae..76cb9bd5af 100644 --- a/src/decode-erspan.c +++ b/src/decode-erspan.c @@ -39,6 +39,7 @@ #include "util-validate.h" #include "util-unittest.h" #include "util-debug.h" +#include "conf.h" /** * \brief Functions to decode ERSPAN Type I and II packets diff --git a/src/defrag-config.c b/src/defrag-config.c index 7e2ae0cde9..adb8847049 100644 --- a/src/defrag-config.c +++ b/src/defrag-config.c @@ -26,6 +26,7 @@ #include "defrag-config.h" #include "util-misc.h" #include "util-radix-tree.h" +#include "conf.h" static SCRadixTree *defrag_tree = NULL; diff --git a/src/source-pcap-file.c b/src/source-pcap-file.c index c4f97bc0c4..647904a8bd 100644 --- a/src/source-pcap-file.c +++ b/src/source-pcap-file.c @@ -31,6 +31,7 @@ #include "util-checksum.h" #include "runmode-unix-socket.h" #include "suricata.h" +#include "conf.h" extern uint16_t max_pending_packets; PcapFileGlobalVars pcap_g; diff --git a/src/suricata-plugin.h b/src/suricata-plugin.h index 85a91ef663..639dd7c731 100644 --- a/src/suricata-plugin.h +++ b/src/suricata-plugin.h @@ -23,8 +23,6 @@ #include "queue.h" -#include "conf.h" - /** * The size of the data chunk inside each packet structure a plugin * has for private data (Packet->plugin_v). diff --git a/src/util-ebpf.h b/src/util-ebpf.h index 55c1fd608a..c4f524c3bd 100644 --- a/src/util-ebpf.h +++ b/src/util-ebpf.h @@ -25,6 +25,7 @@ #define SURICATA_UTIL_EBPF_H #include "flow-bypass.h" +#include "conf.h" #ifdef HAVE_PACKET_EBPF diff --git a/src/util-exception-policy.c b/src/util-exception-policy.c index 6c8ba0fba9..05f88f0c9a 100644 --- a/src/util-exception-policy.c +++ b/src/util-exception-policy.c @@ -26,6 +26,7 @@ #include "util-misc.h" #include "stream-tcp-reassemble.h" #include "action-globals.h" +#include "conf.h" enum ExceptionPolicy g_eps_master_switch = EXCEPTION_POLICY_NOT_SET; /** true if exception policy was defined in config */ diff --git a/src/util-macset.c b/src/util-macset.c index 9853a32416..a4d1eb664c 100644 --- a/src/util-macset.c +++ b/src/util-macset.c @@ -33,6 +33,7 @@ #include "util-macset.h" #include "util-unittest.h" #include "util-unittest-helper.h" +#include "conf.h" typedef uint8_t MacAddr[6]; typedef enum { diff --git a/src/util-plugin.c b/src/util-plugin.c index 472c555b89..6d34ff0e66 100644 --- a/src/util-plugin.c +++ b/src/util-plugin.c @@ -21,6 +21,7 @@ #include "runmodes.h" #include "util-plugin.h" #include "util-debug.h" +#include "conf.h" #ifdef HAVE_PLUGINS