A forwarding table for the attribute-based, single-tree model. More...
#include <forwarding.h>
Public Member Functions | |
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... | |
Public Member Functions inherited from siena::FIB | |
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... | |
A forwarding table for the attribute-based, single-tree model.
An AttributesFIB associates predicates to interfaces, as in a single-tree routing scheme. An AttributesFIB uses the attribute-based data model, thus a predicate in an AttributesFIB is a disjunction of conjunctions of elementary constraints posed on the values of attributes in messages (or message descriptors). An interface is simply an identifier, corresponding to the link-level address of a neighbor.
|
pure virtual |
Associates a predicate to an interface.
This is the method that constructs the forwarding table. This method must be called once for each interface, after the forwarding table is constructed or after it has been cleared. Using this method twice on the same interface without clearing the forwarding table has undefined effects.
|
pure virtual |
Processes a message, calling the output() function on the given MatchHandler object for each matching interface.
Matches a message against the predicates stored in the forwarding table. The result is processed through the MatchHandler passed as a parameter to this function.
Notice that the forwarding table must be consolidated by calling consolidate() before this function is called.