mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Move all Val classes to the zeek namespaces
This commit is contained in:
parent
ec9eff0bd5
commit
64332ca22c
265 changed files with 3154 additions and 3086 deletions
|
@ -8,8 +8,8 @@ extern "C" {
|
|||
|
||||
#include "IPAddr.h"
|
||||
|
||||
class Val;
|
||||
class SubNetVal;
|
||||
ZEEK_FORWARD_DECLARE_NAMESPACED(Val, zeek);
|
||||
ZEEK_FORWARD_DECLARE_NAMESPACED(SubNetVal, zeek);
|
||||
|
||||
class PrefixTable {
|
||||
private:
|
||||
|
@ -30,21 +30,21 @@ public:
|
|||
void* Insert(const IPAddr& addr, int width, void* data = nullptr);
|
||||
|
||||
// Value may be addr or subnet.
|
||||
void* Insert(const Val* value, void* data = nullptr);
|
||||
void* Insert(const zeek::Val* value, void* data = nullptr);
|
||||
|
||||
// Returns nil if not found, pointer to data otherwise.
|
||||
// For items without data, returns non-nil if found.
|
||||
// If exact is false, performs exact rather than longest-prefix match.
|
||||
void* Lookup(const IPAddr& addr, int width, bool exact = false) const;
|
||||
void* Lookup(const Val* value, bool exact = false) const;
|
||||
void* Lookup(const zeek::Val* value, bool exact = false) const;
|
||||
|
||||
// Returns list of all found matches or empty list otherwise.
|
||||
std::list<std::tuple<IPPrefix,void*>> FindAll(const IPAddr& addr, int width) const;
|
||||
std::list<std::tuple<IPPrefix,void*>> FindAll(const SubNetVal* value) const;
|
||||
std::list<std::tuple<IPPrefix,void*>> FindAll(const zeek::SubNetVal* value) const;
|
||||
|
||||
// Returns pointer to data or nil if not found.
|
||||
void* Remove(const IPAddr& addr, int width);
|
||||
void* Remove(const Val* value);
|
||||
void* Remove(const zeek::Val* value);
|
||||
|
||||
void Clear() { Clear_Patricia(tree, delete_function); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue