xorp

PolicyRedistTable< A > Class Template Reference

This table redistributes routes to protocols according to policytags. More...

#include <rt_tab_pol_redist.hh>

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

List of all members.

Public Member Functions

 PolicyRedistTable (RouteTable< A > *parent, XrlRouter &rtr, PolicyRedistMap &, bool multicast)
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
void xrl_cb (const XrlError &, string)
void replace_policytags (const IPRouteEntry< A > &route, const PolicyTags &prevtags, RouteTable< A > *caller)
 If policy-tags of a route changed, this table will need to figure out which protocol should stop advertising a route, and which protocol should continue or start.

Static Public Attributes

static const string table_name = "policy-redist-table"

Private Types

typedef set< string > Set

Private Member Functions

void add_redist (const IPRouteEntry< A > &route, const Set &protos)
 Start a redistribution of a route.
void del_redist (const IPRouteEntry< A > &route, const Set &protos)
 End a route redistribution.
void add_redist (const IPRouteEntry< A > &route, const string &proto)
 Start a route redistribution.
void del_redist (const IPRouteEntry< A > &route, const string &proto)
 End a route redistribution.
template<>
void add_redist (const IPRouteEntry< IPv6 > &route, const string &proto)
template<>
void del_redist (const IPRouteEntry< IPv6 > &route, const string &proto)

Private Attributes

RouteTable< A > * _parent
XrlRouter_xrl_router
EventLoop_eventloop
PolicyRedistMap_redist_map
XrlPolicyRedist4V0p1Client _redist4_client
XrlPolicyRedist6V0p1Client _redist6_client
bool _multicast

Detailed Description

template<class A>
class PolicyRedistTable< A >

This table redistributes routes to protocols according to policytags.

Based on the policy-tags in a route, this table will request a protocol to start or end a redistribution of a route, depending whether the route is being added or deleted.


Member Function Documentation

template<class A>
void PolicyRedistTable< A >::add_redist ( const IPRouteEntry< A > &  route,
const Set &  protos 
) [private]

Start a redistribution of a route.

Parameters:
routeroute to redistribute.
protosthe set of protocols which should do the redistribution.
template<class A>
void PolicyRedistTable< A >::add_redist ( const IPRouteEntry< A > &  route,
const string &  proto 
) [private]

Start a route redistribution.

Parameters:
routeroute to be redistributed.
protoprotocol which should advertise route.
template<class A>
void PolicyRedistTable< A >::del_redist ( const IPRouteEntry< A > &  route,
const Set &  protos 
) [private]

End a route redistribution.

Parameters:
routethe route which should no longer be redistributed.
protosthe protocols which should stop advertising the route.
template<class A>
void PolicyRedistTable< A >::del_redist ( const IPRouteEntry< A > &  route,
const string &  proto 
) [private]

End a route redistribution.

Parameters:
routeroute which should no longer be redistributed.
protoprotocol which should stop advertising the route.
template<class A>
void PolicyRedistTable< A >::replace_policytags ( const IPRouteEntry< A > &  route,
const PolicyTags prevtags,
RouteTable< A > *  caller 
) [virtual]

If policy-tags of a route changed, this table will need to figure out which protocol should stop advertising a route, and which protocol should continue or start.

Parameters:
routethe route with its new policy tags.
prevtagsthe previous policytags of the route.
callerthe table which invoked this method.

Reimplemented from RouteTable< A >.


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