class DeletionTable

DeletionTable is a temporary BGPRouteTable used to delete routes when a peer goes down. More...

 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Detailed Description

When a peer goes down, all the routes stored in a RibIn need to be deleted. However, this can take some time, so it cannot occur in one atomic operation, so it must be done route-by-route as a background task. This is complicated by the fact that the peering may come back up while this background deletion is occuring, and new routes may appear. To handle the background deletion while keeping the RibIn simple, we simply create a new DeletionTable route table, plumb it in directly after the RibIn, and pass the RibIn's entire route trie to the DeletionTable. RibIn can now forget these routes ever existed, and DeletionTable can get on with the background deletion task, unplumbing and deleting itself when no routes remain.

Care must be taken to ensure that the downstream routing tables see consistent information. For example, if there is a route for subnet X in the DeletionTable that has not yet been deleted, and an add_route for X comes downstream from rthe RibIn, then this would need to be propagated downstream as a replace_route.

Note that if a peering flaps multiple times, multiple DeletionTables may be plumbed in, one after another, behind a RibInTable.

 DeletionTable (string tablename, Safi safi, BgpTrie<A>* route_table, const PeerHandler *peer, uint32_t genid, BGPRouteTable<A> *parent)


 ~DeletionTable ()


int  add_route (InternalMessage<A> &rtmsg, BGPRouteTable<A> *caller)


Reimplemented from BGPRouteTable.

int  replace_route (InternalMessage<A> &old_rtmsg, InternalMessage<A> &new_rtmsg, BGPRouteTable<A> *caller)


Reimplemented from BGPRouteTable.

int  delete_route (InternalMessage<A> &rtmsg, BGPRouteTable<A> *caller)


Reimplemented from BGPRouteTable.

int  route_dump (InternalMessage<A> &rtmsg, BGPRouteTable<A> *caller, const PeerHandler *dump_peer)


Reimplemented from BGPRouteTable.

int  push (BGPRouteTable<A> *caller)


Reimplemented from BGPRouteTable.

const SubnetRoute<A> * lookup_route (const IPNet<A> &net, uint32_t& genid, FPAListRef& pa_list)



Reimplemented from BGPRouteTable.

void  route_used (const SubnetRoute<A>* route, bool in_use)


Reimplemented from BGPRouteTable.

RouteTableType  type ()



Reimplemented from BGPRouteTable.

string  str ()



Reimplemented from BGPRouteTable.

void  output_state (bool , BGPRouteTable<A> *)


bool  get_next_message (BGPRouteTable<A> *)


Reimplemented from BGPRouteTable.

void  initiate_background_deletion ()


uint32_t  genid ()



Returns: the generation id.

string  dump_state ()



Reimplemented from CrashDumper.

Generated by: pavlin on on Wed Jan 7 19:11:04 2009, using kdoc 2.0a54+XORP.