mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Working on merging the v6-addr branch. This is checkpoint, tests don't
pass yet. Changes: - Gave IPAddress/IPPrefix methods AsString() so that one doesn't need to cast to get a string represenation. - Val::AsAddr()/AsSubnet() return references rather than pointers. I find that more intuitive. - ODesc/Serializer/SerializationFormat get methods to support IPAddress/IPPrefix directly. - Reformatted the comments in IPAddr.h from /// to /** style. - Given IPPrefix a Contains() method. - A bit of cleanup.
This commit is contained in:
parent
7458ebf385
commit
94b9644da7
20 changed files with 160 additions and 129 deletions
|
@ -94,6 +94,8 @@ public:
|
|||
virtual bool Read(double* d, const char* tag);
|
||||
virtual bool Read(char** str, int* len, const char* tag);
|
||||
virtual bool Read(string* s, const char* tag);
|
||||
virtual bool Read(IPAddr* addr, const char* tag);
|
||||
virtual bool Read(IPPrefix* prefix, const char* tag);
|
||||
virtual bool Write(int v, const char* tag);
|
||||
virtual bool Write(uint16 v, const char* tag);
|
||||
virtual bool Write(uint32 v, const char* tag);
|
||||
|
@ -105,6 +107,8 @@ public:
|
|||
virtual bool Write(const char* s, const char* tag);
|
||||
virtual bool Write(const char* buf, int len, const char* tag);
|
||||
virtual bool Write(const string& s, const char* tag);
|
||||
virtual bool Write(const IPAddr& addr, const char* tag);
|
||||
virtual bool Write(const IPPrefix& prefix, const char* tag);
|
||||
virtual bool WriteOpenTag(const char* tag);
|
||||
virtual bool WriteCloseTag(const char* tag);
|
||||
virtual bool WriteSeparator();
|
||||
|
@ -127,6 +131,8 @@ public:
|
|||
virtual bool Write(const char* s, const char* tag);
|
||||
virtual bool Write(const char* buf, int len, const char* tag);
|
||||
virtual bool Write(const string& s, const char* tag);
|
||||
virtual bool Write(const IPAddr& addr, const char* tag);
|
||||
virtual bool Write(const IPPrefix& prefix, const char* tag);
|
||||
virtual bool WriteOpenTag(const char* tag);
|
||||
virtual bool WriteCloseTag(const char* tag);
|
||||
virtual bool WriteSeparator();
|
||||
|
@ -142,6 +148,8 @@ public:
|
|||
virtual bool Read(double* d, const char* tag);
|
||||
virtual bool Read(char** str, int* len, const char* tag);
|
||||
virtual bool Read(string* s, const char* tag);
|
||||
virtual bool Read(IPAddr* addr, const char* tag);
|
||||
virtual bool Read(IPPrefix* prefix, const char* tag);
|
||||
|
||||
private:
|
||||
// Encodes non-printable characters.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue