Siena Fast Forwarding Documentation (v. 1.9.4)

siena::BDDBTableBase Class Reference

implementation of the forwarding table based on Bloom filters and BDDs. This is the common structure of the BDD-based algorithm. More...

#include <bddbtable.h>

Inheritance diagram for siena::BDDBTableBase:
siena::ForwardingTable siena::BDDBTable siena::ZDDBTable

List of all members.

Public Member Functions

virtual void consolidate () throw ()
 Prepares the forwarding table for matching.
virtual void ifconfig (if_t, const predicate &)=0 throw (bad_constraint)
 Associates a predicate to an interface.
virtual void match (const message &, MatchHandler &) const =0 throw ()
 Processes a message, calling the output() function on the given MatchHandler object for each matching interface.
virtual void match (const message &m, MatchMessageHandler &p) const throw ()
 Processes a message, calling the output() function on the given MatchMessageHandler object for each matching interface.
virtual size_t allocated_bytesize () const throw ()
 Memory allocated by the forwarding table.
virtual size_t bytesize () const throw ()
 Memory used by the forwarding table.
virtual void clear ()=0 throw ()
 Clears the forwarding table.
virtual void clear_recycle ()=0 throw ()
 Clears the forwarding table.

Protected Attributes

FTAllocator memory
 Protected allocator of the forwarding table.

Detailed Description

implementation of the forwarding table based on Bloom filters and BDDs. This is the common structure of the BDD-based algorithm.

The idea behind this algorithm is to represent each encoded predicate as a BDD. An encoded predicate is constructed as an M-by-N bit matrix, where M is the chosen size of the Bloom filter, and N is the number of Bloom filters, each one representing a conjunction of constraints. Therefore, each one of the M bits of the Bloom filters becomes a variable in the BDD (or ZDD).


Member Function Documentation

virtual size_t siena::BDDBTableBase::allocated_bytesize (  )  const throw () [virtual]

Memory allocated by the forwarding table.

returns the number of bytes of memory allocated by the forwarding table. This value is always greater than or equal to the value returned by bytesize().

Implements siena::ForwardingTable.

virtual size_t siena::BDDBTableBase::bytesize (  )  const throw () [virtual]

Memory used by the forwarding table.

returns the number of bytes of memory used by the forwarding table. This value is always less than or equal to the value returned by allocated_bytesize().

Implements siena::ForwardingTable.

virtual void siena::BDDBTableBase::clear (  )  throw () [pure virtual]

Clears the forwarding table.

This method removes all the associations from the forwarding table and releases allocated memory. After a call to this method, the forwarding table is ready to be configured with ifconfig().

See also:
ifconfig()
consolidate()

Implements siena::ForwardingTable.

Implemented in siena::BDDBTable, and siena::ZDDBTable.

virtual void siena::BDDBTableBase::clear_recycle (  )  throw () [pure virtual]

Clears the forwarding table.

This method removes all the associations from the forwarding table recycling the allocated memory. After a call to this method, the forwarding table is ready to be configured with ifconfig().

See also:
ifconfig()
consolidate()

Implements siena::ForwardingTable.

Implemented in siena::BDDBTable, and siena::ZDDBTable.

virtual void siena::BDDBTableBase::consolidate (  )  throw () [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.

virtual void siena::BDDBTableBase::ifconfig ( if_t  ,
const predicate  
) throw (bad_constraint) [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.

See also:
consolidate()

Implements siena::ForwardingTable.

Implemented in siena::BDDBTable, and siena::ZDDBTable.

virtual void siena::BDDBTableBase::match ( const message ,
MatchMessageHandler  
) const throw () [virtual]

Processes a message, calling the output() function on the given MatchMessageHandler object for each matching interface.

See also:
consolidate()
ifconfig()

Implements siena::ForwardingTable.

virtual void siena::BDDBTableBase::match ( const message ,
MatchHandler  
) const throw () [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 siena::ForwardingTable::consolidate() before this function is called.

See also:
consolidate()

Implements siena::ForwardingTable.

Implemented in siena::BDDBTable, and siena::ZDDBTable.


Member Data Documentation

FTAllocator siena::BDDBTableBase::memory [protected]

Protected allocator of the forwarding table.

All the data structure forming the forwarding table are allocated through this memory management system.


The documentation for this class was generated from the following file: