xorp

Redistributor< A > Class Template Reference

Controller class that takes routes from RedistTable and passes them on via RedistOutput. More...

#include <rt_tab_redist.hh>

Inheritance diagram for Redistributor< A >:
NONCOPYABLE

List of all members.

Classes

class  OutputEventInterface
class  RedistEventInterface

Public Member Functions

 Redistributor (EventLoop &e, const string &name)
const string & name () const
void set_redist_table (RedistTable< A > *rt)
void set_output (RedistOutput< A > *output)
 Bind RedistOutput to Redistributor instance.
void set_policy (RedistPolicy< A > *policy)
 Bind policy object to Redistributor instance.
bool policy_accepts (const IPRouteEntry< A > &ipr) const
 Determine if policy accepts updates to route.
RedistEventInterfaceredist_event ()
 Method available to instances of RedistTable to announce events to the Redistributor instance.
OutputEventInterfaceoutput_event ()
 Method available to instances of RedistOutput to announce transport events to the Redistributor instance.
bool dumping () const
 Indicate dump status.

Private Member Functions

void start_dump ()
 Start initial route dump when a RedistTable is associated with instance through set_redist_table().
void finish_dump ()
void schedule_dump_timer ()
void unschedule_dump_timer ()
void dump_a_route ()
const IPNet< A > & last_dumped_net () const
RedistTable< A > * redist_table ()
RedistOutput< A > * output ()
template<>
const IPv4Net NO_LAST_NET (IPv4::ALL_ONES(), IPv4::ADDR_BITLEN)
template<>
const IPv6Net NO_LAST_NET (IPv6::ALL_ONES(), IPv6::ADDR_BITLEN)

Private Attributes

EventLoop_e
string _name
RedistTable< A > * _table
RedistOutput< A > * _output
RedistPolicy< A > * _policy
RedistEventInterface _rei
OutputEventInterface _oei
bool _dumping
bool _blocked
IPNet< A > _last_net
XorpTimer _dtimer

Static Private Attributes

static const IPNet< A > NO_LAST_NET

Friends

class RedistEventInterface
class OutputEventInterface

Detailed Description

template<typename A>
class Redistributor< A >

Controller class that takes routes from RedistTable and passes them on via RedistOutput.

Instances of this class are constructed when one routing protocol requests route distribution from another. Instances walk the routes available in the RedistTable route index, resolve them, and announce them via the RedistOutput. Future updates received from the RedistTable are propagated via the Redistributor instances associated with it.


Member Function Documentation

template<typename A>
bool Redistributor< A >::dumping ( ) const [inline]

Indicate dump status.

When Redistributor is first connected it dumps existing routes to it's RedistOutput.

Returns:
true if route dump is in process, false if route dump is either not started or finished.
template<typename A >
bool Redistributor< A >::policy_accepts ( const IPRouteEntry< A > &  ipr) const

Determine if policy accepts updates to route.

Returns:
true if associated property accepts update to route or if no policy is enforced, false otherwise.
template<typename A >
void Redistributor< A >::set_output ( RedistOutput< A > *  output)

Bind RedistOutput to Redistributor instance.

The output should be dynamically allocated with new. When a new redistributor output is set, the existing output is removed via delete. The RedistOutput is deleted by the Redistributor when the Redistributor is destructed.

template<typename A >
void Redistributor< A >::set_policy ( RedistPolicy< A > *  policy)

Bind policy object to Redistributor instance.

The policy should be dynamically allocated with new. When a new policy is set, the existing policy is removed via delete. The policy is deleted by the Redistributor when the Redistributor is destructed.


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