class RouteEntry

RIP Route Entry Class. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Protected Methods

Protected Members


Detailed Description

RIP Route Entry Class.

This class is used for storing RIPv2 and RIPng route entries. It is a template class taking an address family type as a template argument. Only IPv4 and IPv6 types may be supplied.

typedef A Addr

Addr

typedef IPNet<A> Net

Net

typedef RouteEntryOrigin<A> Origin

Origin

 RouteEntry (const Net& n, const Addr& nh, uint16_t cost, Origin*& o, uint16_t tag)

RouteEntry

Constructor.

The constructor set the internal state according to the parameters and if the Origin is non-null makes the appropriate call to tell the Origin of it's existence.

 ~RouteEntry ()

~RouteEntry

Destructor.

Cleans up state associated with RouteEntry. If the Origin associated with the RouteEntry is not-null, the Origin is informed of the destruction.

inline const IPNet<A>&  net ()

net

[const]

Get network.

bool  set_nexthop (const A& nh)

set_nexthop

Set next hop.

Parameters:

nhthe new nexthop to be associated with Route Entry.

Returns: true if the stored nexthop changed, false otherwise.

inline const A&  nexthop ()

nexthop

[const]

Get next hop.

Returns: nexthop address associated with the route entry.

bool  set_cost (uint16_t cost)

set_cost

Set the cost metric.

Parameters:

costthe new cost to be associated with the Route Entry.

Returns: true if stored cost changed, false otherwise.

uint16_t  cost ()

cost

[const]

Get the cost metric.

Returns: the cost associated with the route entry.

bool  set_origin (Origin* origin)

set_origin

Set the origin. If the origin is different from the stored origin, the RouteEntry dissociates itself from the current origin and informs the new origin of it's existence.

Parameters:

originthe new origin to be associated with the route entry.

Returns: true if the stored origin changed, false otherwise.

inline const Origin*  origin ()

origin

[const]

Get the origin.

Returns: a pointer to the origin associated with the route entry.

inline Origin*  origin ()

origin

Get the origin.

Returns: a pointer to the origin associated with the route entry.

bool  set_tag (uint16_t tag)

set_tag

Set the tag value.

Parameters:

tagthe tag value to be associated with the route entry.

Returns: true if the stored tag changed, false otherwise.

inline uint16_t  tag ()

tag

[const]

Get the tag.

Returns: tag value associated with the route entry.

inline void  set_timer (const XorpTimer& t)

set_timer

Set a Timer Event associated with this route.

inline const XorpTimer&  timer ()

timer

[const]

Get Timer associated with route.

 RouteEntry (const RouteEntry&)

RouteEntry

[protected]

RouteEntry&  operator= (const RouteEntry&)

operator=

[protected]

inline void  dissociate ()

dissociate

[protected]

inline void  associate (Origin* o)

associate

[protected]

Net _net

_net

[protected]

Addr _nh

_nh

[protected]

uint16_t _cost

_cost

[protected]

Origin* _origin

_origin

[protected]

uint16_t _tag

_tag

[protected]

uint16_t _ref_cnt

_ref_cnt

[protected]

XorpTimer _timer

_timer

[protected]


Generated by: pavlin on possum.icir.org on Thu Jul 8 23:48:39 2004, using kdoc $.