diff --git a/CHANGES b/CHANGES index 2f7fa83e5b..4aca6133db 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,30 @@ +8.0.0-dev.118 | 2025-05-16 10:27:27 -0700 + + * Remove including from util.h (Tim Wojtulewicz, Corelight) + + * Remove telemetry #includes from OpaqueVal.h (Tim Wojtulewicz, Corelight) + + * Reduce includes in plugin/Component.h (Tim Wojtulewicz, Corelight) + + * Remove zeek/Stats.h include from NetVar.h (Tim Wojtulewicz, Corelight) + + * Include StmtBase/StmtEnums in Func.h instead of Stmt.h (Tim Wojtulewicz, Corelight) + + This requires changes in lots of other files that were depending on Func.h + to provide that include for them. + + * Use modern names for standard headers (Tim Wojtulewicz, Corelight) + + * Remove fix for CentOS 7 from TCP_Flags.h (Tim Wojtulewicz, Corelight) + + * Fix usage of std::string in http analyzer (Tim Wojtulewicz, Corelight) + + * Reorder top section of net_util.h to batch includes together (Tim Wojtulewicz, Corelight) + + * Use quotes instead of <> for zeek includes (Tim Wojtulewicz, Corelight) + + * Fix Obj.h include in IntrusivePtr.h to have full path (Tim Wojtulewicz, Corelight) + 8.0.0-dev.106 | 2025-05-16 13:39:56 +0200 * Generate --event-trace output explicitly rather than in EventTraceMgr destructor (Vern Paxson, Corelight) diff --git a/NEWS b/NEWS index 4c9b4c6803..89dbfdd61a 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,10 @@ We would like to thank ... for their contributions to this release. Breaking Changes ---------------- +- The code base underwent a big cleanup of #include usage, across almost all of the + files. We tested builds of all of the existing third-party packages and only noticed one + or two failures, but there is a possibility for breakage related to this cleanup. + New Functionality ----------------- diff --git a/VERSION b/VERSION index eb71690a99..7d2f60cb26 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.0-dev.106 +8.0.0-dev.118 diff --git a/src/CompHash.cc b/src/CompHash.cc index aef744ee9d..f3f46aac01 100644 --- a/src/CompHash.cc +++ b/src/CompHash.cc @@ -8,7 +8,9 @@ #include #include +#include "zeek/Dict.h" #include "zeek/Func.h" +#include "zeek/Hash.h" #include "zeek/IPAddr.h" #include "zeek/RE.h" #include "zeek/Reporter.h" diff --git a/src/DNS_Mapping.cc b/src/DNS_Mapping.cc index 3fa14b4e93..2500551606 100644 --- a/src/DNS_Mapping.cc +++ b/src/DNS_Mapping.cc @@ -3,6 +3,7 @@ #include "zeek/DNS_Mapping.h" #include +#include #include "zeek/DNS_Mgr.h" #include "zeek/Reporter.h" diff --git a/src/DebugLogger.h b/src/DebugLogger.h index bd61531de1..4756cba0f9 100644 --- a/src/DebugLogger.h +++ b/src/DebugLogger.h @@ -9,7 +9,7 @@ #include "zeek/zeek-config.h" -#include +#include #include #include diff --git a/src/Dict.h b/src/Dict.h index c3443a3ddf..b53c7e6c99 100644 --- a/src/Dict.h +++ b/src/Dict.h @@ -3,6 +3,7 @@ #pragma once #include +#include #include #include #include diff --git a/src/EquivClass.h b/src/EquivClass.h index c2a3e5fad6..3e4538e769 100644 --- a/src/EquivClass.h +++ b/src/EquivClass.h @@ -2,7 +2,7 @@ #pragma once -#include +#include namespace zeek::detail { diff --git a/src/Func.cc b/src/Func.cc index cf46ca776b..e45a4fdcca 100644 --- a/src/Func.cc +++ b/src/Func.cc @@ -30,6 +30,7 @@ #include "zeek/RunState.h" #include "zeek/Scope.h" #include "zeek/ScriptProfile.h" +#include "zeek/Stats.h" #include "zeek/Stmt.h" #include "zeek/Traverse.h" #include "zeek/Var.h" @@ -524,6 +525,8 @@ void ScriptFunc::CreateCaptures(std::unique_ptr> cvec) { } } +void ScriptFunc::SetCapturesVec(std::unique_ptr> cv) { captures_vec = std::move(cv); } + void ScriptFunc::SetCaptures(Frame* f) { const auto& captures = type->GetCaptures(); ASSERT(captures); diff --git a/src/Func.h b/src/Func.h index 37e4b6eab9..b80498f389 100644 --- a/src/Func.h +++ b/src/Func.h @@ -11,9 +11,16 @@ #include "zeek/Obj.h" #include "zeek/Scope.h" -#include "zeek/Stmt.h" +#include "zeek/StmtBase.h" +#include "zeek/StmtEnums.h" #include "zeek/TraverseTypes.h" -#include "zeek/Type.h" /* for function_flavor */ +#include "zeek/Type.h" /* for FunctionFlavor */ + +// This is needed in order to chain-include ZVal.h, which is what's +// actually needed by Func.h. If you don't include Val.h along with +// ZVal.h, Windows fails to build because of the forward declarations +// in ZVal.h. +#include "zeek/Val.h" #include "zeek/ZeekArgs.h" #include "zeek/ZeekList.h" @@ -223,7 +230,7 @@ public: * * @param cv The value used for captures_vec. */ - void SetCapturesVec(std::unique_ptr> cv) { captures_vec = std::move(cv); } + void SetCapturesVec(std::unique_ptr> cv); // Same definition as in Frame.h. using OffsetMap = std::unordered_map; diff --git a/src/Hash.cc b/src/Hash.cc index a1f37bae0d..a6ef2b7934 100644 --- a/src/Hash.cc +++ b/src/Hash.cc @@ -2,11 +2,10 @@ #include "zeek/Hash.h" -#include "zeek/zeek-config.h" - #include #include #include +#include #include "zeek/DebugLogger.h" #include "zeek/Desc.h" diff --git a/src/ID.cc b/src/ID.cc index 10719cdaca..e860894439 100644 --- a/src/ID.cc +++ b/src/ID.cc @@ -6,6 +6,7 @@ #include "zeek/Attr.h" #include "zeek/Desc.h" +#include "zeek/Dict.h" #include "zeek/EventRegistry.h" #include "zeek/Expr.h" #include "zeek/File.h" diff --git a/src/IntrusivePtr.h b/src/IntrusivePtr.h index 6d44edb9df..c1e5db3bb7 100644 --- a/src/IntrusivePtr.h +++ b/src/IntrusivePtr.h @@ -6,7 +6,7 @@ #include #include -#include "Obj.h" +#include "zeek/Obj.h" namespace zeek { diff --git a/src/List.h b/src/List.h index b8351c5dc3..5a02e4879d 100644 --- a/src/List.h +++ b/src/List.h @@ -21,11 +21,10 @@ // Entries must be either a pointer to the data or nonzero data with // sizeof(data) <= sizeof(void*). -#include #include +#include #include #include -#include #include "zeek/util.h" diff --git a/src/NetVar.h b/src/NetVar.h index 3889130dbf..01d601c260 100644 --- a/src/NetVar.h +++ b/src/NetVar.h @@ -3,7 +3,6 @@ #pragma once #include "zeek/EventRegistry.h" -#include "zeek/Stats.h" #include "zeek/Val.h" namespace zeek::detail { diff --git a/src/OpaqueVal.h b/src/OpaqueVal.h index ba0a048979..7bf96c2c7e 100644 --- a/src/OpaqueVal.h +++ b/src/OpaqueVal.h @@ -15,9 +15,6 @@ #include "zeek/RandTest.h" #include "zeek/Val.h" #include "zeek/digest.h" -#include "zeek/telemetry/Counter.h" -#include "zeek/telemetry/Gauge.h" -#include "zeek/telemetry/Histogram.h" namespace broker { class data; diff --git a/src/Reassem.cc b/src/Reassem.cc index 39a7cd8f5b..cbf0c0dc88 100644 --- a/src/Reassem.cc +++ b/src/Reassem.cc @@ -5,6 +5,7 @@ #include "zeek/zeek-config.h" #include +#include #include #include "zeek/Desc.h" diff --git a/src/Reporter.h b/src/Reporter.h index 9c03920dce..2a7d8496de 100644 --- a/src/Reporter.h +++ b/src/Reporter.h @@ -2,7 +2,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/ScriptCoverageManager.cc b/src/ScriptCoverageManager.cc index 8603fb2755..a57394b8bf 100644 --- a/src/ScriptCoverageManager.cc +++ b/src/ScriptCoverageManager.cc @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/src/SerializationFormat.cc b/src/SerializationFormat.cc index 8f0bb88198..ab96b5d4ca 100644 --- a/src/SerializationFormat.cc +++ b/src/SerializationFormat.cc @@ -3,6 +3,7 @@ #include "zeek/SerializationFormat.h" #include +#include #include "zeek/DebugLogger.h" #include "zeek/IPAddr.h" diff --git a/src/Stats.cc b/src/Stats.cc index 83b258124c..be90c5ae7e 100644 --- a/src/Stats.cc +++ b/src/Stats.cc @@ -8,6 +8,7 @@ #include "zeek/Conn.h" #include "zeek/DNS_Mgr.h" +#include "zeek/Dict.h" #include "zeek/Event.h" #include "zeek/File.h" #include "zeek/Func.h" diff --git a/src/Tag.cc b/src/Tag.cc index 6233799585..a65b9d300e 100644 --- a/src/Tag.cc +++ b/src/Tag.cc @@ -2,6 +2,8 @@ #include "zeek/Tag.h" +#include + #include "zeek/Val.h" namespace zeek { diff --git a/src/Type.cc b/src/Type.cc index f12ed51895..2fa1209613 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -4,6 +4,7 @@ #include "zeek/zeek-config.h" +#include #include #include #include diff --git a/src/analyzer/protocol/http/HTTP.cc b/src/analyzer/protocol/http/HTTP.cc index a1346a781f..a5b80997ad 100644 --- a/src/analyzer/protocol/http/HTTP.cc +++ b/src/analyzer/protocol/http/HTTP.cc @@ -2,11 +2,8 @@ #include "zeek/analyzer/protocol/http/HTTP.h" -#include "zeek/zeek-config.h" - #include #include -#include #include #include @@ -346,9 +343,9 @@ void HTTP_Entity::SubmitHeader(analyzer::mime::MIME_Header* h) { else if ( analyzer::mime::istrequal(h->get_name(), "content-range") && http_message->MyHTTP_Analyzer()->HTTP_ReplyCode() == 206 ) { data_chunk_t vt = h->get_value_token(); - string byte_unit(vt.data, vt.length); + std::string byte_unit(vt.data, vt.length); vt = h->get_value_after_token(); - string byte_range(vt.data, vt.length); + std::string byte_range(vt.data, vt.length); byte_range.erase(remove(byte_range.begin(), byte_range.end(), ' '), byte_range.end()); if ( byte_unit != "bytes" ) { @@ -357,22 +354,22 @@ void HTTP_Entity::SubmitHeader(analyzer::mime::MIME_Header* h) { } size_t p = byte_range.find('/'); - if ( p == string::npos ) { + if ( p == std::string::npos ) { http_message->Weird("HTTP_content_range_cannot_parse"); return; } - string byte_range_resp_spec = byte_range.substr(0, p); - string instance_length_str = byte_range.substr(p + 1); + std::string byte_range_resp_spec = byte_range.substr(0, p); + std::string instance_length_str = byte_range.substr(p + 1); p = byte_range_resp_spec.find('-'); - if ( p == string::npos ) { + if ( p == std::string::npos ) { http_message->Weird("HTTP_content_range_cannot_parse"); return; } - string first_byte_pos = byte_range_resp_spec.substr(0, p); - string last_byte_pos = byte_range_resp_spec.substr(p + 1); + std::string first_byte_pos = byte_range_resp_spec.substr(0, p); + std::string last_byte_pos = byte_range_resp_spec.substr(p + 1); if ( DEBUG_http ) DEBUG_MSG("Parsed Content-Range: %s %s-%s/%s\n", byte_unit.c_str(), first_byte_pos.c_str(), diff --git a/src/analyzer/protocol/http/HTTP.h b/src/analyzer/protocol/http/HTTP.h index ffe57a187b..b689705a5f 100644 --- a/src/analyzer/protocol/http/HTTP.h +++ b/src/analyzer/protocol/http/HTTP.h @@ -2,6 +2,9 @@ #pragma once +#include +#include + #include "zeek/IPAddr.h" #include "zeek/analyzer/protocol/http/events.bif.h" #include "zeek/analyzer/protocol/mime/MIME.h" @@ -9,7 +12,6 @@ #include "zeek/analyzer/protocol/tcp/ContentLine.h" #include "zeek/analyzer/protocol/tcp/TCP.h" #include "zeek/analyzer/protocol/zip/ZIP.h" -#include "zeek/binpac_zeek.h" namespace zeek::analyzer::http { @@ -43,7 +45,7 @@ public: int64_t BodyLength() const { return body_length; } int64_t HeaderLength() const { return header_length; } void SkipBody() { deliver_body = 0; } - const string& FileID() const { return precomputed_file_id; } + const std::string& FileID() const { return precomputed_file_id; } protected: class UncompressedOutput; diff --git a/src/analyzer/protocol/smb/smb1-com-nt-create-andx.pac b/src/analyzer/protocol/smb/smb1-com-nt-create-andx.pac index 5759b18708..8247a243e2 100644 --- a/src/analyzer/protocol/smb/smb1-com-nt-create-andx.pac +++ b/src/analyzer/protocol/smb/smb1-com-nt-create-andx.pac @@ -1,3 +1,7 @@ +%extern{ +#include "zeek/Dict.h" +%} + refine connection SMB_Conn += { function proc_smb1_nt_create_andx_request(header: SMB_Header, val: SMB1_nt_create_andx_request): bool %{ diff --git a/src/analyzer/protocol/smb/smb2-com-create.pac b/src/analyzer/protocol/smb/smb2-com-create.pac index d10296b1cb..59a501f24b 100644 --- a/src/analyzer/protocol/smb/smb2-com-create.pac +++ b/src/analyzer/protocol/smb/smb2-com-create.pac @@ -1,3 +1,7 @@ +%extern{ +#include "zeek/Dict.h" +%} + refine connection SMB_Conn += { function proc_smb2_create_request(h: SMB2_Header, val: SMB2_create_request): bool diff --git a/src/analyzer/protocol/tcp/TCP_Flags.h b/src/analyzer/protocol/tcp/TCP_Flags.h index 989e3feb23..6b4bf8eaa4 100644 --- a/src/analyzer/protocol/tcp/TCP_Flags.h +++ b/src/analyzer/protocol/tcp/TCP_Flags.h @@ -2,15 +2,9 @@ #pragma once -// This needs to remain the first include in this file, or some defines aren't -// set correctly when netinet/tcp.h is included and the CentOS 7 build breaks. -// clang-format off -#include "zeek/net_util.h" - #include #include #include -// clang-format on namespace zeek::analyzer::tcp { diff --git a/src/analyzer/protocol/tcp/TCP_Reassembler.cc b/src/analyzer/protocol/tcp/TCP_Reassembler.cc index bc9df6b076..ab206f8ccf 100644 --- a/src/analyzer/protocol/tcp/TCP_Reassembler.cc +++ b/src/analyzer/protocol/tcp/TCP_Reassembler.cc @@ -7,6 +7,7 @@ #include "zeek/File.h" #include "zeek/Reporter.h" #include "zeek/RuleMatcher.h" +#include "zeek/Stats.h" #include "zeek/ZeekString.h" #include "zeek/analyzer/Analyzer.h" #include "zeek/analyzer/protocol/tcp/TCP.h" diff --git a/src/broker/Data.cc b/src/broker/Data.cc index 850f88219b..33d67a334c 100644 --- a/src/broker/Data.cc +++ b/src/broker/Data.cc @@ -5,6 +5,7 @@ #include #include "zeek/Desc.h" +#include "zeek/Dict.h" #include "zeek/File.h" #include "zeek/Func.h" #include "zeek/ID.h" diff --git a/src/cluster/Backend.h b/src/cluster/Backend.h index b8a5a11143..c3506cc3e2 100644 --- a/src/cluster/Backend.h +++ b/src/cluster/Backend.h @@ -10,22 +10,16 @@ #include #include "zeek/EventHandler.h" -#include "zeek/IntrusivePtr.h" #include "zeek/Span.h" #include "zeek/Tag.h" +#include "zeek/Val.h" +#include "zeek/ZeekArgs.h" +#include "zeek/cluster/BifSupport.h" #include "zeek/cluster/Serializer.h" #include "zeek/logging/Types.h" namespace zeek { -class FuncVal; - -using FuncValPtr = IntrusivePtr; - -class Val; -using ValPtr = IntrusivePtr; -using ArgsSpan = Span; - namespace detail { template class OnLoopProcess; diff --git a/src/digest.h b/src/digest.h index da910a4f96..e846257451 100644 --- a/src/digest.h +++ b/src/digest.h @@ -7,10 +7,11 @@ #pragma once #include // for u_char -#include #include #include +#include "zeek/util.h" + // Required buffer size for an MD5 digest. #define ZEEK_MD5_DIGEST_LENGTH 16 diff --git a/src/input/Manager.cc b/src/input/Manager.cc index 989125b90f..71788cb2ce 100644 --- a/src/input/Manager.cc +++ b/src/input/Manager.cc @@ -7,6 +7,7 @@ #include "zeek/CompHash.h" #include "zeek/Desc.h" +#include "zeek/Dict.h" #include "zeek/Event.h" #include "zeek/EventHandler.h" #include "zeek/Expr.h" diff --git a/src/iosource/Component.cc b/src/iosource/Component.cc index 80e792ff91..3aa7610e0b 100644 --- a/src/iosource/Component.cc +++ b/src/iosource/Component.cc @@ -4,6 +4,7 @@ #include "zeek/Desc.h" #include "zeek/Reporter.h" +#include "zeek/Type.h" namespace zeek::iosource { diff --git a/src/iosource/pcap/Source.cc b/src/iosource/pcap/Source.cc index 9bb3d7833e..b1270d9fc6 100644 --- a/src/iosource/pcap/Source.cc +++ b/src/iosource/pcap/Source.cc @@ -10,7 +10,7 @@ #include #endif -#include +#include #include "zeek/Event.h" #include "zeek/iosource/BPF_Program.h" diff --git a/src/logging/Manager.cc b/src/logging/Manager.cc index c01e89f929..c8c7098dd8 100644 --- a/src/logging/Manager.cc +++ b/src/logging/Manager.cc @@ -8,6 +8,7 @@ #include #include "zeek/Desc.h" +#include "zeek/Dict.h" #include "zeek/Event.h" #include "zeek/EventHandler.h" #include "zeek/File.h" diff --git a/src/main.cc b/src/main.cc index 97829a8d2a..905f80eacb 100644 --- a/src/main.cc +++ b/src/main.cc @@ -3,8 +3,10 @@ #include "zeek/zeek-config.h" #include +#include #include "zeek/RunState.h" +#include "zeek/Stats.h" #include "zeek/iosource/Manager.h" #include "zeek/supervisor/Supervisor.h" #include "zeek/zeek-setup.h" diff --git a/src/mmdb.bif b/src/mmdb.bif index 76ff974e07..efb5f1172d 100644 --- a/src/mmdb.bif +++ b/src/mmdb.bif @@ -1,5 +1,5 @@ %%{ -#include +#include "zeek/MMDB.h" %%} ## Initializes MMDB for later use of lookup_location. diff --git a/src/net_util.h b/src/net_util.h index 9bd6a5bc5a..008a212795 100644 --- a/src/net_util.h +++ b/src/net_util.h @@ -5,18 +5,9 @@ #include "zeek/zeek-config.h" #include - -// Define first. -enum TransportProto : uint8_t { - TRANSPORT_UNKNOWN, - TRANSPORT_TCP, - TRANSPORT_UDP, - TRANSPORT_ICMP, -}; - -extern const char* transport_proto_string(TransportProto proto); - -enum IPFamily { IPv4, IPv6 }; +#include +#include +#include // Force these files to stay in this order. Normally, clang-format // wants to move sys/types.h to the end of this block, but that @@ -36,8 +27,6 @@ enum IPFamily { IPv4, IPv6 }; #include #include -#include "zeek/util.h" - #ifdef HAVE_NETINET_IP6_H #include @@ -126,6 +115,18 @@ struct ip6_rthdr { #define TCPOPT_TIMESTAMP TCPOPT_TSTAMP #endif +// Define first. +enum TransportProto : uint8_t { + TRANSPORT_UNKNOWN, + TRANSPORT_TCP, + TRANSPORT_UDP, + TRANSPORT_ICMP, +}; + +extern const char* transport_proto_string(TransportProto proto); + +enum IPFamily { IPv4, IPv6 }; + namespace zeek { class IPAddr; diff --git a/src/parse.y b/src/parse.y index c6fe97501e..c652a471d6 100644 --- a/src/parse.y +++ b/src/parse.y @@ -83,6 +83,7 @@ %{ #include +#include #include #include #include diff --git a/src/plugin/Component.cc b/src/plugin/Component.cc index fda9bde98d..e363066dfd 100644 --- a/src/plugin/Component.cc +++ b/src/plugin/Component.cc @@ -4,6 +4,8 @@ #include "zeek/Desc.h" #include "zeek/Reporter.h" +#include "zeek/Type.h" +#include "zeek/Val.h" namespace zeek::plugin { @@ -16,6 +18,8 @@ Component::Component(component::Type arg_type, const std::string& arg_name, Tag: canon_name_val = make_intrusive(canon_name); } +Component::~Component() {} + void Component::Describe(ODesc* d) const { d->Add(" "); d->Add("["); @@ -95,4 +99,7 @@ void Component::SetEnabled(bool arg_enabled) { break; } } + +StringValPtr Component::CanonicalNameVal() const { return canon_name_val; } + } // namespace zeek::plugin diff --git a/src/plugin/Component.h b/src/plugin/Component.h index 62f11b0cb9..9a28d21a0d 100644 --- a/src/plugin/Component.h +++ b/src/plugin/Component.h @@ -2,17 +2,20 @@ #pragma once -#include "zeek/zeek-config.h" - #include +#include "zeek/IntrusivePtr.h" #include "zeek/Tag.h" -#include "zeek/Type.h" -#include "zeek/Val.h" namespace zeek { class ODesc; +class EnumType; +using EnumTypePtr = IntrusivePtr; +class EnumVal; +using EnumValPtr = IntrusivePtr; +class StringVal; +using StringValPtr = IntrusivePtr; namespace plugin { namespace component { @@ -69,7 +72,7 @@ public: /** * Destructor. */ - virtual ~Component() = default; + virtual ~Component(); // Disable. Component(const Component& other) = delete; @@ -99,7 +102,7 @@ public: * ID. */ const std::string& CanonicalName() const { return canon_name; } - StringValPtr CanonicalNameVal() const { return canon_name_val; } + StringValPtr CanonicalNameVal() const; /** * Returns a textual representation of the component. This goes into diff --git a/src/probabilistic/BloomFilter.cc b/src/probabilistic/BloomFilter.cc index 9d95cf5a8d..726d302af6 100644 --- a/src/probabilistic/BloomFilter.cc +++ b/src/probabilistic/BloomFilter.cc @@ -2,6 +2,7 @@ #include "zeek/probabilistic/BloomFilter.h" +#include #include #include diff --git a/src/probabilistic/CardinalityCounter.cc b/src/probabilistic/CardinalityCounter.cc index 4014b3de57..fc60fafd26 100644 --- a/src/probabilistic/CardinalityCounter.cc +++ b/src/probabilistic/CardinalityCounter.cc @@ -2,6 +2,7 @@ #include "zeek/probabilistic/CardinalityCounter.h" +#include #include #include #include diff --git a/src/re-scan.l b/src/re-scan.l index 22d961f7f2..7fdab530fc 100644 --- a/src/re-scan.l +++ b/src/re-scan.l @@ -5,11 +5,11 @@ */ %top{ -// Include stdint.h at the start of the generated file. Typically +// Include cstdint at the start of the generated file. Typically // MSVC will include this header later, after the definitions of // the integral type macros. MSVC then complains that about the -// redefinition of the types. Including stdint.h early avoids this. -#include +// redefinition of the types. Including cstdint early avoids this. +#include } %{ diff --git a/src/rule-parse.y b/src/rule-parse.y index bd11a28710..6bba57a3b3 100644 --- a/src/rule-parse.y +++ b/src/rule-parse.y @@ -1,6 +1,6 @@ %{ #include "zeek/zeek-config.h" -#include +#include #include #include diff --git a/src/rule-scan.l b/src/rule-scan.l index 04b8a3b1c6..eef1835484 100644 --- a/src/rule-scan.l +++ b/src/rule-scan.l @@ -1,9 +1,9 @@ %top{ -// Include stdint.h at the start of the generated file. Typically +// Include cstdint at the start of the generated file. Typically // MSVC will include this header later, after the definitions of // the integral type macros. MSVC then complains that about the -// redefinition of the types. Including stdint.h early avoids this. -#include +// redefinition of the types. Including cstdint early avoids this. +#include } %{ diff --git a/src/scan.l b/src/scan.l index e3bc35d379..8a5d796736 100644 --- a/src/scan.l +++ b/src/scan.l @@ -1,9 +1,9 @@ %top{ -// Include stdint.h at the start of the generated file. Typically +// Include cstdint at the start of the generated file. Typically // MSVC will include this header later, after the definitions of // the integral type macros. MSVC then complains that about the -// redefinition of the types. Including stdint.h early avoids this. -#include +// redefinition of the types. Including cstdint early avoids this. +#include } %{ diff --git a/src/script_opt/ObjMgr.h b/src/script_opt/ObjMgr.h index 93698ef4ae..07ddec9864 100644 --- a/src/script_opt/ObjMgr.h +++ b/src/script_opt/ObjMgr.h @@ -15,10 +15,10 @@ #pragma once -#include #include #include "zeek/IntrusivePtr.h" +#include "zeek/Obj.h" namespace zeek::detail { diff --git a/src/script_opt/ZAM/IterInfo.h b/src/script_opt/ZAM/IterInfo.h index 615c44df6a..69d6f45ac0 100644 --- a/src/script_opt/ZAM/IterInfo.h +++ b/src/script_opt/ZAM/IterInfo.h @@ -4,6 +4,7 @@ #pragma once +#include "zeek/Dict.h" #include "zeek/Val.h" #include "zeek/ZeekString.h" #include "zeek/script_opt/ZAM/ZInstAux.h" diff --git a/src/script_opt/ZAM/ZBody.cc b/src/script_opt/ZAM/ZBody.cc index 6777c81792..320bb7c3cf 100644 --- a/src/script_opt/ZAM/ZBody.cc +++ b/src/script_opt/ZAM/ZBody.cc @@ -4,6 +4,7 @@ #include "zeek/Conn.h" #include "zeek/Desc.h" +#include "zeek/Dict.h" #include "zeek/EventHandler.h" #include "zeek/File.h" #include "zeek/Frame.h" diff --git a/src/session/Manager.cc b/src/session/Manager.cc index 5e57ac5163..b15b9383f4 100644 --- a/src/session/Manager.cc +++ b/src/session/Manager.cc @@ -15,6 +15,7 @@ #include "zeek/Reporter.h" #include "zeek/RuleMatcher.h" #include "zeek/RunState.h" +#include "zeek/Stats.h" #include "zeek/Timer.h" #include "zeek/TunnelEncapsulation.h" #include "zeek/packet_analysis/Manager.h" diff --git a/src/session/Session.cc b/src/session/Session.cc index 262abe1c3b..ae46122213 100644 --- a/src/session/Session.cc +++ b/src/session/Session.cc @@ -6,6 +6,7 @@ #include "zeek/Event.h" #include "zeek/IP.h" #include "zeek/Reporter.h" +#include "zeek/Stats.h" #include "zeek/Val.h" #include "zeek/analyzer/Analyzer.h" #include "zeek/session/Manager.h" diff --git a/src/spicy/manager.cc b/src/spicy/manager.cc index 4ade831e2f..b7cacd435f 100644 --- a/src/spicy/manager.cc +++ b/src/spicy/manager.cc @@ -24,10 +24,9 @@ #include -#include -#include -#include - +#include "zeek/analyzer/Manager.h" +#include "zeek/file_analysis/Manager.h" +#include "zeek/packet_analysis/Manager.h" #include "zeek/spicy/file-analyzer.h" #include "zeek/spicy/packet-analyzer.h" #include "zeek/spicy/protocol-analyzer.h" diff --git a/src/storage/Component.h b/src/storage/Component.h index d7768b1d1a..e93fbf114f 100644 --- a/src/storage/Component.h +++ b/src/storage/Component.h @@ -2,6 +2,9 @@ #pragma once +#include + +#include "zeek/IntrusivePtr.h" #include "zeek/plugin/Component.h" namespace zeek::storage { diff --git a/src/storage/Manager.cc b/src/storage/Manager.cc index abd2848832..b511b33b64 100644 --- a/src/storage/Manager.cc +++ b/src/storage/Manager.cc @@ -7,6 +7,8 @@ #include "zeek/RunState.h" #include "zeek/storage/ReturnCode.h" +#include "const.bif.netvar_h" + std::atomic_flag expire_running; namespace zeek::storage { diff --git a/src/storage/backend/redis/Redis.cc b/src/storage/backend/redis/Redis.cc index effacc38b1..4f75e4f940 100644 --- a/src/storage/backend/redis/Redis.cc +++ b/src/storage/backend/redis/Redis.cc @@ -3,6 +3,7 @@ #include "zeek/storage/backend/redis/Redis.h" #include +#include #include "zeek/DebugLogger.h" #include "zeek/Func.h" diff --git a/src/supervisor/Supervisor.cc b/src/supervisor/Supervisor.cc index 22e43f004d..5734a2c968 100644 --- a/src/supervisor/Supervisor.cc +++ b/src/supervisor/Supervisor.cc @@ -26,6 +26,7 @@ extern "C" { } #include "zeek/DebugLogger.h" +#include "zeek/Dict.h" #include "zeek/Event.h" #include "zeek/EventHandler.h" #include "zeek/ID.h" diff --git a/src/telemetry/Opaques.cc b/src/telemetry/Opaques.cc index fdd9edb6e0..3f1fa6c2a3 100644 --- a/src/telemetry/Opaques.cc +++ b/src/telemetry/Opaques.cc @@ -2,6 +2,10 @@ #include "Opaques.h" +#include "zeek/telemetry/Counter.h" +#include "zeek/telemetry/Gauge.h" +#include "zeek/telemetry/Histogram.h" + using namespace zeek; TelemetryVal::TelemetryVal(std::shared_ptr) : OpaqueVal(counter_metric_type) {} @@ -22,3 +26,33 @@ IMPLEMENT_OPAQUE_VALUE(GaugeMetricVal) IMPLEMENT_OPAQUE_VALUE(GaugeMetricFamilyVal) IMPLEMENT_OPAQUE_VALUE(HistogramMetricVal) IMPLEMENT_OPAQUE_VALUE(HistogramMetricFamilyVal) + +template<> +const char* CounterMetricVal::OpaqueName() const { + return telemetry::Counter::OpaqueName; +} + +template<> +const char* CounterMetricFamilyVal::OpaqueName() const { + return telemetry::CounterFamily::OpaqueName; +} + +template<> +const char* GaugeMetricVal::OpaqueName() const { + return telemetry::Gauge::OpaqueName; +} + +template<> +const char* GaugeMetricFamilyVal::OpaqueName() const { + return telemetry::GaugeFamily::OpaqueName; +} + +template<> +const char* HistogramMetricVal::OpaqueName() const { + return telemetry::Histogram::OpaqueName; +} + +template<> +const char* HistogramMetricFamilyVal::OpaqueName() const { + return telemetry::HistogramFamily::OpaqueName; +} diff --git a/src/telemetry/Opaques.h b/src/telemetry/Opaques.h index 0de7367932..d5c5c468c9 100644 --- a/src/telemetry/Opaques.h +++ b/src/telemetry/Opaques.h @@ -10,6 +10,17 @@ namespace zeek { +namespace telemetry { + +class Counter; +class CounterFamily; +class Gauge; +class GaugeFamily; +class Histogram; +class HistogramFamily; + +} // namespace telemetry + /** * Base class for metric handles. Handle types are not serializable. */ @@ -43,7 +54,7 @@ public: protected: ValPtr DoClone(CloneState*) override { return make_intrusive(hdl); } - const char* OpaqueName() const override { return Handle::OpaqueName; } + const char* OpaqueName() const override; private: HandleType hdl; diff --git a/src/telemetry/ProcessStats.cc b/src/telemetry/ProcessStats.cc index 58c534c64b..feaee81224 100644 --- a/src/telemetry/ProcessStats.cc +++ b/src/telemetry/ProcessStats.cc @@ -9,10 +9,10 @@ #include #include #include -#include -#include #include #include +#include +#include namespace zeek::telemetry::detail { diff --git a/src/threading/BasicThread.cc b/src/threading/BasicThread.cc index f5c6a588ad..4c606b5cb2 100644 --- a/src/threading/BasicThread.cc +++ b/src/threading/BasicThread.cc @@ -5,6 +5,7 @@ #include "zeek/zeek-config.h" #include +#include #include #include "zeek/threading/Manager.h" diff --git a/src/util.h b/src/util.h index b5cff50e6e..3e8d2943af 100644 --- a/src/util.h +++ b/src/util.h @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -63,8 +62,6 @@ extern HeapLeakChecker* heap_checker; #endif -#include - extern "C" { #include "zeek/3rdparty/modp_numtoa.h" } diff --git a/src/zeek-setup.cc b/src/zeek-setup.cc index f2a9989267..0055cf1b3a 100644 --- a/src/zeek-setup.cc +++ b/src/zeek-setup.cc @@ -43,6 +43,7 @@ #include "zeek/Scope.h" #include "zeek/ScriptCoverageManager.h" #include "zeek/Stats.h" +#include "zeek/Stmt.h" #include "zeek/Timer.h" #include "zeek/Traverse.h" #include "zeek/Trigger.h" diff --git a/src/zeekygen/Configuration.cc b/src/zeekygen/Configuration.cc index 035d58bc39..021bfd0982 100644 --- a/src/zeekygen/Configuration.cc +++ b/src/zeekygen/Configuration.cc @@ -8,6 +8,7 @@ #include #include "zeek/Reporter.h" +#include "zeek/Type.h" #include "zeek/zeekygen/utils.h" using namespace std; diff --git a/src/zeekygen/Configuration.h b/src/zeekygen/Configuration.h index 3bc5f10ee6..2256e0fde7 100644 --- a/src/zeekygen/Configuration.h +++ b/src/zeekygen/Configuration.h @@ -2,7 +2,7 @@ #pragma once -#include // for time_t +#include // for time_t #include #include diff --git a/src/zeekygen/IdentifierInfo.h b/src/zeekygen/IdentifierInfo.h index 346a0ab4f2..9fa9996281 100644 --- a/src/zeekygen/IdentifierInfo.h +++ b/src/zeekygen/IdentifierInfo.h @@ -2,7 +2,7 @@ #pragma once -#include // for time_t +#include // for time_t #include #include #include diff --git a/src/zeekygen/PackageInfo.h b/src/zeekygen/PackageInfo.h index 5da3df1862..574a709fe4 100644 --- a/src/zeekygen/PackageInfo.h +++ b/src/zeekygen/PackageInfo.h @@ -2,7 +2,7 @@ #pragma once -#include // for time_t +#include // for time_t #include #include diff --git a/src/zeekygen/ScriptInfo.h b/src/zeekygen/ScriptInfo.h index d010057f8a..bec033263d 100644 --- a/src/zeekygen/ScriptInfo.h +++ b/src/zeekygen/ScriptInfo.h @@ -4,7 +4,7 @@ #include "zeek/zeek-config.h" -#include // for time_t +#include // for time_t #include #include #include diff --git a/src/zeekygen/SpicyModuleInfo.h b/src/zeekygen/SpicyModuleInfo.h index 634d0c3228..faddc8a3ff 100644 --- a/src/zeekygen/SpicyModuleInfo.h +++ b/src/zeekygen/SpicyModuleInfo.h @@ -2,7 +2,7 @@ #pragma once -#include // for time_t +#include // for time_t #include #include #include diff --git a/src/zeekygen/utils.h b/src/zeekygen/utils.h index c3f375990b..0537ced888 100644 --- a/src/zeekygen/utils.h +++ b/src/zeekygen/utils.h @@ -4,7 +4,7 @@ #include "zeek/zeek-config.h" -#include // for time_t +#include // for time_t #include #include diff --git a/testing/btest/plugins/api-plugin/src/Plugin.cc b/testing/btest/plugins/api-plugin/src/Plugin.cc index 40ed229c66..92f8b0e45e 100644 --- a/testing/btest/plugins/api-plugin/src/Plugin.cc +++ b/testing/btest/plugins/api-plugin/src/Plugin.cc @@ -1,12 +1,14 @@ #include "Plugin.h" -#include -#include -#include -#include +#include #include +#include "zeek/ID.h" +#include "zeek/Reporter.h" +#include "zeek/Type.h" +#include "zeek/Val.h" + namespace btest::plugin::Demo_API { Plugin plugin; } diff --git a/testing/btest/plugins/api-plugin/src/Plugin.h b/testing/btest/plugins/api-plugin/src/Plugin.h index 2c2740e97a..82e089e579 100644 --- a/testing/btest/plugins/api-plugin/src/Plugin.h +++ b/testing/btest/plugins/api-plugin/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_API { diff --git a/testing/btest/plugins/doctest-plugin/src/Plugin.cc b/testing/btest/plugins/doctest-plugin/src/Plugin.cc index 475a2c932f..bfa1bfbf6f 100644 --- a/testing/btest/plugins/doctest-plugin/src/Plugin.cc +++ b/testing/btest/plugins/doctest-plugin/src/Plugin.cc @@ -1,7 +1,7 @@ #include "Plugin.h" -#include +#include "zeek/3rdparty/doctest.h" namespace btest::plugin::Demo_Doctest { Plugin plugin; diff --git a/testing/btest/plugins/doctest-plugin/src/Plugin.h b/testing/btest/plugins/doctest-plugin/src/Plugin.h index b31022919f..af6e0c6074 100644 --- a/testing/btest/plugins/doctest-plugin/src/Plugin.h +++ b/testing/btest/plugins/doctest-plugin/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_Doctest { diff --git a/testing/btest/plugins/file-plugin/src/Foo.cc b/testing/btest/plugins/file-plugin/src/Foo.cc index e5b8fd0369..fbd329dabe 100644 --- a/testing/btest/plugins/file-plugin/src/Foo.cc +++ b/testing/btest/plugins/file-plugin/src/Foo.cc @@ -1,9 +1,10 @@ #include "Foo.h" -#include -#include #include +#include "zeek/file_analysis/File.h" +#include "zeek/file_analysis/Manager.h" + #include "events.bif.h" using namespace btest::plugin::Demo_Foo; diff --git a/testing/btest/plugins/file-plugin/src/Plugin.h b/testing/btest/plugins/file-plugin/src/Plugin.h index ae4873b615..c83ccf23ed 100644 --- a/testing/btest/plugins/file-plugin/src/Plugin.h +++ b/testing/btest/plugins/file-plugin/src/Plugin.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_Foo { diff --git a/testing/btest/plugins/func-hook-plugin/src/Plugin.cc b/testing/btest/plugins/func-hook-plugin/src/Plugin.cc index 37ce584bbc..6ad6ec2251 100644 --- a/testing/btest/plugins/func-hook-plugin/src/Plugin.cc +++ b/testing/btest/plugins/func-hook-plugin/src/Plugin.cc @@ -1,12 +1,12 @@ #include "Plugin.h" -#include -#include -#include -#include -#include -#include +#include "zeek/Conn.h" +#include "zeek/Desc.h" +#include "zeek/Event.h" +#include "zeek/Func.h" +#include "zeek/Val.h" +#include "zeek/threading/Formatter.h" namespace btest::plugin::Demo_Hooks { Plugin plugin; diff --git a/testing/btest/plugins/func-hook-plugin/src/Plugin.h b/testing/btest/plugins/func-hook-plugin/src/Plugin.h index c716182eef..c8522fdc97 100644 --- a/testing/btest/plugins/func-hook-plugin/src/Plugin.h +++ b/testing/btest/plugins/func-hook-plugin/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_Hooks { diff --git a/testing/btest/plugins/hooks-plugin/src/Plugin.cc b/testing/btest/plugins/hooks-plugin/src/Plugin.cc index ab2c2e3d8f..ae5e89195c 100644 --- a/testing/btest/plugins/hooks-plugin/src/Plugin.cc +++ b/testing/btest/plugins/hooks-plugin/src/Plugin.cc @@ -1,14 +1,15 @@ #include "Plugin.h" -#include -#include -#include -#include -#include -#include #include #include +#include "zeek/Conn.h" +#include "zeek/Desc.h" +#include "zeek/Event.h" +#include "zeek/Func.h" +#include "zeek/RunState.h" +#include "zeek/threading/Formatter.h" + namespace btest::plugin::Demo_Hooks { Plugin plugin; } diff --git a/testing/btest/plugins/hooks-plugin/src/Plugin.h b/testing/btest/plugins/hooks-plugin/src/Plugin.h index 4b69532ff1..4a74e64730 100644 --- a/testing/btest/plugins/hooks-plugin/src/Plugin.h +++ b/testing/btest/plugins/hooks-plugin/src/Plugin.h @@ -1,7 +1,9 @@ #pragma once -#include +#include + +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_Hooks { diff --git a/testing/btest/plugins/init-hooks-plugin/src/Plugin.h b/testing/btest/plugins/init-hooks-plugin/src/Plugin.h index 6757f66e60..7367c6723f 100644 --- a/testing/btest/plugins/init-hooks-plugin/src/Plugin.h +++ b/testing/btest/plugins/init-hooks-plugin/src/Plugin.h @@ -1,9 +1,10 @@ #pragma once -#include + #include -namespace btest::plugin::Demo_InitHooks { +#include "zeek/plugin/Plugin.h" +namespace btest::plugin::Demo_InitHooks { class Plugin : public zeek::plugin::Plugin { protected: diff --git a/testing/btest/plugins/iosource-plugin/src/Plugin.h b/testing/btest/plugins/iosource-plugin/src/Plugin.h index a0d9575008..11bbf15053 100644 --- a/testing/btest/plugins/iosource-plugin/src/Plugin.h +++ b/testing/btest/plugins/iosource-plugin/src/Plugin.h @@ -1,11 +1,12 @@ #pragma once -#include -#include #include #include +#include "zeek/Flare.h" +#include "zeek/RunState.h" #include "zeek/iosource/Manager.h" +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_Iosource { diff --git a/testing/btest/plugins/meta-hook-plugin/src/Plugin.cc b/testing/btest/plugins/meta-hook-plugin/src/Plugin.cc index fc477a6eeb..433d54457c 100644 --- a/testing/btest/plugins/meta-hook-plugin/src/Plugin.cc +++ b/testing/btest/plugins/meta-hook-plugin/src/Plugin.cc @@ -1,12 +1,13 @@ #include "Plugin.h" -#include -#include -#include -#include #include +#include "zeek/Desc.h" +#include "zeek/Event.h" +#include "zeek/Func.h" +#include "zeek/threading/Formatter.h" + namespace btest::plugin::Demo_Meta_Hooks { Plugin plugin; } diff --git a/testing/btest/plugins/meta-hook-plugin/src/Plugin.h b/testing/btest/plugins/meta-hook-plugin/src/Plugin.h index 5d9cc496b2..621f72e47d 100644 --- a/testing/btest/plugins/meta-hook-plugin/src/Plugin.h +++ b/testing/btest/plugins/meta-hook-plugin/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_Meta_Hooks { diff --git a/testing/btest/plugins/pktdumper-plugin/src/Plugin.h b/testing/btest/plugins/pktdumper-plugin/src/Plugin.h index bd721d2b5e..4edf5e448b 100644 --- a/testing/btest/plugins/pktdumper-plugin/src/Plugin.h +++ b/testing/btest/plugins/pktdumper-plugin/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_Foo { diff --git a/testing/btest/plugins/pktsrc-plugin/src/Plugin.h b/testing/btest/plugins/pktsrc-plugin/src/Plugin.h index bd721d2b5e..4edf5e448b 100644 --- a/testing/btest/plugins/pktsrc-plugin/src/Plugin.h +++ b/testing/btest/plugins/pktsrc-plugin/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_Foo { diff --git a/testing/btest/plugins/plugin-load-dependency/1/src/Plugin.h b/testing/btest/plugins/plugin-load-dependency/1/src/Plugin.h index 9f808d1978..6d08b32c0d 100644 --- a/testing/btest/plugins/plugin-load-dependency/1/src/Plugin.h +++ b/testing/btest/plugins/plugin-load-dependency/1/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Testing_Plugin1 { diff --git a/testing/btest/plugins/plugin-load-dependency/2/src/Plugin.h b/testing/btest/plugins/plugin-load-dependency/2/src/Plugin.h index 803f4ba8da..efe2614a2a 100644 --- a/testing/btest/plugins/plugin-load-dependency/2/src/Plugin.h +++ b/testing/btest/plugins/plugin-load-dependency/2/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Testing_Plugin2 { diff --git a/testing/btest/plugins/plugin-load-dependency/3/src/Plugin.h b/testing/btest/plugins/plugin-load-dependency/3/src/Plugin.h index e460181379..f089c3612f 100644 --- a/testing/btest/plugins/plugin-load-dependency/3/src/Plugin.h +++ b/testing/btest/plugins/plugin-load-dependency/3/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Testing_Plugin3 { diff --git a/testing/btest/plugins/plugin-load-file-extended/src/Plugin.h b/testing/btest/plugins/plugin-load-file-extended/src/Plugin.h index 8d5243469f..e3bbae7bc6 100644 --- a/testing/btest/plugins/plugin-load-file-extended/src/Plugin.h +++ b/testing/btest/plugins/plugin-load-file-extended/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Testing_LoadFileExtended { diff --git a/testing/btest/plugins/plugin-nopatchversion-plugin/src/Plugin.h b/testing/btest/plugins/plugin-nopatchversion-plugin/src/Plugin.h index 5cf94a1e5c..d39a5e3fa9 100644 --- a/testing/btest/plugins/plugin-nopatchversion-plugin/src/Plugin.h +++ b/testing/btest/plugins/plugin-nopatchversion-plugin/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Testing_NoPatchVersion { diff --git a/testing/btest/plugins/plugin-withpatchversion-plugin/src/Plugin.h b/testing/btest/plugins/plugin-withpatchversion-plugin/src/Plugin.h index 1cf47bd1a6..3a0298d918 100644 --- a/testing/btest/plugins/plugin-withpatchversion-plugin/src/Plugin.h +++ b/testing/btest/plugins/plugin-withpatchversion-plugin/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Testing_WithPatchVersion { diff --git a/testing/btest/plugins/protocol-plugin/src/Plugin.h b/testing/btest/plugins/protocol-plugin/src/Plugin.h index df382b93d3..c8ba53fea6 100644 --- a/testing/btest/plugins/protocol-plugin/src/Plugin.h +++ b/testing/btest/plugins/protocol-plugin/src/Plugin.h @@ -1,7 +1,7 @@ #pragma once -#include +#include "zeek/plugin/Plugin.h" namespace btest::plugin::Demo_Foo { diff --git a/testing/btest/plugins/publish-event-hook-plugin/src/Plugin.cc b/testing/btest/plugins/publish-event-hook-plugin/src/Plugin.cc index ed88976120..6218c068bd 100644 --- a/testing/btest/plugins/publish-event-hook-plugin/src/Plugin.cc +++ b/testing/btest/plugins/publish-event-hook-plugin/src/Plugin.cc @@ -1,11 +1,12 @@ #include "Plugin.h" -#include -#include #include #include +#include "zeek/Desc.h" +#include "zeek/cluster/Backend.h" + namespace btest::plugin::Demo_PublishEvent { Plugin plugin; } diff --git a/testing/btest/plugins/publish-event-hook-plugin/src/Plugin.h b/testing/btest/plugins/publish-event-hook-plugin/src/Plugin.h index 82b7c68b56..54ec20ce76 100644 --- a/testing/btest/plugins/publish-event-hook-plugin/src/Plugin.h +++ b/testing/btest/plugins/publish-event-hook-plugin/src/Plugin.h @@ -1,8 +1,9 @@ #pragma once -#include #include +#include "zeek/plugin/Plugin.h" + namespace btest::plugin::Demo_PublishEvent { class Plugin : public zeek::plugin::Plugin {