mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +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
|
@ -4493,7 +4493,7 @@ Val* InExpr::Fold(Val* v1, Val* v2) const
|
|||
|
||||
if ( v1->Type()->Tag() == TYPE_ADDR &&
|
||||
v2->Type()->Tag() == TYPE_SUBNET )
|
||||
return new Val(v2->AsSubNetVal().Contains(v1->AsAddr()), TYPE_BOOL);
|
||||
return new Val(v2->AsSubNetVal()->Contains(v1->AsAddr()), TYPE_BOOL);
|
||||
|
||||
TableVal* vt = v2->AsTableVal();
|
||||
if ( vt->Lookup(v1, false) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue