xorp

RouteEntryOrigin< A > Class Template Reference

Base class for originators of RIP route entires. More...

#include <route_entry.hh>

Inheritance diagram for RouteEntryOrigin< A >:
NONCOPYABLE Peer< A > PeerRoutes< A > RedistRouteOrigin< A >

List of all members.

Classes

struct  RouteEntryStore

Public Types

typedef RouteEntry< A > Route
typedef IPNet< A > Net

Public Member Functions

 RouteEntryOrigin (bool is_rib_origin)
bool is_rib_origin () const
 Test if RIB is the originator.
bool associate (Route *r)
 Associate route with this RouteEntryOrigin.
bool dissociate (Route *r)
 Dissociate route from this RouteEntryOrigin.
Routefind_route (const Net &n) const
 Find route if RouteOrigin has a route for given network.
uint32_t route_count () const
void clear ()
 Clear/remove all routes associated with this RouteEntryOrigin.
void dump_routes (vector< const Route * > &routes) const
 Dump associated routes into a vector (debugging use only).
virtual uint32_t expiry_secs () const =0
 Retrieve number of seconds before routes associated with this RouteEntryOrigin should be marked as expired.
virtual uint32_t deletion_secs () const =0
 Retrieve number of seconds before route should be deleted after expiry.

Protected Attributes

struct RouteEntryStore_rtstore

Private Attributes

bool _is_rib_origin

Detailed Description

template<typename A>
class RouteEntryOrigin< A >

Base class for originators of RIP route entires.

This class is used for storing RIPv2 and RIPng route entries. It is a template class taking an address family type as a template argument. Only IPv4 and IPv6 types may be supplied.


Member Function Documentation

template<typename A >
bool RouteEntryOrigin< A >::associate ( Route r)

Associate route with this RouteEntryOrigin.

Parameters:
rroute to be stored.
Returns:
true on success, false if route is already associated.
template<typename A >
bool RouteEntryOrigin< A >::dissociate ( Route r)

Dissociate route from this RouteEntryOrigin.

Parameters:
rroute to be dissociated.
Returns:
true on success, false if route is not associated.
template<typename A>
virtual uint32_t RouteEntryOrigin< A >::expiry_secs ( ) const [pure virtual]

Retrieve number of seconds before routes associated with this RouteEntryOrigin should be marked as expired.

A return value of 0 indicates routes are of infinite duration, eg static routes.

Implemented in PeerRoutes< A >, Peer< A >, RedistRouteOrigin< A >, Peer< IPv4 >, PeerRoutes< IPv4 >, RedistRouteOrigin< IPv6 >, and RedistRouteOrigin< IPv4 >.

template<typename A >
RouteEntry< A > * RouteEntryOrigin< A >::find_route ( const Net n) const

Find route if RouteOrigin has a route for given network.

Parameters:
nnetwork.
Returns:
true if entry exists in store, false otherwise.
template<typename A>
bool RouteEntryOrigin< A >::is_rib_origin ( ) const [inline]

Test if RIB is the originator.

Returns:
true if RIB is the originator, otherwise false.
template<typename A >
uint32_t RouteEntryOrigin< A >::route_count ( ) const
Returns:
number of routes associated with this RouteEntryOrigin.

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