class DeletionTable

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

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

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>&, RouteTable<A> *)

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.

Returns: 0 on success, -1 otherwise

Reimplemented from RouteTable.

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

delete_route

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

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 A& addr)

lookup_route

[const]

Lookup a specific subnet to see if it is in this DeletionTable or the upstream tables.

/** 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:
netthe subnet to look up.
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.

int  type ()

type

[const]

Returns: ORIGIN_TABLE

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.


Generated by: pavlin on possum.icir.org on Thu Nov 6 23:47:07 2003, using kdoc 2.0a54+XORP.