RoutingTable (Ospf<A> &ospf)
| RoutingTable |
void begin (OspfTypes::AreaID area)
| begin |
Before [add|replace|delete]_entry can be called, this method must be called to start the transaction.
bool add_entry (OspfTypes::AreaID area, IPNet<A> net,
const RouteEntry<A>& rt)
| add_entry |
bool replace_entry (OspfTypes::AreaID area, IPNet<A> net,
const RouteEntry<A>& rt)
| replace_entry |
bool delete_entry (OspfTypes::AreaID area, IPNet<A> net)
| delete_entry |
Delete an entry from the current table.
void end ()
| end |
For the [add|replace|delete]_entry calls to take effect this method must be called.
bool lookup_entry (A router, RouteEntry<A>& rt)
| lookup_entry |
Lookup address A in the routing table exact match.
Parameters:
router | address being looked up. |
rt | if a match is found fill this in. |
Returns: true if an entry is found.
bool lookup_entry (OspfTypes::AreaID area, A router, RouteEntry<A>& rt)
| lookup_entry |
Lookup address A in the routing table exact match in specified area.
Parameters:
area | area ID. |
router | address being looked up. |
rt | if a match is found fill this in. |
Returns: true if an entry is found.
bool lookup_entry (IPNet<A> net, RouteEntry<A>& rt)
| lookup_entry |
Lookup network in the routing table exact match.
Parameters:
network | address being looked up. |
rt | if a match is found fill this in. |
Returns: true if an entry is found.
bool lookup_entry (OspfTypes::AreaID area, IPNet<A> net, RouteEntry<A>& rt)
| lookup_entry |
Lookup network in the routing table exact match.
Parameters:
area | area ID. |
network | address being looked up. |
rt | if a match is found fill this in. |
Returns: true if an entry is found.
bool lookup_entry_by_advertising_router (OspfTypes::AreaID area,
uint32_t adv,
RouteEntry<A>& rt)
| lookup_entry_by_advertising_router |
Lookup advertising router in specific area.
Parameters:
area | area ID. |
adv | advertsing router |
rt | if a match is found fill this in. |
Returns: true if an entry is found.
bool longest_match_entry (A router, RouteEntry<A>& rt)
| longest_match_entry |
Lookup address A in the routing table longest match.
Parameters:
nexthop | address to lookup. |
rt | if a match is found fill this in. |
Returns: true if an entry is found.
void remove_area (OspfTypes::AreaID area)
| remove_area |
This call notifies the routing table that this area no longer exists, therefore all routes that came from this area should be removed. All other areas also need to be notified so that any summarisation information can be removed.
void push_routes ()
| push_routes |
Re-run the policy filters on all routes.
RoutingTable (Ospf<A> &ospf)
| RoutingTable |
void begin ()
| begin |
bool add_route (IPNet<A> net,
A nexthop,
uint32_t metric,
bool equal)
| add_route |
Add route
Parameters:
net | network |
metric | to network |
equal | true if this in another route to the same destination. |
bool replace_route (IPNet<A> net,
A nexthop,
uint32_t metric,
bool equal)
| replace_route |
Replace route
Parameters:
net | network |
metric | to network |
equal | true if this in another route to the same destination. |
bool delete_route (IPNet<A> net)
| delete_route |
void end ()
| end |