implementation of a forwarding table based on an improved "counting" algorithm. More...
#include <fwdtable.h>
Public Member Functions | |
virtual void | set_preprocess_rounds (unsigned int)=0 |
Determines the number of pre-processing rounds applied to every message. | |
virtual unsigned int | get_preprocess_rounds () const =0 |
Returns the current number of pre-processing rounds. | |
![]() | |
virtual void | ifconfig (InterfaceId, const Predicate &)=0 |
Associates a predicate to an interface. More... | |
virtual void | match (const Message &, MatchHandler &) const =0 |
Processes a message, calling the output() function on the given MatchHandler object for each matching interface. More... | |
![]() | |
virtual | ~FIB () |
Destroys the forwarding including all its internal data structures. | |
virtual void | consolidate () |
Prepares the forwarding table for matching. More... | |
virtual void | clear ()=0 |
Clears the forwarding table. More... | |
virtual void | clear_recycle ()=0 |
Clears the forwarding table. More... | |
virtual size_t | allocated_bytesize () const =0 |
Memory allocated by the forwarding table. More... | |
virtual size_t | bytesize () const =0 |
Memory used by the forwarding table. More... | |
Static Public Member Functions | |
static FwdTable * | create () |
Creates a FwdTable object. | |
implementation of a forwarding table based on an improved "counting" algorithm.
This class implements the index structure and matching algorithm described in "Forwarding in a Content-Based Network", Proceedings of ACM SIGCOMM 2003. p. 163-174. Karlsruhe, Germany. August, 2003.
In addition, this algorithm includes a number of improvements. The most notable one uses a fast containment check between the set of attribute names in the message and the constraint names of a candidate filter. If the check is negative, that is, if the set of attribute names is not a superset of the set of names of a candidate filter, then the algorithm does not even bother to "count" the number of matched constraints for that filter. The test is based on a representation of the set of names consisting of a Bloom filter.
Another improvement uses static counters to implement a faster but non-reentrant counting algorithm. This variant can be selected with the –with-non-reentrant-counters
option at configure-time.