Add proper JSON serialization via C++, deprecate json.zeek

This commit is contained in:
Tim Wojtulewicz 2019-07-02 12:22:13 -07:00
parent 385de9b0e7
commit 33a7927704
5 changed files with 244 additions and 119 deletions

View file

@ -20,6 +20,7 @@
#include "Notifier.h"
#include "IPAddr.h"
#include "DebugLogger.h"
#include "RE.h"
// We have four different port name spaces: TCP, UDP, ICMP, and UNKNOWN.
// We distinguish between them based on the bits specified in the *_PORT_MASK
@ -34,7 +35,6 @@
class Val;
class Func;
class BroFile;
class RE_Matcher;
class PrefixTable;
class PortVal;
@ -349,6 +349,8 @@ public:
TableVal* GetRecordFields();
StringVal* ToJSON(bool only_loggable=false, RE_Matcher* re=new RE_Matcher("^_"));
protected:
friend class EnumType;
@ -532,6 +534,7 @@ public:
// Returns the port number in host order (not including the mask).
uint32 Port() const;
string Protocol() const;
// Tests for protocol types.
int IsTCP() const;