|
xorp
|
Extended RouteEntry, used by ExtIntTable. More...
#include <route.hh>
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 |
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.
| 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.
| 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. |
| nexthop | the NextHop router to which packets matching this entry should be forwarded. This should be a local nexthop. |
| protocol | 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. |
| ResolvedIPRouteEntry< A >::RouteBackLink::iterator ResolvedIPRouteEntry< A >::backlink | ( | ) | const [inline] |
| const IPRouteEntry<A>* ResolvedIPRouteEntry< A >::egp_parent | ( | ) | const [inline] |
| const IPRouteEntry<A>* ResolvedIPRouteEntry< A >::igp_parent | ( | ) | const [inline] |
| 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.
| backlink | the ExtIntTable multimap iterator for this route. |