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, const string& ifname, const string& vifname, 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 (const Net& n, const Addr& nh, const string& ifname, const string& vifname, uint16_t cost, Origin*& o, uint16_t tag, const PolicyTags& policytags)

RouteEntry

 ~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.

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.

const A&  nexthop ()

nexthop

[const]

Get next hop.

Returns: nexthop address associated with the route entry.

const string&  ifname ()

ifname

[const]

Get the outgoing interface name.

Returns: the outgoing interface name.

bool  set_ifname (const string& ifname)

set_ifname

Set the outgoing interface name.

Parameters:

ifnamethe outgoing interface name.

Returns: true if the stored interface name changed, false otherwise.

const string&  vifname ()

vifname

[const]

Get the outgoing vif name.

Returns: the outgoing vif name.

bool  set_vifname (const string& vifname)

set_vifname

Set the outgoing vif name.

Parameters:

vifnamethe outgoing vif name.

Returns: true if the stored vif name changed, false otherwise.

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.

const Origin*  origin ()

origin

[const]

Get the origin.

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

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.

uint16_t  tag ()

tag

[const]

Get the tag.

Returns: tag value associated with the route entry.

void  set_timer (const XorpTimer& t)

set_timer

Set a Timer Event associated with this route.

const XorpTimer&  timer ()

timer

[const]

Get Timer associated with route.

const PolicyTags&  policytags ()

policytags

[const]

Returns: policy-tags associated with route.

PolicyTags&  policytags ()

policytags

bool  set_policytags (const PolicyTags& tags)

set_policytags

Replace policy-tags of route

Parameters:

tagsnew policy-tags.

Returns: true if tags were modified.

bool  filtered ()

filtered

[const]

Returns: true if route was rejected by policy filter.

void  set_filtered (bool v)

set_filtered

Set if route is accepted or rejected.

Parameters:

vtrue if route is filtered
 RouteEntry (const RouteEntry&)

RouteEntry

[protected]

RouteEntry&  operator= (const RouteEntry&)

operator=

[protected]

void  dissociate ()

dissociate

[protected]

void  associate (Origin* o)

associate

[protected]

Net _net

_net

[protected]

Addr _nh

_nh

[protected]

string _ifname

_ifname

[protected]

string _vifname

_vifname

[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]

PolicyTags _policytags

_policytags

[protected]

bool _filtered

_filtered

[protected]


Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:10 2009, using kdoc 2.0a54+XORP.