xorp

ResolvedIPRouteEntry< A > Class Template Reference

Extended RouteEntry, used by ExtIntTable. More...

#include <route.hh>

Inheritance diagram for ResolvedIPRouteEntry< A >:
IPRouteEntry< A > RouteEntry< A > NONCOPYABLE

List of all members.

Public Types

typedef multimap< const
IPRouteEntry< A >
*, ResolvedIPRouteEntry< A > * > 
RouteBackLink

Public Member Functions

 ResolvedIPRouteEntry (const IPNet< A > &net, RibVif *vif, NextHop *nexthop, const Protocol &protocol, uint32_t metric, const IPRouteEntry< A > *igp_parent, const IPRouteEntry< A > *egp_parent)
 Constructor for IPRouteEntry.
const IPRouteEntry< A > * igp_parent () const
 Get the igp_parent.
const IPRouteEntry< A > * egp_parent () const
 Get the EGP parent.
void set_backlink (typename RouteBackLink::iterator v)
 Set the backlink.
RouteBackLink::iterator backlink () const
 Get the backlink.

Private Attributes

const IPRouteEntry< A > * _igp_parent
const IPRouteEntry< A > * _egp_parent
RouteBackLink::iterator _backlink

Detailed Description

template<class A>
class ResolvedIPRouteEntry< A >

Extended RouteEntry, used by ExtIntTable.

This class stored an extended routing table entry, for use in ExtIntTable. When a route with a non-local nexthop arrives, the ExtIntTable attempts to discover a local nexthop by finding the route that packets to the non-local nexthop would use. This entry is used to store the resulting route, with a local nexthop, and with links to the parent routes that were used to provide the information in this route entry.

This is a template class, where A is either a the IPv4 class or the IPv6 class.


Constructor & Destructor Documentation

template<class A>
ResolvedIPRouteEntry< A >::ResolvedIPRouteEntry ( const IPNet< A > &  net,
RibVif vif,
NextHop nexthop,
const Protocol protocol,
uint32_t  metric,
const IPRouteEntry< A > *  igp_parent,
const IPRouteEntry< A > *  egp_parent 
) [inline]

Constructor for IPRouteEntry.

Parameters:
netthe Subnet (address and mask) of the routing table entry.
vifthe Virtual Interface on which packets matching this routing table entry should be forwarded.
nexthopthe NextHop router to which packets matching this entry should be forwarded. This should be a local nexthop.
protocolthe routing protocol that originated this route.
metricthe routing protocol metric for this route.
igp_parentthe route entry used to resolve the non-local nexthop in the egp_parent into a local nexthop.
egp_parentthe orginal route entry with a non-local nexthop.

Member Function Documentation

template<typename A >
ResolvedIPRouteEntry< A >::RouteBackLink::iterator ResolvedIPRouteEntry< A >::backlink ( ) const [inline]

Get the backlink.

See also:
ResolvedIPRouteEntry<A>::set_backlink
Returns:
the backlink iterator.
template<class A>
const IPRouteEntry<A>* ResolvedIPRouteEntry< A >::egp_parent ( ) const [inline]

Get the EGP parent.

Returns:
the EGP parent, which is the original route entry that had a non-local nexthop.
template<class A>
const IPRouteEntry<A>* ResolvedIPRouteEntry< A >::igp_parent ( ) const [inline]

Get the igp_parent.

Returns:
the IGP parent route entry that was used to resolve the EGP parent route entry's non-local nexthop into a local nexthop.
template<typename A >
void ResolvedIPRouteEntry< A >::set_backlink ( typename RouteBackLink::iterator  v) [inline]

Set the backlink.

When a resolved route is created, the ExtIntTable will store a link to it in a multimap that is indexed by the IGP parent. This will allow all the routes affected by a change in the IGP parent to be found easily. However, if the EGP parent goes away, we need to remove the links from this multimap, and the backlink provides an iterator into the multimap that makes this operation very efficient.

Parameters:
backlinkthe ExtIntTable multimap iterator for this route.

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