|
|
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.
typedef multimap<const IPRouteEntry<A>*, ResolvedIPRouteEntry<A> *> RouteBackLink | RouteBackLink |
ResolvedIPRouteEntry (const IPNet<A> &net, Vif *vif, NextHop *nh,
Protocol *proto, uint16_t metric,
const IPRouteEntry<A>* igp_parent,
const IPRouteEntry<A>* egp_parent)
| ResolvedIPRouteEntry |
Constructor for IPRouteEntry
Parameters:
net | the Subnet (address and mask) of the routing table entry. |
vif | the Virtual Interface on which packets matching this routing table entry should be forwarded. |
nh | the NextHop router to which packets matching this entry should be forwarded. This should be a local nexthop. |
proto | the routing protocol that originated this route. |
metric | the routing protocol metric for this route. |
igp_parent | the route entry used to resolve the non-local nexthop in the egp_parent into a local nexthop. |
egp_parent | the orginal route entry with a non-local nexthop. |
const IPRouteEntry<A> * igp_parent ()
| igp_parent |
[const]
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.
const IPRouteEntry<A> * egp_parent ()
| egp_parent |
[const]
Get the EGP parent
Returns: the EGP parent, which is the original route entry that had a non-local nexthop
void set_backlink (RouteBackLink::iterator backlink)
| set_backlink |
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:
backlink | the ExtIntTable multimap iterator for this route. |
RouteBackLink::iterator backlink ()
| backlink |
[const]
Get the backlink.
Returns: the backlink iterator.
See also: set_backlink
Generated by: pavlin on possum.icir.org on Wed Dec 11 16:51:00 2002, using kdoc 2.0a54+XORP. |