|
|
This is the base class from which RIB routing table entries are derived. It's not useful by itself.
RouteEntry (Vif* vif, NextHop* nexthop, const Protocol& protocol,
uint16_t metric)
| RouteEntry |
Constructor for a route entry.
Parameters:
vif | the Virtual Interface on which packets matching this routing table entry should be forwarded. |
nexthop | the NextHop router to which packets matching this entry should be forwarded. |
protocol | the routing protocol that originated this route. |
metric | the routing protocol metric for this route. |
~RouteEntry ()
| ~RouteEntry |
[virtual]
inline Vif* vif ()
| vif |
[const]
Get the VIF.
Returns: the Virtual Interface on which packets matching this routing table entry should be forwarded.
inline NextHop* nexthop ()
| nexthop |
[const]
Get the NextHop router.
Returns: the NextHop router to which packets matching this entry should be forwarded.
inline void set_nexthop (NextHop* v)
| set_nexthop |
Set the NextHop router.
Parameters:
v | the NextHop router to be set on this route. |
inline uint16_t admin_distance ()
| admin_distance |
[const]
Get the Administrative Distance.
Returns: the Administrative Distance associated with this route. Admin Distance is a parameter typically assigned on a per-routing-protocol basis. When two routes for the same subnet come from different routing protocols, the one with the lower admin distance is prefered.
inline void set_admin_distance (uint16_t ad)
| set_admin_distance |
Set the Administrative Distance.
Parameters:
ad | the administrative distance to apply to this route. |
inline const Protocol& protocol ()
| protocol |
[const]
Get the routing protocol.
Returns: the routing protocol that originated this route.
See also: Protocol.
string str ()
| str |
[const pure virtual]
Display the route for debugging purposes.
inline void set_metric (uint16_t metric)
| set_metric |
Set the routing protocol metric on this route.
Parameters:
metric | the routing protocol metric to be set on this route. |
inline uint32_t metric ()
| metric |
[const]
Get the routing protocol metric.
Returns: the routing protocol metric for this route.
Vif* _vif | _vif |
[protected]
NextHop* _nexthop | _nexthop |
[protected]
const Protocol& _protocol | _protocol |
[protected]
uint16_t _admin_distance | _admin_distance |
[protected]
uint16_t _metric | _metric |
[protected]