xorp

RedistTable< A > Class Template Reference

RouteTable used to redistribute routes. More...

#include <rt_tab_redist.hh>

Inheritance diagram for RedistTable< A >:
RouteTable< A >

List of all members.

Public Types

typedef set< IPNet< A >
, RedistNetCmp< A > > 
RouteIndex

Public Member Functions

 RedistTable (const string &tablename, RouteTable< A > *from_table)
 Constructor.
 ~RedistTable ()
 Destructor.
void add_redistributor (Redistributor< A > *r)
 Add a redistributor to announce existing routes and future updates to.
void remove_redistributor (Redistributor< A > *r)
 Remove a redistributor.
Redistributor< A > * redistributor (const string &name)
 Find redistributor with given name attribute.
int add_route (const IPRouteEntry< A > &route, RouteTable< A > *caller)
int delete_route (const IPRouteEntry< A > *route, RouteTable< A > *caller)
const IPRouteEntry< A > * lookup_route (const IPNet< A > &net) const
const IPRouteEntry< A > * lookup_route (const A &addr) const
RouteRange< A > * lookup_route_range (const A &addr) const
TableType type () const
RouteTable< A > * parent ()
void replumb (RouteTable< A > *old_parent, RouteTable< A > *new_parent)
string str () const
const RouteIndex & route_index () const
 Get nets of live routes seen by RedistTable since it was instantiated.

Protected Attributes

RouteTable< A > * _parent
RouteIndex _rt_index
list< Redistributor< A > * > _outputs

Detailed Description

template<class A>
class RedistTable< A >

RouteTable used to redistribute routes.

The RedistTable is used to redistribute routes from a routing table back out to a routing protocol. For example, when you want to redistribute BGP routes into OSPF.

For most operations the RedistTable is essentially a passthrough. It keeps track of nets it hears add and deletes for so when route Redistributor objects are added to the RedistTable they can announce the existing routes at startup.

Design note: RedistTable uses a set of IPNet's to cache routes - this should be route entry pointers with an appropriate comparitor (not pointer value based).


Constructor & Destructor Documentation

template<typename A>
RedistTable< A >::RedistTable ( const string &  tablename,
RouteTable< A > *  from_table 
)

Constructor.

Plumbs RedistTable in RIB graph after from_table.

Parameters:
from_tabletable to redistribute routes from.
template<typename A >
RedistTable< A >::~RedistTable ( )

Destructor.

Unplumbs table and deletes Redistributor object instances previously added with add_redistributor and not previously removed with remove_redistributor.


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