mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +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
|
@ -6,7 +6,9 @@
|
|||
#include <stdio.h>
|
||||
#include <list>
|
||||
#include <utility>
|
||||
|
||||
#include "BroString.h"
|
||||
#include "IPAddr.h"
|
||||
|
||||
typedef enum {
|
||||
DESC_READABLE,
|
||||
|
@ -68,13 +70,14 @@ public:
|
|||
|
||||
void Add(const char* s, int do_indent=1);
|
||||
void AddN(const char* s, int len) { AddBytes(s, len); }
|
||||
void Add(const string& s) { AddBytes(s.data(), s.size()); }
|
||||
void Add(int i);
|
||||
void Add(uint32 u);
|
||||
void Add(int64 i);
|
||||
void Add(uint64 u);
|
||||
void Add(double d);
|
||||
void Add(const IPAddr& addr);
|
||||
void Add(const IPPrefix& prefix);
|
||||
void Add(const IPAddr& addr) { Add(addr.AsString()); }
|
||||
void Add(const IPPrefix& prefix) { Add(prefix.AsString()); }
|
||||
|
||||
// Add s as a counted string.
|
||||
void AddCS(const char* s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue