|
|
OriginTable is a RouteTable that accepts route_add requests from a single routing protocol, stores the route, and propagates it downstream. It also answers lookup_route and lookup_route_range requests from downstream using the routes it has stored.
Its template class, A, must be either the IPv4 class of the IPv6 class
OriginTable (const string& tablename, int admin_distance, int igp)
| OriginTable |
OriginTable constructor.
Parameters:
tablename | typically the name of the routing protcol that supplies routes to this origin table, or "connected" for the OriginTable that holds directly connected routes, or "static" for the OriginTable that holds locally configured static routes. |
admin_distance | the default administrative distance for routes in this table |
igp | true if the routing protocol is an IGP (defined for this purpose as one that always produces routes with an immediate neighbor as a nexthop). false if the routing protocol is an EGP (nexthop is not always an immediate neighbor) |
~OriginTable ()
| ~OriginTable |
OriginTable destructor.
int add_route (const IPRouteEntry<A>& route)
| add_route |
Add a route to the OriginTable. The route must not already be in the OriginTable.
Parameters:
route | the route entry to be added. |
Returns: 0 on success, -1 otherwise
Reimplemented from RouteTable.
int add_route (const IPRouteEntry<A>&, RouteTable<A>*)
| add_route |
Generic RouteTable method that is not used on OriginTable.
Reimplemented from RouteTable.
int delete_route (const IPNet<A>& net)
| delete_route |
Delete a route from the OriginTable.
Parameters:
net | the subnet of the route entry to be deleted. |
Returns: 0 on success, -1 otherwise
Reimplemented from RouteTable.
int delete_route (const IPRouteEntry<A>* , RouteTable<A>*)
| delete_route |
Generic RouteTable method that is not used on OriginTable.
Reimplemented from RouteTable.
void delete_all_routes ()
| delete_all_routes |
Delete all the routes that are in this OriginTable. The deletion is not propagated downstream, so this is only useful when shutting down the RIB
const IPRouteEntry<A>* lookup_route (const IPNet<A>& net)
| lookup_route |
[const]
Lookup a specific subnet to see if it is in this OriginTable.
Parameters:
net | the subnet to look up. |
Returns: a pointer to the route entry if it exists, NULL otherwise.
Reimplemented from RouteTable.
const IPRouteEntry<A>* lookup_route (const A& addr)
| lookup_route |
[const]
Lookup an IP address to get the most specific (longest prefix length) route in the OriginTable that matches this address.
Parameters:
addr | the IP address to look up. |
Returns: a pointer to the most specific route entry if any entry matches, NULL otherwise.
Reimplemented from RouteTable.
RouteRange<A>* lookup_route_range (const A& addr)
| lookup_route_range |
[const]
Lookup an IP addressto get the most specific (longest prefix length) route in the OriginTable that matches this address, along with the RouteRange information for this address and route.
Parameters:
addr | the IP address to look up. |
Returns: a pointer to a RouteRange class instance containing the relevant answer. It is up to the recipient of this pointer to free the associated memory.
See also: RouteRange
Reimplemented from RouteTable.
int admin_distance ()
| admin_distance |
[const]
Returns: the default administrative distance for this OriginTable
int igp ()
| igp |
[const]
Returns: true if the routing protocol associated with this table if an IGP, else false.
int type ()
| type |
[const]
Returns: ORIGIN_TABLE
Reimplemented from RouteTable.
void replumb (RouteTable<A>*, RouteTable<A>* )
| replumb |
Generic RouteTable method that is not used on OriginTable.
Reimplemented from RouteTable.
string str ()
| str |
[const]
Render the OriginTable as a string for debugging purposes
Reimplemented from RouteTable.
Generated by: pavlin on possum.icir.org on Wed Dec 11 16:51:00 2002, using kdoc 2.0a54+XORP. |