Siena
Fast Forwarding documentation (v. 1.0.0)
Main Page Class Hierarchy Compound List File List Compound Members Examples
FwdTable Class Reference
#include <fwd_table.h>
List of all members.
Detailed Description
The heart of the forwarding table.
A FwdTable
associates predicates to interfaces. A Predicate is a disjunction of conjunctions of elementary constraints. An interface is simply an identifier, corresponding to the link-level address of a neighbor.
The FwdTable
is a dictionary data structure, meaning that the set of associations is constructed by adding associations, but can not be modified by removing individual associations.
Once constructed, the forwarding table can match incoming messages. The forwarding table delegates the processing of matched notifications to a given output processor object.
The forwarding table manages its own memory allocation through a block-allocator. The forwarding table can be completely cleared and built over again. When cleared, the forwarding table releases all the previously allocated memory.
Constructor & Destructor Documentation
FwdTable::FwdTable |
( |
unsigned int |
memblk_size = 65536 |
) |
|
|
|
constructs a forwarding table with a private memory allocator that uses memory chunks of the given size. |
Member Function Documentation
void FwdTable::add_to_selectivity |
( |
Selectivity * |
, |
|
|
ifid_t |
|
|
) |
[private] |
|
|
adds an interface to the set of excluded interfaces of an existing item in the selectivity table
When a new interface is added to the exclude set of a selectivity item of a given name, that item is moved along the selectivity list in order to maintain the list sorted by level of selectivity. This is done by shifting the item as in a bubble-sort algorithm. |
unsigned int FwdTable::bytesize |
( |
|
) |
const |
|
|
footprint of the forwarding table.
returns the number of bytes of memory allocated by the forwarding table. |
|
clears the forwarding table.
This method removes all the associations from the forwarding table and releases allocated memory. |
|
utility function that connects a constraint descriptor to the descriptor of the filter containing that constraint |
Attribute * FwdTable::get_attribute |
( |
const sx_name & |
name |
) |
[private] |
|
|
utility function that finds an attribute in the constraint index * |
unsigned int FwdTable::get_preprocess_rounds |
( |
|
) |
const |
|
|
returns the current number of pre-processing rounds. |
void FwdTable::ifconfig |
( |
if_t |
, |
|
|
const sx_predicate & |
|
|
) |
|
|
|
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. |
void FwdTable::match |
( |
const sx_message & |
, |
|
|
IProcessor & |
|
|
) |
const |
|
|
processes a message, calling the output() function on the given IProcessor object for each matching interface. |
Selectivity * FwdTable::new_selectivity |
( |
const string & |
, |
|
|
ifid_t |
|
|
) |
[private] |
|
|
adds a new item to the selectivity table.
The selectivity table is a double-link list of Selectivity objects. The list is sorted according to the level of selectivity, which correspond to the size of the exclude set.
When a new selectivity item is created, it is added at the bottom of the list, having selectivity level 1. |
void FwdTable::preprocess_message |
( |
const sx_message & |
, |
|
|
bitvector * |
, |
|
|
unsigned |
int |
|
) |
const [private] |
|
void FwdTable::set_preprocess_rounds |
( |
unsigned |
int |
) |
|
|
|
determines the number of pre-processing rounds applied to every message. |
Member Data Documentation
TST FwdTable::attributes [private]
|
|
|
main index of constraints |
ifid_t FwdTable::ifcount [private]
|
|
|
total number of interfaces associated with a predicate in the forwarding table. |
|
private allocator of the forwarding table.
All the data structure forming the forwarding table are allocated through this memory management system. |
unsigned int FwdTable::preprocess_rounds [private]
|
|
|
number of pre-processing rounds |
|
first element in the selectivity table
this is the element with the highest selectivity level. In other words, this is the constraint name that, if not present in the message, can exclude the higher number of interfaces. |
|
last element in the selectivity table
this is the element with the lowest selectivity level. |
The documentation for this class was generated from the following files:
Copyright © 2001-2002 University of Colorado.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.1 or any later version published by the Free Software
Foundation; with no Invariant Sections, no Front-Cover Texts and no
Back-Cover Texts. A copy of the license is included in the section
entitled "GNU Free Documentation License".
This documentation is authored and maintained by
Antonio
Carzaniga