|
|
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:
tablename | used for debugging. |
parent | Upstream routing table (usually an origin table). |
ip_route_trie | the entire route trie from the OriginTable that contains routes we're going to delete (as a background task). |
~DeletionTable ()
| ~DeletionTable |
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:
route | the route entry to be added. |
caller | the 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:
route | the route entry to be deleted. |
caller | the 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:
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 DeletionTable or the upstream tables 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 union of the DeletionTable and the upstream tables 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.
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.