|
xorp
|
A container for all policy filters a protocol should support. More...
#include <policy_filters.hh>
Classes | |
| class | PolicyFiltersErr |
Public Member Functions | |
| PolicyFilters (FilterBase *im, FilterBase *sm, FilterBase *ex) | |
| bool | run_filter (const uint32_t &type, VarRW &varrw) |
| Run a filter and decide whether route should be accepted. | |
| void | configure (const uint32_t &type, const string &conf) |
| Configure a filter. | |
| void | reset (const uint32_t &type) |
| Reset a filter. | |
Private Member Functions | |
| FilterBase & | whichFilter (const uint32_t &ftype) |
| Decide which filter to run based on its type. | |
Private Attributes | |
| FilterBase * | _import_filter |
| FilterBase * | _export_sm_filter |
| FilterBase * | _export_filter |
A container for all policy filters a protocol should support.
Filters which are not used should just not be configured / executed. In the future an option to disable a filter should be added. Although, not running a filter is harmless for now [if configured however, state consumes memory].
| void PolicyFilters::configure | ( | const uint32_t & | type, |
| const string & | conf | ||
| ) |
| void PolicyFilters::reset | ( | const uint32_t & | type | ) |
Reset a filter.
| type | the filter to reset. |
| bool PolicyFilters::run_filter | ( | const uint32_t & | type, |
| VarRW & | varrw | ||
| ) |
| FilterBase & PolicyFilters::whichFilter | ( | const uint32_t & | ftype | ) | [private] |
Decide which filter to run based on its type.
Throws exception if ftype is invalid.
| ftype | integral filter identifier. |