xorp

RouteRedistributor< A > Class Template Reference

Store for redistributed routes. More...

#include <redist.hh>

Inheritance diagram for RouteRedistributor< A >:
NONCOPYABLE

List of all members.

Public Types

typedef A Addr
typedef IPNet< A > Net

Public Member Functions

 RouteRedistributor (RouteDB< A > &route_db)
 Constructor for RouteRedistributor.
bool add_route (const Net &net, const Addr &nexthop, const string &ifname, const string &vifname, uint16_t cost, uint16_t tag, const PolicyTags &policytags)
 Add a route to be redistributed with specific cost and tag values.
bool expire_route (const Net &net)
 Trigger route expiry.
uint32_t route_count () const
 Accessor.
void withdraw_routes ()
 Withdraw routes.
bool withdrawing_routes () const

Protected Attributes

RouteDB< A > & _route_db
RedistRouteOrigin< A > * _rt_origin
RouteWalker< A > * _wdrawer
XorpTimer _wtimer

Private Member Functions

bool withdraw_batch ()
 Periodic timer callback for withdrawing a batch of routes.

Detailed Description

template<typename A>
class RouteRedistributor< A >

Store for redistributed routes.


Constructor & Destructor Documentation

template<typename A>
RouteRedistributor< A >::RouteRedistributor ( RouteDB< A > &  route_db)

Constructor for RouteRedistributor.

Parameters:
route_dbthe route database to add and expire routes in.

Member Function Documentation

template<typename A >
bool RouteRedistributor< A >::add_route ( const Net net,
const Addr &  nexthop,
const string &  ifname,
const string &  vifname,
uint16_t  cost,
uint16_t  tag,
const PolicyTags policytags 
)

Add a route to be redistributed with specific cost and tag values.

Parameters:
netnetwork described by route.
nexthoprouter capable of forwarding route.
ifnamethe corresponding interface name toward the destination.
vifnamethe corresponding vif name toward the destination.
policytagspolicy-tags associated with route.
Returns:
true on success, false if route could not be added to the RouteDatabase. Failure may occur if route already exists or a lower cost route exists.
template<typename A >
bool RouteRedistributor< A >::expire_route ( const Net net)

Trigger route expiry.

Parameters:
networkdescribed by route.
Returns:
true on success, false if route did not come from this RouteRedistributor instance.
template<typename A >
uint32_t RouteRedistributor< A >::route_count ( ) const

Accessor.

Returns:
number of routes
template<typename A >
bool RouteRedistributor< A >::withdraw_batch ( ) [private]

Periodic timer callback for withdrawing a batch of routes.

The timer is triggered by withdraw_routes().

template<typename A >
void RouteRedistributor< A >::withdraw_routes ( )

Withdraw routes.

Triggers a walking of associated routes and their expiration from the RIP route database.

template<typename A >
bool RouteRedistributor< A >::withdrawing_routes ( ) const
Returns:
true if actively withdrawing routes, false otherwise.

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