|
xorp
|
Base class for a routing table. More...
#include <rt_tab_base.hh>
Public Member Functions | |
| RouteTable (const string &name) | |
| virtual int | add_route (const IPRouteEntry< A > &route, RouteTable *caller)=0 |
| virtual int | delete_route (const IPRouteEntry< A > *route, RouteTable *caller)=0 |
| virtual const IPRouteEntry< A > * | lookup_route (const IPNet< A > &net) const =0 |
| virtual const IPRouteEntry< A > * | lookup_route (const A &addr) const =0 |
| virtual RouteRange< A > * | lookup_route_range (const A &addr) const =0 |
| virtual void | set_next_table (RouteTable *next_table) |
| virtual RouteTable * | parent () |
| virtual TableType | type () const =0 |
| virtual void | replumb (RouteTable *old_parent, RouteTable *new_parent)=0 |
| virtual string | str () const =0 |
| virtual void | flush () |
| const string & | tablename () const |
| RouteTable * | next_table () |
| const RouteTable * | next_table () const |
| virtual void | replace_policytags (const IPRouteEntry< A > &route, const PolicyTags &prevtags, RouteTable *caller) |
Protected Member Functions | |
| void | set_tablename (const string &s) |
Private Attributes | |
| string | _tablename |
| RouteTable * | _next_table |
Base class for a routing table.
This is the base class for a routing table. A RIB consists of a tree of RouteTables that take routes from routing protocols and merge them together so that routes that emerge from the last table are the best routes available, and have nexthop information that is for an immediate neighbor of this router. See the RIB design document for an overview of how RouteTable are plumbed together to form a RIB.
All RouteTables that form the RIB are derived from this base class.
RouteTables take routing changes in from one or more parents, and pass on those changes to the _next_table if the change is for the best of the alternative routes.
RouteTables take route lookup requests from their _next_table, and pass on those requests to their parents. If more than one parent has a response, only the best is returned as the answer.