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 |
RouteDB (EventLoop& e)
| RouteDB |
~RouteDB ()
| ~RouteDB |
bool update_route (const Net& net,
const Addr& nexthop,
uint32_t cost,
uint32_t tag,
RouteOrigin* origin)
| 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:
net | the network route being updated. |
nexthop | the corresponding nexthop address. |
cost | the corresponding metric value as received from the route originator. |
tag | the corresponding route tag. |
origin | the route originator proposing update. |
Returns: true if an update occurs, false otherwise.
void dump_routes (vector<ConstDBRouteEntry>& routes)
| dump_routes |
Flatten route entry collection into a Vector.
Parameters:
routes | vector where routes are to be appended. |
void 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 |
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]
friend class RouteWalker | RouteWalker |
[protected]