xorp

ExternalRoute Class Reference

Class representing an external route entry, either learned or originated in the OLSRv1 HNA sub-protocol. More...

#include <external.hh>

List of all members.

Public Member Functions

 ExternalRoute (ExternalRoutes &parent, EventLoop &ev, const OlsrTypes::ExternalID erid, const IPv4Net &dest, const IPv4 &lasthop, const uint16_t distance, const TimeVal &expiry_time)
 Constructor for a external route learned from another OLSR peer.
 ExternalRoute (ExternalRoutes &parent, EventLoop &ev, const OlsrTypes::ExternalID erid, const IPv4Net &dest)
 Constructor for a external route originated by this node.
OlsrTypes::ExternalID id () const
bool is_self_originated () const
IPv4Net dest () const
IPv4 lasthop () const
uint16_t distance () const
void set_distance (const uint16_t distance)
 Update the distance in hops between this node and the last hop.
TimeVal time_remaining () const
void update_timer (const TimeVal &expiry_time)
 Schedule or re-schedule the expiry timer on this route entry.
void event_expired ()
 Callback method to: request that the parent delete this HNA derived external route, as it has now expired.

Private Attributes

ExternalRoutes_parent
EventLoop_eventloop
OlsrTypes::ExternalID _id
bool _is_self_originated
 true if this ExternalRoute is being originated by this node and was not learned from another node, otherwise false.
IPv4Net _dest
 The A_network_addr/A_netmask protocol variable.
IPv4 _lasthop
 The A_gateway_addr protocol variable.
XorpTimer _expiry_timer
 The A_time protocol variable.
uint16_t _distance
 The number of hops recorded between this node and the lasthop, as seen in the most recent HNA message containing this prefix.

Detailed Description

Class representing an external route entry, either learned or originated in the OLSRv1 HNA sub-protocol.


Member Function Documentation

IPv4Net ExternalRoute::dest ( ) const [inline]
Returns:
the destination of this route.
uint16_t ExternalRoute::distance ( ) const [inline]
Returns:
the number of hops between this node and the last hop.
OlsrTypes::ExternalID ExternalRoute::id ( ) const [inline]
Returns:
the ID of the external route.
bool ExternalRoute::is_self_originated ( ) const [inline]
Returns:
true if we are the node which originated this route.
IPv4 ExternalRoute::lasthop ( ) const [inline]
Returns:
the node in the OLSR topology which advertised the destination which this route points to.
TimeVal ExternalRoute::time_remaining ( ) const [inline]
Returns:
the amount of time remaining until this HNA entry expires.
void ExternalRoute::update_timer ( const TimeVal expiry_time)

Schedule or re-schedule the expiry timer on this route entry.

Parameters:
expiry_timeThe new expiry time of the route entry.

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