|
|
Base class for originators of RIP route entires.
This class is used for storing RIPv2 and RIPng route entries. It is a template class taking an address family type as a template argument. Only IPv4 and IPv6 types may be supplied.
typedef RouteEntry<A> Route | Route |
typedef IPNet<A> Net | Net |
RouteEntryOrigin (bool is_rib_origin)
| RouteEntryOrigin |
~RouteEntryOrigin ()
| ~RouteEntryOrigin |
[virtual]
bool is_rib_origin ()
| is_rib_origin |
[const]
Test if RIB is the originator.
Returns: true if RIB is the originator, otherwise false.
bool associate (Route* r)
| associate |
Associate route with this RouteEntryOrigin.
Parameters:
r | route to be stored. |
Returns: true on success, false if route is already associated.
bool dissociate (Route* r)
| dissociate |
Dissociate route from this RouteEntryOrigin.
Parameters:
r | route to be dissociated. |
Returns: true on success, false if route is not associated.
Route* find_route (const Net& n)
| find_route |
[const]
Find route if RouteOrigin has a route for given network.
Parameters:
n | network. |
Returns: true if entry exists in store, false otherwise.
uint32_t route_count ()
| route_count |
[const]
Returns: number of routes associated with this RouteEntryOrigin.
void clear ()
| clear |
Clear/remove all routes associated with this RouteEntryOrigin.
void dump_routes (vector<const Route*>& routes)
| dump_routes |
[const]
Dump associated routes into a vector (debugging use only).
uint32_t expiry_secs ()
| expiry_secs |
[const pure virtual]
Retrieve number of seconds before routes associated with this RouteEntryOrigin should be marked as expired. A return value of 0 indicates routes are of infinite duration, eg static routes.
uint32_t deletion_secs ()
| deletion_secs |
[const pure virtual]
Retrieve number of seconds before route should be deleted after expiry.
struct RouteEntryStore* _rtstore | _rtstore |
[protected]