xorp

IPRouteEntry< A > Class Template Reference

Routing Table Entry. More...

#include <route.hh>

Inheritance diagram for IPRouteEntry< A >:
RouteEntry< A > NONCOPYABLE ResolvedIPRouteEntry< A >

List of all members.

Public Member Functions

 IPRouteEntry (const IPNet< A > &net, RibVif *vif, NextHop *nexthop, const Protocol &protocol, uint32_t metric)
 Constructor for IPRouteEntry.
 IPRouteEntry (const IPNet< A > &net, RibVif *vif, NextHop *nexthop, const Protocol &protocol, uint32_t metric, const PolicyTags &policytags)
 Constructor for IPRouteEntry.
 ~IPRouteEntry ()
 Destructor for Routing Table Entry.
const IPNet< A > & net () const
 Get the route entry's subnet addres.
size_t prefix_len () const
 Get the prefix length of the route entry's subnet address.
const A & nexthop_addr () const
 Get the route entry's next-hop router address.
PolicyTagspolicytags ()
 Get the policy-tags for this route.
const PolicyTagspolicytags () const
string str () const
 Get the route entry as a string for debugging purposes.

Protected Attributes

IPNet< A > _net
PolicyTags _policytags

Detailed Description

template<class A>
class IPRouteEntry< A >

Routing Table Entry.

This class stores a regular RIB routing table entry for either an IPv4 or an IPv6 route. It is a template class, where A is either a the IPv4 class or the IPv6 class.


Constructor & Destructor Documentation

template<class A>
IPRouteEntry< A >::IPRouteEntry ( const IPNet< A > &  net,
RibVif vif,
NextHop nexthop,
const Protocol protocol,
uint32_t  metric 
) [inline]

Constructor for IPRouteEntry.

Parameters:
netthe Subnet (address and mask) of the routing table entry.
vifthe Virtual Interface on which packets matching this routing table entry should be forwarded.
nexthopthe NextHop router to which packets matching this entry should be forwarded.
protocolthe routing protocol that originated this route.
metricthe routing protocol metric for this route.
template<class A>
IPRouteEntry< A >::IPRouteEntry ( const IPNet< A > &  net,
RibVif vif,
NextHop nexthop,
const Protocol protocol,
uint32_t  metric,
const PolicyTags policytags 
) [inline]

Constructor for IPRouteEntry.

Parameters:
netthe Subnet (address and mask) of the routing table entry.
vifthe Virtual Interface on which packets matching this routing table entry should be forwarded.
nexthopthe NextHop router to which packets matching this entry should be forwarded.
protocolthe routing protocol that originated this route.
metricthe routing protocol metric for this route.
policytagsthe policy-tags for this route.

Member Function Documentation

template<class A>
const IPNet<A>& IPRouteEntry< A >::net ( ) const [inline]

Get the route entry's subnet addres.

Returns:
the route entry's subnet address.

Reimplemented from RouteEntry< A >.

template<class A>
const A& IPRouteEntry< A >::nexthop_addr ( ) const [inline]

Get the route entry's next-hop router address.

Returns:
the route entry's next-hop router address. If there is no next-hop router, then the return value is IPv4::ZERO() or IPv6::ZERO().
template<class A>
const PolicyTags& IPRouteEntry< A >::policytags ( ) const [inline]
Returns:
policy-tags associated with route.

Reimplemented from RouteEntry< A >.

template<class A>
PolicyTags& IPRouteEntry< A >::policytags ( ) [inline]

Get the policy-tags for this route.

Returns:
the policy-tags for this route.

Reimplemented from RouteEntry< A >.

template<class A>
size_t IPRouteEntry< A >::prefix_len ( ) const [inline]

Get the prefix length of the route entry's subnet address.

Returns:
the prefix length (in bits) of the route entry's subnet address.
template<class A >
string IPRouteEntry< A >::str ( ) const [virtual]

Get the route entry as a string for debugging purposes.

Returns:
a human readable representation of the route entry.

Implements RouteEntry< A >.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations