|
|
typedef A Addr | Addr |
typedef IPNet<A> Net | Net |
RouteRedistributor (RouteDB<A>& route_db,
const string& protocol,
uint16_t cost,
uint16_t tag)
| RouteRedistributor |
Constructor for RouteRedistributor
Parameters:
route_db | the route database to add and expire routes in. |
protocol | name of protocol redistributor handles. |
cost | cost to associated with redistributed routes. |
tag | tag to be associated with redistributed routes. |
~RouteRedistributor ()
| ~RouteRedistributor |
bool add_route (const Net& net, const Addr& nexthop,
const PolicyTags& policytags)
| add_route |
Add a route to be redistributed.
Parameters:
net | network described by route. |
nexthop | router capable of forwarding route. |
policytags | policy-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.
bool add_route (const Net& net,
const Addr& nexthop,
uint16_t cost,
uint16_t tag,
const PolicyTags& policytags)
| add_route |
Add a route to be redistributed with specific cost and tag values.
Parameters:
net | network described by route. |
nexthop | router capable of forwarding route. |
policytags | policy-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.
bool expire_route (const Net& net)
| expire_route |
Trigger route expiry.
Parameters:
network | described by route. |
Returns: true on success, false if route did not come from this RouteRedistributor instance.
const string& protocol ()
| protocol |
[const]
Accessor.
Returns: protocol name.
uint16_t tag ()
| tag |
[const]
Accessor.
Returns: tag routes are redistributed with.
uint16_t cost ()
| cost |
[const]
Accessor.
Returns: cost routes are redistributed with.
uint32_t route_count ()
| route_count |
[const]
Accessor.
Returns: number of routes
void withdraw_routes ()
| withdraw_routes |
Withdraw routes. Triggers a walking of associated routes and their expiration from the RIP route database.
bool withdrawing_routes ()
| withdrawing_routes |
[const]
Returns: true if actively withdrawing routes, false otherwise.
RouteDB<A>& _route_db | _route_db |
[protected]
string _protocol | _protocol |
[protected]
uint16_t _cost | _cost |
[protected]
uint16_t _tag | _tag |
[protected]
RedistRouteOrigin<A>* _rt_origin | _rt_origin |
[protected]
RouteWalker<A>* _wdrawer | _wdrawer |
[protected]
XorpTimer _wtimer | _wtimer |
[protected]