xorp

OutputBase< A > Class Template Reference

Base class for RIP output processing components. More...

#include <output.hh>

Inheritance diagram for OutputBase< A >:
NONCOPYABLE OutputTable< A > OutputUpdates< A >

List of all members.

Public Types

typedef A Addr
typedef IPNet< A > Net

Public Member Functions

 OutputBase (EventLoop &e, Port< A > &port, PacketQueue< A > &pkt_queue, const A &ip_addr, uint16_t ip_port)
const A & ip_addr () const
 Accessor for destination IP address applied to output packets.
uint16_t ip_port () const
 Accessor for destination IP port applied to output packets.
bool running () const
void start ()
 Start packet train if sufficient data is available.
void stop ()
 Stop packet train.
void packets_sent () const
 Get number of packets placed on packet queue for output.

Protected Member Functions

uint32_t interpacket_gap_ms () const
 Accessor for the inter-packet gap the output process should when generating packet trains.
virtual void start_output_processing ()=0
 Derived classes should implement this to start output processing.
virtual void stop_output_processing ()=0
 Derived classes should implement this to stop output processing.
virtual void output_packet ()=0
 Output packet if suitable data is available, and place it in the PacketQueue associated with this instance.
void incr_packets_sent ()
bool do_filtering (RouteEntry< A > *r)
 Policy filters the route.

Protected Attributes

EventLoop_e
Port< A > & _port
PacketQueue< A > & _pkt_queue
const A _ip_addr
const uint16_t _ip_port
XorpTimer _op_timer
uint32_t _pkts_out
PolicyFilters_policy_filters

Detailed Description

template<typename A>
class OutputBase< A >

Base class for RIP output processing components.

RIP output processing components generate periodic trains of RIP response packets. This class and it's children are intended to generate the packet trains from RIP output processing. Each packet within the train is temporally separated from it's neighbouring packets. Timers elsewhere schedule the start of each packet train.


Member Function Documentation

template<typename A >
bool OutputBase< A >::do_filtering ( RouteEntry< A > *  r) [protected]

Policy filters the route.

Parameters:
rroute to filter.
Returns:
true if the route was accepted, false otherwise.
template<typename A >
virtual void OutputBase< A >::output_packet ( ) [protected, pure virtual]

Output packet if suitable data is available, and place it in the PacketQueue associated with this instance.

Should data still be available after packet is generated then implementations of this method should reschedule a call to output_packet after interpacket_gap_ms milliseconds.

Implemented in OutputTable< A >, and OutputUpdates< A >.

template<typename A >
bool OutputBase< A >::running ( ) const [inline]
Returns:
true if output process is generating packets.
template<typename A >
void OutputBase< A >::start ( ) [inline]

Start packet train if sufficient data is available.

This instance will remain in "running" so long as data is available and will continue to generate packets until the data is exhausted.

template<typename A >
virtual void OutputBase< A >::start_output_processing ( ) [protected, pure virtual]

Derived classes should implement this to start output processing.

It is invoked when start() is called.

Implemented in OutputTable< A >, and OutputUpdates< A >.

template<typename A >
virtual void OutputBase< A >::stop_output_processing ( ) [protected, pure virtual]

Derived classes should implement this to stop output processing.

It is invoked when stop() is called.

Implemented in OutputTable< A >, and OutputUpdates< A >.


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