Merge remote-tracking branch 'origin/topic/timw/reduce-func-inclusion'

- Minor tweaks to some odd includes during merge

* origin/topic/timw/reduce-func-inclusion:
  Remove Analyzer.h from bro-bif.h
  Remove IPAddr.h from Reporter.h
  Remove the inclusion of Func.h from NetVar.h, which reduces the inclusion of Func.h overall.
This commit is contained in:
Jon Siwek 2020-06-01 19:25:37 -07:00
commit 34a1875e74
26 changed files with 53 additions and 23 deletions

View file

@ -1,4 +1,12 @@
3.2.0-dev.733 | 2020-06-01 19:25:37 -0700
* Remove Analyzer.h from bro-bif.h (Tim Wojtulewicz, Corelight)
* Remove IPAddr.h from Reporter.h (Tim Wojtulewicz, Corelight)
* Remove the inclusion of Func.h from NetVar.h (Tim Wojtulewicz, Corelight)
3.2.0-dev.727 | 2020-06-01 10:57:16 -0700 3.2.0-dev.727 | 2020-06-01 10:57:16 -0700
* Integrate review feedback * Integrate review feedback

View file

@ -1 +1 @@
3.2.0-dev.727 3.2.0-dev.733

@ -1 +1 @@
Subproject commit 02a43adc1cafe5b42f01d3021c5327114fad6e05 Subproject commit db2b7cb50926cd8d87b5a1820073a6387385b40c

View file

@ -12,7 +12,7 @@
#include "Reporter.h" #include "Reporter.h"
#include "Scope.h" #include "Scope.h"
#include "ID.h" #include "ID.h"
#include "IPAddr.h"
AnonymizeIPAddr* ip_anonymizer[NUM_ADDR_ANONYMIZATION_METHODS] = {nullptr}; AnonymizeIPAddr* ip_anonymizer[NUM_ADDR_ANONYMIZATION_METHODS] = {nullptr};

View file

@ -2,6 +2,9 @@
#include "zeek-config.h" #include "zeek-config.h"
#include <vector>
#include <map>
#include "CompHash.h" #include "CompHash.h"
#include "BroString.h" #include "BroString.h"
#include "Dict.h" #include "Dict.h"
@ -9,9 +12,7 @@
#include "RE.h" #include "RE.h"
#include "Reporter.h" #include "Reporter.h"
#include "Func.h" #include "Func.h"
#include "IPAddr.h"
#include <vector>
#include <map>
CompositeHash::CompositeHash(IntrusivePtr<TypeList> composite_type) CompositeHash::CompositeHash(IntrusivePtr<TypeList> composite_type)
: type(std::move(composite_type)) : type(std::move(composite_type))

View file

@ -11,6 +11,7 @@
#include "File.h" #include "File.h"
#include "Reporter.h" #include "Reporter.h"
#include "ConvertUTF.h" #include "ConvertUTF.h"
#include "IPAddr.h"
#define DEFAULT_SIZE 128 #define DEFAULT_SIZE 128
#define SLOP 10 #define SLOP 10

View file

@ -3,7 +3,6 @@
#pragma once #pragma once
#include "Val.h" #include "Val.h"
#include "Func.h"
#include "EventRegistry.h" #include "EventRegistry.h"
#include "Stats.h" #include "Stats.h"

View file

@ -11,7 +11,7 @@
#include <unordered_set> #include <unordered_set>
#include <unordered_map> #include <unordered_map>
#include "IPAddr.h" #include "BroList.h"
namespace analyzer { class Analyzer; } namespace analyzer { class Analyzer; }
namespace file_analysis { class File; } namespace file_analysis { class File; }
@ -35,6 +35,9 @@ protected:
InterpreterException() {} InterpreterException() {}
}; };
class IPAddr;
class Expr;
#define FMT_ATTR __attribute__((format(printf, 2, 3))) // sic! 1st is "this" I guess. #define FMT_ATTR __attribute__((format(printf, 2, 3))) // sic! 1st is "this" I guess.
class Reporter { class Reporter {

View file

@ -21,6 +21,7 @@
#include "Reporter.h" #include "Reporter.h"
#include "module_util.h" #include "module_util.h"
#include "Var.h" #include "Var.h"
#include "IPAddr.h"
using namespace std; using namespace std;

View file

@ -5,6 +5,7 @@
#include "DebugLogger.h" #include "DebugLogger.h"
#include "Reporter.h" #include "Reporter.h"
#include "net_util.h" #include "net_util.h"
#include "IPAddr.h"
const float SerializationFormat::GROWTH_FACTOR = 2.5; const float SerializationFormat::GROWTH_FACTOR = 2.5;
@ -435,4 +436,3 @@ bool BinarySerializationFormat::Write(const char* buf, int len, const char* tag)
uint32_t l = htonl(len); uint32_t l = htonl(len);
return WriteData(&l, sizeof(l)) && WriteData(buf, len); return WriteData(&l, sizeof(l)) && WriteData(buf, len);
} }

View file

@ -13,6 +13,7 @@
#include "threading/Manager.h" #include "threading/Manager.h"
#include "broker/Manager.h" #include "broker/Manager.h"
#include "input.h" #include "input.h"
#include "Func.h"
uint64_t killed_by_inactivity = 0; uint64_t killed_by_inactivity = 0;

View file

@ -10,6 +10,7 @@
#include "Reporter.h" #include "Reporter.h"
#include "analyzer/Analyzer.h" #include "analyzer/Analyzer.h"
class TableVal;
class StringVal; class StringVal;
class Base64Converter; class Base64Converter;

View file

@ -1,5 +1,7 @@
// See the file "COPYING" in the main distribution directory for copyright. // See the file "COPYING" in the main distribution directory for copyright.
#include <errno.h>
#include "Net.h" #include "Net.h"
#include "NetVar.h" #include "NetVar.h"
#include "analyzer/protocol/tcp/TCP.h" #include "analyzer/protocol/tcp/TCP.h"

View file

@ -1,8 +1,6 @@
#pragma once #pragma once
// Headers to include by generated BiF code. // Headers to include by generated BiF code.
#include "analyzer/Analyzer.h"
#include "Conn.h" #include "Conn.h"
#include "NetVar.h" #include "NetVar.h"
#include "Event.h" #include "Event.h"

View file

@ -1,3 +1,7 @@
#include <broker/error.hh>
#include "broker/data.bif.h"
#include "3rdparty/doctest.h"
#include "Data.h" #include "Data.h"
#include "File.h" #include "File.h"
#include "Desc.h" #include "Desc.h"
@ -5,15 +9,8 @@
#include "RE.h" #include "RE.h"
#include "ID.h" #include "ID.h"
#include "Scope.h" #include "Scope.h"
#include "Func.h"
#include "module_util.h" #include "module_util.h"
#include "3rdparty/doctest.h"
#include "broker/data.bif.h"
#include <broker/error.hh>
#include <caf/stream_serializer.hpp>
#include <caf/stream_deserializer.hpp>
#include <caf/streambuf.hpp>
using namespace std; using namespace std;

View file

@ -10,6 +10,11 @@ class IntrusivePtr;
class ODesc; class ODesc;
namespace threading {
struct Value;
struct Field;
}
namespace bro_broker { namespace bro_broker {
extern IntrusivePtr<OpaqueType> opaque_of_data_type; extern IntrusivePtr<OpaqueType> opaque_of_data_type;

View file

@ -6,6 +6,7 @@
#include <cstring> #include <cstring>
#include <unistd.h> #include <unistd.h>
#include "Func.h"
#include "Data.h" #include "Data.h"
#include "Store.h" #include "Store.h"
#include "util.h" #include "util.h"

View file

@ -23,6 +23,7 @@
class Frame; class Frame;
class Func; class Func;
class VectorType;
namespace bro_broker { namespace bro_broker {

View file

@ -17,6 +17,7 @@
#include "NetVar.h" #include "NetVar.h"
#include "Net.h" #include "Net.h"
#include "CompHash.h" #include "CompHash.h"
#include "Func.h"
#include "../file_analysis/Manager.h" #include "../file_analysis/Manager.h"
#include "../threading/SerialTypes.h" #include "../threading/SerialTypes.h"

View file

@ -12,6 +12,7 @@
#include "File.h" #include "File.h"
#include "input.h" #include "input.h"
#include "IntrusivePtr.h" #include "IntrusivePtr.h"
#include "Func.h"
#include "broker/Manager.h" #include "broker/Manager.h"
#include "threading/Manager.h" #include "threading/Manager.h"

View file

@ -6,6 +6,7 @@
#include "NetVar.h" #include "NetVar.h"
#include "iosource/Manager.h" #include "iosource/Manager.h"
#include "Event.h" #include "Event.h"
#include "IPAddr.h"
using namespace threading; using namespace threading;

View file

@ -8,11 +8,15 @@
#include "iosource/IOSource.h" #include "iosource/IOSource.h"
#include "Flare.h" #include "Flare.h"
class BroObj;
namespace threading { namespace threading {
class BasicInputMessage; class BasicInputMessage;
class BasicOutputMessage; class BasicOutputMessage;
class HeartbeatMessage; class HeartbeatMessage;
struct Value;
struct Field;
/** /**
* A specialized thread that provides bi-directional message passing between * A specialized thread that provides bi-directional message passing between

View file

@ -12,6 +12,7 @@
#include "ID.h" #include "ID.h"
#include "Expr.h" #include "Expr.h"
#include "Scope.h" #include "Scope.h"
#include "IPAddr.h"
using namespace threading; using namespace threading;

View file

@ -20,10 +20,6 @@
#include <mach/mach_init.h> #include <mach/mach_init.h>
#endif #endif
#include <string>
#include <array>
#include <vector>
#include <algorithm>
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -43,6 +39,11 @@
# include <malloc.h> # include <malloc.h>
#endif #endif
#include <string>
#include <array>
#include <vector>
#include <algorithm>
#include "Desc.h" #include "Desc.h"
#include "Dict.h" #include "Dict.h"
#include "digest.h" #include "digest.h"

View file

@ -45,6 +45,7 @@ extern "C" {
#include "Traverse.h" #include "Traverse.h"
#include "Trigger.h" #include "Trigger.h"
#include "Hash.h" #include "Hash.h"
#include "Func.h"
#include "supervisor/Supervisor.h" #include "supervisor/Supervisor.h"
#include "threading/Manager.h" #include "threading/Manager.h"

View file

@ -10,6 +10,7 @@
#include "Reporter.h" #include "Reporter.h"
#include "Desc.h" #include "Desc.h"
#include "Type.h"
using namespace std; using namespace std;
using namespace zeekygen; using namespace zeekygen;