diff --git a/src/CompHash.cc b/src/CompHash.cc index ba640d50f8..2463fa39a7 100644 --- a/src/CompHash.cc +++ b/src/CompHash.cc @@ -3,6 +3,7 @@ #include "zeek-config.h" #include "CompHash.h" +#include "Dict.h" #include "Val.h" #include "Reporter.h" #include "Func.h" diff --git a/src/Val.cc b/src/Val.cc index 7017b7b48e..a3064980d4 100644 --- a/src/Val.cc +++ b/src/Val.cc @@ -14,6 +14,7 @@ #include #include "Attr.h" +#include "Dict.h" #include "Net.h" #include "File.h" #include "Func.h" @@ -1357,6 +1358,11 @@ void TableVal::RemoveAll() val.table_val->SetDeleteFunc(table_entry_val_delete_func); } +int TableVal::Size() const + { + return AsTable()->Length(); + } + int TableVal::RecursiveSize() const { int n = AsTable()->Length(); diff --git a/src/Val.h b/src/Val.h index 1282af2574..f58edcf0e2 100644 --- a/src/Val.h +++ b/src/Val.h @@ -3,7 +3,6 @@ #pragma once #include "Type.h" -#include "Dict.h" #include "CompHash.h" #include "BroString.h" #include "Timer.h" @@ -31,6 +30,9 @@ using std::string; #define UDP_PORT_MASK 0x20000 #define ICMP_PORT_MASK 0x30000 +template class PDict; +class IterCookie; + class Val; class BroFunc; class Func; @@ -786,7 +788,7 @@ public: Attributes* Attrs() { return attrs; } // Returns the size of the table. - int Size() const { return AsTable()->Length(); } + int Size() const; int RecursiveSize() const; // Returns the Prefix table used inside the table (if present). diff --git a/src/probabilistic/Topk.cc b/src/probabilistic/Topk.cc index 97ef572ddd..f920ca17b4 100644 --- a/src/probabilistic/Topk.cc +++ b/src/probabilistic/Topk.cc @@ -9,6 +9,7 @@ #include "IntrusivePtr.h" #include "Reporter.h" #include "NetVar.h" +#include "Dict.h" namespace probabilistic { diff --git a/src/supervisor/Supervisor.cc b/src/supervisor/Supervisor.cc index f0377f8d5a..4a8cd87cf5 100644 --- a/src/supervisor/Supervisor.cc +++ b/src/supervisor/Supervisor.cc @@ -13,6 +13,7 @@ #include #include "iosource/Manager.h" +#include "Dict.h" #include "Reporter.h" #include "Scope.h" #include "DebugLogger.h" diff --git a/src/util.cc b/src/util.cc index b143d0a4ef..6429e1481d 100644 --- a/src/util.cc +++ b/src/util.cc @@ -44,6 +44,7 @@ #endif #include "Desc.h" +#include "Dict.h" #include "digest.h" #include "input.h" #include "Obj.h"