class RouteEntry

Base class for RIB routing table entries. More...

Contains pure virtuals
Definition#include <route.hh>
Inherited byIPRouteEntry, ResolvedIPRouteEntry
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Members


Detailed Description

This is the base class from which RIB routing table entries are derived. It's not useful by itself.

 RouteEntry (Vif *vif, NextHop *nh, const Protocol& proto, uint16_t metric)

RouteEntry

Constructor for a route entry.

Parameters:
vifthe Virtual Interface on which packets matching this routing table entry should be forwarded.
nhthe NextHop router to which packets matching this entry should be forwarded.
protothe routing protocol that originated this route.
metricthe routing protocol metric for this route.

 ~RouteEntry ()

~RouteEntry

[virtual]

Destructor

Vifvif ()

vif

[const]

Get the VIF

Returns: the Virtual Interface on which packets matching this routing table entry should be forwarded.

inline NextHopnexthop ()

nexthop

[const]

Get the NextHop

Returns: the NextHop router to which packets matching this entry should be forwarded.

void  set_nexthop (NextHop *nh)

set_nexthop

Set the NextHop

Parameters:
nhthe 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

void  set_admin_distance (uint16_t ad)

set_admin_distance

Set the Administrative Distance

Parameters:
adthe administrative distance to apply to this route.

const Protocol&  protocol ()

protocol

[const]

Get the routing protocol

Returns: the routing protocol that originated this route.

string  str ()

str

[const pure virtual]

Display the route for debugging purposes

void  set_metric (uint16_t metric)

set_metric

Set the routing protocol metric on this route

Parameters:
metricthe routing protocol metric to be set on this route.

uint32_t  global_metric ()

global_metric

[const]

Get a metric for the route that can be directly compared, even when the routes originate from different protocols. Lower metrics are prefered.

Returns: a metric where the most significant bits are the admin distance and the least significant bits are the routing protocol metric.

uint32_t  metric ()

metric

[const]

Get the routing protocol metric.

Returns: the routing protocol metric for this route

Vif * _vif

_vif

[protected]

NextHop * _nh

_nh

[protected]

uint16_t _admin_distance

_admin_distance

[protected]

uint16_t _metric

_metric

[protected]

const Protocol& _proto

_proto

[protected]


Generated by: pavlin on possum.icir.org on Thu Aug 28 12:52:19 2003, using kdoc 2.0a54+XORP.