class RouteDB

Class that manages routes. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Protected Methods

Protected Members


Detailed Description

The RouteDB class holds routes and manages their updates. Successful updates are placed in the update queue contained within the RouteDB instance. The UpdateQueue is used for generating triggered update messages.

The RouteWalker class provides a way to walk the routes held.

typedef A Addr

Addr

typedef IPNet<A> Net

Net

typedef RouteEntry<A> Route

Route

typedef RouteEntryOrigin<A> RouteOrigin

RouteOrigin

typedef RouteEntryRef<A> DBRouteEntry

DBRouteEntry

typedef RouteEntryRef<A> ConstDBRouteEntry

ConstDBRouteEntry

typedef PacketRouteEntry<A> PacketizedRoute

PacketizedRoute

typedef map<Net, DBRouteEntry, NetCmp<A> > RouteContainer

RouteContainer

typedef map<Net, Route*, NetCmp<A> > RouteContainerNoRef

RouteContainerNoRef

 RouteDB (EventLoop& e, PolicyFilters& pfs)

RouteDB

 ~RouteDB ()

~RouteDB

bool  insert_peer (Peer<A>* peer)

insert_peer

Insert a peer to the database.

Parameters:

peerthe peer to insert.

Returns: true if this is a new peer, otherwise false.

bool  erase_peer (Peer<A>* peer)

erase_peer

Erase a peer from the database.

Parameters:

peerthe peer to erase.

Returns: true if this is an existing peer that was erased, otherwise false.

bool  update_route (const Net& net, const Addr& nexthop, uint32_t cost, uint32_t tag, RouteOrigin* origin, const PolicyTags& policytags, bool is_policy_push)

update_route

Update Route Entry in database for specified route.

If the route does not exist or the values provided differ from the existing route, then an update is placed in the update queue.

Parameters:

netthe network route being updated.
nexthopthe corresponding nexthop address.
costthe corresponding metric value as received from the route originator.
tagthe corresponding route tag.
originthe route originator proposing update.
policytagsthe policytags of this route.
is_policy_pushif true, this route update is triggered by policy reconfiguration.

Returns: true if an update occurs, false otherwise.

void  add_rib_route (const Net& net, const Addr& nexthop, uint32_t cost, uint32_t tag, RouteOrigin* origin, const PolicyTags& policytags)

add_rib_route

A copy of RIB routes need to be kept, as they are not advertised periodically. If a RIB route gets replaced with a better route from another peer, it will be lost. By storing RIB routes, it is possible to re-advertise RIB routes which have lost, but are now optimal.

Parameters:

netnetwork of the route being added.
nexthopthe corresponding nexthop address.
costthe corresponding metric value.
thecorresponding route tag.
originthe route originator [RIB in this case].
policytagsthe policytags of this route.
void  delete_rib_route (const Net& net)

delete_rib_route

Permanently delete a RIB route. This occurs if redistribution of this route ceased.

Parameters:

netnetwork of the route being deleted.
void  dump_routes (vector<ConstDBRouteEntry>& routes)

dump_routes

Flatten route entry collection into a Vector.

Parameters:

routesvector where routes are to be appended.
void  flush_routes ()

flush_routes

Flush routes.

uint32_t  route_count ()

route_count

[const]

Returns: count of routes in database.

const Route*  find_route (const Net& n)

find_route

[const]

Returns: pointer to route entry if it exists, 0 otherwise.

UpdateQueue<A>&  update_queue ()

update_queue

Accessor.

Returns: reference to UpdateQueue.

const UpdateQueue<A>&  update_queue ()

update_queue

[const]

Accessor.

Returns: const reference to UpdateQueue.

inline EventLoop&  eventloop ()

eventloop

void  push_routes ()

push_routes

Push routes through policy filters for re-filtering.

bool  do_filtering (Route* r)

do_filtering

Do policy filtering.

Parameters:

rroute to filter.

Returns: true if route was accepted, false otherwise.

 RouteDB (const RouteDB&)

RouteDB

[protected]

RouteDB&  operator= (const RouteDB&)

operator=

[protected]

void  expire_route (Route* r)

expire_route

[protected]

void  set_expiry_timer (Route* r)

set_expiry_timer

[protected]

void  delete_route (Route* r)

delete_route

[protected]

void  set_deletion_timer (Route* r)

set_deletion_timer

[protected]

RouteContainer&  routes ()

routes

[protected]

EventLoop& _eventloop

_eventloop

[protected]

RouteContainer _routes

_routes

[protected]

UpdateQueue<A>* _uq

_uq

[protected]

PolicyFilters& _policy_filters

_policy_filters

[protected]

set<Peer<A>* > _peers

_peers

[protected]

RouteContainerNoRef _rib_routes

_rib_routes

[protected]

RouteOrigin* _rib_origin

_rib_origin

[protected]

friend class RouteWalker

RouteWalker

[protected]


Generated by: pavlin on possum.icir.org on Wed Aug 2 15:36:43 2006, using kdoc $.