List of all members.
Public Member Functions |
|
| NextHopResolver (XrlStdRouter *xrl_router, EventLoop &eventloop, BGPMain &bgp) |
| void | add_decision (DecisionTable< A > *decision) |
| | Add decision.
|
|
bool | register_ribname (const string &r) |
| | Set the rib's name, allows for having a dummy rib or not having a RIB at all.
|
| virtual bool | register_nexthop (A nexthop, IPNet< A > net_from_route, NhLookupTable< A > *requester) |
| | Register interest in this nexthop.
|
| virtual void | deregister_nexthop (A nexthop, IPNet< A > net_from_route, NhLookupTable< A > *requester) |
| | De-Register interest in this nexthop.
|
| virtual bool | lookup (const A nexthop, bool &resolvable, uint32_t &metric) const |
| | Lookup next hop.
|
|
bool | rib_client_route_info_changed (const A &addr, const uint32_t &prefix_len, const A &nexthop, const uint32_t &metric) |
| | Call from the RIB to notify us that a metric has changed.
|
|
bool | rib_client_route_info_invalid (const A &addr, const uint32_t &prefix_len) |
| | Call from the RIB to notify us that any registrations with this address and prefix_len are now invalid.
|
| void | next_hop_changed (A nexthop) |
| | Next hop changed.
|
| void | next_hop_changed (A nexthop, bool old_resolves, uint32_t old_metric) |
| | Next hop changed.
|
| NextHopRibRequest< A > * | get_next_hop_rib_request () |
| | Get NextHopRibRequest pointer.
|
|
EventLoop & | eventloop () |
| | Get a reference to the main timer list.
|
Protected Attributes |
|
list< DecisionTable< A > * > | _decision |
Private Attributes |
|
string | _ribname |
|
XrlStdRouter * | _xrl_router |
|
EventLoop & | _eventloop |
|
BGPMain & | _bgp |
|
NextHopCache< A > | _next_hop_cache |
|
NextHopRibRequest< A > | _next_hop_rib_request |
template<class A>
class NextHopResolver< A >
Member Function Documentation
Add decision.
Pass a pointer to the decision table into the next hop resolver. This pointer is used to notify the decision table when a next hop metric changes.
- Parameters:
-
| decision | Pointer to the decision table. |
De-Register interest in this nexthop.
- Parameters:
-
| nexthop | Nexthop. |
| net_from_route | The net that is associated with this nexthop in the NextHopLookupTable. Treated as an opaque id. |
| requester | Original requester, not used. |
- Returns:
- True if the registration succeed.
Reimplemented in DummyResolver< A >.
template<class A>
| bool NextHopResolver< A >::lookup |
( |
const A |
nexthop, |
|
|
bool & |
resolvable, |
|
|
uint32_t & |
metric |
|
) |
| const [virtual] |
Lookup next hop.
If a "register_nexthop" request has been made and callback has taken place via the "requester" pointer, then the lookup is guaranteed to work.
- Parameters:
-
| nexthop | Next hop. |
| resolvable | Is this route resolvable. |
| metric | If this route is resolvable the metric of this route. |
- Returns:
- True if this next hop is found.
Reimplemented in DummyNextHopResolver< A >.
Next hop changed.
Whenever a next hop changes this method should be called and the change will be rippled up to the decision process.
- Parameters:
-
| nexthop | The next hop that has changed. |
template<class A>
| void NextHopResolver< A >::next_hop_changed |
( |
A |
nexthop, |
|
|
bool |
old_resolves, |
|
|
uint32_t |
old_metric |
|
) |
| |
Next hop changed.
Whenever a next hop changes this method should be called and the change will be rippled up to the decision process. However if a change occurs but the metrics don't change don't bother to ripple up the change there is no point.
- Parameters:
-
| nexthop | The next hop that has changed. |
| old_resolves | The old resolve value. |
| old_metric | The old metric value. |
Register interest in this nexthop.
- Parameters:
-
| nexthop | Nexthop. |
| net_from_route | The net that is associated with this nexthop in the NextHopLookupTable. Treated as an opaque id. |
| requester | Once the registration with the RIB suceeds the requester is called back. |
- Returns:
- True if the registration succeed.
Reimplemented in DummyResolver< A >.
The documentation for this class was generated from the following files:
- /home/greearb/git/xorp.ct.github/xorp/bgp/next_hop_resolver.hh
- /home/greearb/git/xorp.ct.github/xorp/bgp/next_hop_resolver.cc