xorp

FilterTable< A > Class Template Reference

specialized BGPRouteTable implementing a filter bank to modify or drop routes. More...

#include <route_table_filter.hh>

Inheritance diagram for FilterTable< A >:
BGPRouteTable< A >

List of all members.

Public Member Functions

 FilterTable (string tablename, Safi safi, BGPRouteTable< A > *parent, NextHopResolver< A > &next_hop_resolver)
void reconfigure_filter ()
int add_route (InternalMessage< A > &rtmsg, BGPRouteTable< A > *caller)
int replace_route (InternalMessage< A > &old_rtmsg, InternalMessage< A > &new_rtmsg, BGPRouteTable< A > *caller)
int delete_route (InternalMessage< A > &rtmsg, BGPRouteTable< A > *caller)
int route_dump (InternalMessage< A > &rtmsg, BGPRouteTable< A > *caller, const PeerHandler *dump_peer)
int push (BGPRouteTable< A > *caller)
const SubnetRoute< A > * lookup_route (const IPNet< A > &net, uint32_t &genid, FPAListRef &pa_list) const
void route_used (const SubnetRoute< A > *route, bool in_use)
RouteTableType type () const
string str () const
bool get_next_message (BGPRouteTable< A > *next_table)
int add_aggregation_filter (bool is_ibgp)
int add_simple_AS_filter (const AsNum &asn)
int add_route_reflector_input_filter (IPv4 bgp_id, IPv4 cluster_id)
int add_AS_prepend_filter (const AsNum &asn, bool is_confederation_peer)
int add_nexthop_rewrite_filter (const A &nexthop, bool directly_connected, const IPNet< A > &subnet)
int add_nexthop_peer_check_filter (const A &nexthop, const A &peer_address)
int add_ibgp_loop_filter ()
int add_route_reflector_ibgp_loop_filter (bool client, IPv4 bgp_id, IPv4 cluster_id)
int add_route_reflector_purge_filter ()
int add_localpref_insertion_filter (uint32_t default_local_pref)
int add_localpref_removal_filter ()
int add_med_insertion_filter ()
int add_med_removal_filter ()
int add_known_community_filter (PeerType peer_type)
int add_unknown_filter ()
int add_originate_route_filter (const AsNum &asn, PeerType peer_type)
void do_versioning ()

Private Member Functions

bool apply_filters (InternalMessage< A > &rtmsg, int ref_change)
bool apply_filters (InternalMessage< A > &rtmsg) const
void drop_message (const InternalMessage< A > *rtmsg) const

Private Attributes

map< uint32_t, FilterVersion
< A > * > 
_filter_versions
set< uint32_t > _deleted_filters
FilterVersion< A > * _current_filter
NextHopResolver< A > & _next_hop_resolver
bool _do_versioning

Detailed Description

template<class A>
class FilterTable< A >

specialized BGPRouteTable implementing a filter bank to modify or drop routes.

The XORP BGP is internally implemented as a set of pipelines consisting of a series of BGPRouteTables. Each pipeline receives routes from a BGP peer, stores them, and applies filters to them to modify the routes. Then the pipelines converge on a single decision process, which decides which route wins amongst possible alternative routes. After decision, the winning routes fanout again along a set of pipelines, again being filtered, before being transmitted to peers.

FilterTable is a BGPRouteTable that can hold banks of route filters. Normally FilterTable propagates add_route, delete_route and the response to lookup_route directly through from the parent to the child. A route filter can cause these to not be be propagated, or can modify the attributes of the route in the message.

Typically there are two FilterTables for each peer, one in the input branch from that peer, and one in the output branch to that peer. A FilterTable does not store the routes it modifies. Thus is is normally followed by a CacheTable which stores those routes for later use.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations