class OriginTable

RouteTable that receives and stores raw routes sent by routing protocols. More...

Definition#include <rt_tab_origin.hh>
Template formOriginTable<class A>
InheritsRouteTable [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

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:
tablenametypically 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_distancethe default administrative distance for routes in this table
igptrue 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:
routethe 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:
netthe 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:
netthe 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:
addrthe 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:
addrthe 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  proto_type ()

proto_type

[const]

Returns: the routing protocol type (IGP or EGP)

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 Thu Aug 28 12:52:19 2003, using kdoc 2.0a54+XORP.