Siena Fast Forwarding Documentation (v. 1.13.0)
Public Member Functions | List of all members
siena::SortedBTable Class Reference

implementation of the forwarding table based on Bloom filters. More...

#include <btable.h>

Inheritance diagram for siena::SortedBTable:
Inheritance graph
[legend]
Collaboration diagram for siena::SortedBTable:
Collaboration graph
[legend]

Public Member Functions

virtual void consolidate ()
 Prepares the forwarding table for matching. More...
 
- Public Member Functions inherited from siena::BTable
virtual void ifconfig (if_t, const predicate &)
 Associates a predicate to an interface. More...
 
virtual void match (const message &, MatchHandler &) const
 Processes a message, calling the output() function on the given MatchHandler object for each matching interface. More...
 
virtual void match (const message &, MatchMessageHandler &) const
 Processes a message, calling the output() function on the given MatchMessageHandler object for each matching interface. More...
 
virtual void clear ()
 Clears the forwarding table. More...
 
virtual void clear_recycle ()
 Clears the forwarding table. More...
 
virtual size_t allocated_bytesize () const
 Memory allocated by the forwarding table. More...
 
virtual size_t bytesize () const
 Memory used by the forwarding table. More...
 
- Public Member Functions inherited from siena::ForwardingTable
virtual ~ForwardingTable ()
 Destroys the forwarding including all its internal data structures.
 

Additional Inherited Members

- Protected Attributes inherited from siena::BTable
FTAllocator memory
 Protected allocator of the forwarding table. More...
 
BPredicate * plist
 list of predicates. More...
 

Detailed Description

implementation of the forwarding table based on Bloom filters.

This implementation extends the BTable algorithm simply by sorting the Bloom filters within each predicate. Bloom filters are sorted by their Hamming weight in ascending order. The rationale for this is that the basic BTable algorithm shortcuts the evaluation (only) when a match is found. Therefore, it is advantageous to try "smaller" Bloom filters first, because those are more likely to yield a match.

Member Function Documentation

virtual void siena::SortedBTable::consolidate ( )
virtual

Prepares the forwarding table for matching.

This function processes the forwarding table, packing some of its internal data structures and preparing them to be used to match events. This function must therefore be called after all the necessary calls to ifconfig and before matching messages with match().

The forwarding table can be reset by calling clear or clear_recycle.

See Also
clear()
recycle_clear()

Reimplemented from siena::ForwardingTable.