class DeletionTable

RouteTable that performs background deletion of routes when a routing protocol goes down leaving routes in the RIB. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

Its template class, A, must be either the IPv4 class of the IPv6 class.

 DeletionTable (const string& tablename, RouteTable<A>* parent, Trie<A, const IPRouteEntry<A>* >* ip_route_trie, EventLoop& eventloop)

DeletionTable

DeletionTable constructor.

Parameters:

tablenameused for debugging.
parentUpstream routing table (usually an origin table).
ip_route_triethe entire route trie from the OriginTable that contains routes we're going to delete (as a background task).
 ~DeletionTable ()

~DeletionTable

DeletionTable destructor.

int  add_route (const IPRouteEntry<A>& route, RouteTable<A>* caller)

add_route

Add a route. If the route was stored in the DeletionTable, we'll remove it and propagate the delete and add downstream.

Parameters:

routethe route entry to be added.
callerthe caller route table.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from RouteTable.

int  delete_route (const IPRouteEntry<A>* route, RouteTable<A>* caller)

delete_route

Delete a route. This route MUST NOT be in the DeletionTable trie.

Parameters:

routethe route entry to be deleted.
callerthe caller route table.

Returns: XORP_OK on success, otherwise XORP_ERROR.

Reimplemented from RouteTable.

void  delete_all_routes ()

delete_all_routes

Delete all the routes that are in this DeletionTable. 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 DeletionTable or the upstream tables.

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 DeletionTable or the upstream tables 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 union of the DeletionTable and the upstream tables 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.

void  background_deletion_pass ()

background_deletion_pass

Delete a route, and reschedule background_deletion_pass again on a zero-second timer until all the routes have been deleted

void  unplumb_self ()

unplumb_self

Remove ourself from the plumbing and delete ourself.

TableType  type ()

type

[const]

Returns: the table type (TableType).

Reimplemented from RouteTable.

void  replumb (RouteTable<A>* old_parent, RouteTable<A>* new_parent)

replumb

Change the parent of this route table.

Reimplemented from RouteTable.

string  str ()

str

[const]

Render the DeletionTable as a string for debugging purposes.

Reimplemented from RouteTable.

RouteTable<A>*  parent ()

parent

Reimplemented from RouteTable.


Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:09 2009, using kdoc 2.0a54+XORP.