Move EventMgr, EventHandler, and EventRegistry code to zeek namespace. Rename mgr to event_mgr.

This commit is contained in:
Tim Wojtulewicz 2020-07-20 16:22:30 -07:00
parent 1c17700c48
commit 45b5a98420
76 changed files with 328 additions and 300 deletions

View file

@ -18,7 +18,7 @@
ZEEK_FORWARD_DECLARE_NAMESPACED(Analyzer, zeek, analyzer);
namespace file_analysis { class File; }
class Connection;
class EventHandlerPtr;
ZEEK_FORWARD_DECLARE_NAMESPACED(EventHandlerPtr, zeek);
ZEEK_FORWARD_DECLARE_NAMESPACED(RecordVal, zeek);
ZEEK_FORWARD_DECLARE_NAMESPACED(StringVal, zeek);
ZEEK_FORWARD_DECLARE_NAMESPACED(Location, zeek::detail);
@ -259,13 +259,13 @@ public:
{ after_zeek_init = true; }
private:
void DoLog(const char* prefix, EventHandlerPtr event, FILE* out,
void DoLog(const char* prefix, zeek::EventHandlerPtr event, FILE* out,
Connection* conn, val_list* addl, bool location, bool time,
const char* postfix, const char* fmt, va_list ap) __attribute__((format(printf, 10, 0)));
// WeirdHelper doesn't really have to be variadic, but it calls DoLog
// and that takes va_list anyway.
void WeirdHelper(EventHandlerPtr event, val_list vl, const char* fmt_name, ...) __attribute__((format(printf, 4, 5)));;
void WeirdHelper(zeek::EventHandlerPtr event, val_list vl, const char* fmt_name, ...) __attribute__((format(printf, 4, 5)));;
void UpdateWeirdStats(const char* name);
inline bool WeirdOnSamplingWhiteList(const char* name)
{ return weird_sampling_whitelist.find(name) != weird_sampling_whitelist.end(); }