Add filter_subnet_table bif

This bif works similar to the matching_subnet bif. The difference is
that, instead of returning a vector of the subnets that match, we return
a filtered view of the original set/table only containing the changed
subnets.

This commit also fixes a small bug in TableVal::UpdateTimestamp
(ReadOperation only has to be called when LoggingAccess() is true).
This commit is contained in:
Johanna Amann 2016-03-16 15:50:13 -07:00
parent f5ce4785ea
commit a6cb85d86a
7 changed files with 153 additions and 23 deletions

View file

@ -37,8 +37,8 @@ public:
void* Lookup(const Val* value, bool exact = false) const;
// Returns list of all found matches or empty list otherwise.
list<IPPrefix> FindAll(const IPAddr& addr, int width) const;
list<IPPrefix> FindAll(const SubNetVal* value) const;
list<tuple<IPPrefix,void*>> FindAll(const IPAddr& addr, int width) const;
list<tuple<IPPrefix,void*>> FindAll(const SubNetVal* value) const;
// Returns pointer to data or nil if not found.
void* Remove(const IPAddr& addr, int width);