Public Member Functions |
|
| RouteManager (Olsr &olsr, EventLoop &eventloop, FaceManager *fm, Neighborhood *nh, TopologyManager *tm, ExternalRoutes *er) |
|
void | schedule_route_update () |
| | Schedule a recalculation of the entire routing table.
|
|
void | schedule_external_route_update () |
| | Schedule a recalculation of external routes.
|
| bool | add_onehop_link (const LogicalLink *l, const Neighbor *n) |
| | Add a link to a one-hop neighbor to the SPT.
|
| bool | add_twohop_link (const Neighbor *n, const TwoHopLink *l2, const TwoHopNeighbor *n2) |
| | Add a two-hop link and neighbor to the SPT.
|
| bool | add_tc_link (const TopologyEntry *tc) |
| | Add a TC-derived link and neighbor to the SPT.
|
| bool | add_hna_route (const IPv4Net &dest, const IPv4 &lasthop, const uint16_t distance) |
| | Add an external route, possibly HNA derived, to the current trie.
|
|
void | push_routes () |
| | Backend method to: push all the routes through the policy filters whenever they are updated.
|
Protected Member Functions |
| void | recompute_all_routes () |
| | Recompute the OLSR domain portion of the routing table.
|
|
Vertex | make_origin_vertex () |
| void | begin () |
| | Begin the route computation transaction.
|
| void | end () |
| | End the route computation transaction.
|
| bool | add_entry (const IPv4Net &net, const RouteEntry &rt) |
| | Internal method to: Add a route entry to the current internal trie.
|
| bool | delete_entry (const IPv4Net &net, const RouteEntry &rt) |
| | Internal method to: Delete a route entry from the current internal trie.
|
| bool | replace_entry (const IPv4Net &net, const RouteEntry &rt, const RouteEntry &previous_rt) |
| | Internal method to: Replace a route entry in the current internal trie.
|
| bool | add_route (IPv4Net net, IPv4 nexthop, uint32_t metric, RouteEntry &rt) |
| | Backend method to: add a route to the RIB with policy filtering.
|
| bool | delete_route (const IPv4Net &net, const RouteEntry &rt) |
| | Backend method to: withdraw a route from the RIB.
|
| bool | replace_route (IPv4Net net, IPv4 nexthop, uint32_t metric, RouteEntry &rt, RouteEntry &previous_rt) |
| | Backend method to: replace a route that has been sent to the RIB.
|
| bool | do_filtering (IPv4Net &net, IPv4 &nexthop, uint32_t &metric, RouteEntry &rt, PolicyTags &policytags) |
| | Backend method to: perform policy filtering when a route may be plumbed to the RIB.
|
Private Attributes |
|
Olsr & | _olsr |
|
EventLoop & | _eventloop |
|
FaceManager * | _fm |
|
Neighborhood * | _nh |
|
TopologyManager * | _tm |
|
ExternalRoutes * | _er |
|
Spt< Vertex > | _spt |
|
Vertex | _origin |
|
bool | _in_transaction |
|
XorpTask | _route_update_task |
|
Trie< IPv4, RouteEntry > * | _current |
|
Trie< IPv4, RouteEntry > * | _previous |
Routing table manager.
Performs incremental and/or deferred update of the OLSR routing table for the domain which this routing process interacts with.
Whilst incremental updates are possible, the code does not currently do this because the incremental shortest-path-tree code does not yet support incremental updates. The interface is however written with this in mind as it may turn out to offer faster convergence for link-state MANET protocols like OLSR.
Classes which produce artifacts for RouteManager to turn into routes therefore call schedule_route_update() whenever their state changes. RouteManager will call them back. We do not use polymorphism for this as the relationships do not significantly change.