mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Associate a Comphash with a BloomFilterVal.
We also keep track of the Bloom filter's element type inside each value. The first use of the BiF bloomfilter_add will "typify" the Bloom filter and lock the Bloom filter's type to the element type.
This commit is contained in:
parent
751cf61293
commit
880d02f720
4 changed files with 91 additions and 5 deletions
|
@ -110,18 +110,32 @@ private:
|
|||
};
|
||||
|
||||
class BloomFilterVal : public OpaqueVal {
|
||||
BloomFilterVal(const BloomFilterVal&);
|
||||
BloomFilterVal& operator=(const BloomFilterVal&);
|
||||
public:
|
||||
BloomFilterVal();
|
||||
static BloomFilterVal* Merge(const BloomFilterVal* first,
|
||||
const BloomFilterVal* second);
|
||||
|
||||
BloomFilterVal(BloomFilter* bf);
|
||||
~BloomFilterVal();
|
||||
|
||||
bool Typify(BroType* type);
|
||||
BroType* Type() const;
|
||||
|
||||
void Add(const Val* val);
|
||||
size_t Count(const Val* val) const;
|
||||
|
||||
protected:
|
||||
friend class Val;
|
||||
BloomFilterVal();
|
||||
BloomFilterVal(OpaqueType* t);
|
||||
|
||||
DECLARE_SERIAL(BloomFilterVal);
|
||||
|
||||
private:
|
||||
BloomFilter* bloom_filter_;
|
||||
BroType* type_;
|
||||
CompositeHash* hash_;
|
||||
BloomFilter* bloom_filter_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue