xorp

LogicalLink Class Reference

Logical link used to reach a directly reachable Neighbor. More...

#include <link.hh>

List of all members.

Public Member Functions

 LogicalLink (Neighborhood *tm, EventLoop &eventloop, const OlsrTypes::LogicalLinkID id, const TimeVal &vtime, const IPv4 &remote_addr, const IPv4 &local_addr)
OlsrTypes::LogicalLinkID id () const
OlsrTypes::NeighborID neighbor_id () const
void set_neighbor_id (OlsrTypes::NeighborID neighborid)
 Set the ID of the neighbor at the far end of this link.
Neighbordestination () const
void set_destination (Neighbor *n)
 Set the cached neighbor pointer.
OlsrTypes::FaceID faceid () const
void set_faceid (OlsrTypes::FaceID faceid)
 Set the ID of the local interface where this link resides.
IPv4 local_addr () const
IPv4 remote_addr () const
double near_etx () const
double far_etx () const
void update_timers (const TimeVal &vtime, bool saw_self=false, const LinkCode lc=LinkCode())
 Update the link timers, based on the information present in a HELLO message.
OlsrTypes::LinkType link_type () const
 Determine the current state of the link.
bool is_sym () const
TimeVal sym_time_remaining () const
TimeVal asym_time_remaining () const
TimeVal time_remaining () const
bool pending () const
 Determine if a link is pending (i.e.
void event_sym_timer ()
 Callback method to: service a LogicalLink's SYM timer.
void event_asym_timer ()
 Callback method to: service a LogicalLink's ASYM timer.
void event_lost_timer ()
 Callback method to: service a LogicalLink's LOST timer.
void event_dead_timer ()
 Callback method to: service a LogicalLink's DEAD timer.

Private Attributes

Neighborhood_nh
EventLoop_eventloop
OlsrTypes::LogicalLinkID _id
 Unique identifier of link.
OlsrTypes::FaceID _faceid
 ID of interface where this link resides.
OlsrTypes::NeighborID _neighborid
 ID of neighbor at other end of link.
Neighbor_destination
 Cached pointer to Neighbor.
IPv4 _remote_addr
 L_neighbor_iface_addr protocol variable.
IPv4 _local_addr
 L_local_iface_addr protocol variable.
XorpTimer _sym_timer
 L_SYM_time protocol variable.
XorpTimer _asym_timer
 L_ASYM_time protocol variable.
XorpTimer _lost_timer
 L_LOST_LINK_time protocol variable.
XorpTimer _dead_timer
 L_time protocol variable.
bool _is_pending
 L_link_pending protocol variable.
double _near_etx
 L_link_etx protocol variable.
double _far_etx
 ETX far-end measurement.

Detailed Description

Logical link used to reach a directly reachable Neighbor.

LogicalLink is so named because it is mostly independent of the underlying link layer. OLSR uses link-layer broadcasts or multicasts for the purposes of neighbor discovery, and links are created through the exchange of HELLO messages. LogicalLink may be associated with link-layer specific state, e.g. that of an 802.11s mesh portal.


Member Function Documentation

TimeVal LogicalLink::asym_time_remaining ( ) const [inline]
Returns:
the amount of time remaining until the ASYM timer fires.
Neighbor* LogicalLink::destination ( ) const [inline]
Returns:
the cached Neighbor pointer.
void LogicalLink::event_dead_timer ( )

Callback method to: service a LogicalLink's DEAD timer.

This is immediately passed to the parent Neighborhood as the link may be deleted.

OlsrTypes::FaceID LogicalLink::faceid ( ) const [inline]
Returns:
the ID of the local interface where this link resides.
double LogicalLink::far_etx ( ) const [inline]
Returns:
the far end ETX measurement.
OlsrTypes::LogicalLinkID LogicalLink::id ( ) const [inline]
Returns:
the ID of this link.
bool LogicalLink::is_sym ( ) const [inline]
Returns:
true if this link is symmetric.
OlsrTypes::LinkType LogicalLink::link_type ( ) const

Determine the current state of the link.

Section 6.2, 1: HELLO Message Generation, Link Type.

Returns:
The link type code representing this link's state.
IPv4 LogicalLink::local_addr ( ) const [inline]
Returns:
the protocol address of the local interface.
double LogicalLink::near_etx ( ) const [inline]
Returns:
the near end ETX measurement.
OlsrTypes::NeighborID LogicalLink::neighbor_id ( ) const [inline]
Returns:
the ID of the neighbor at the far end of this link.
bool LogicalLink::pending ( ) const [inline]

Determine if a link is pending (i.e.

not yet established).

Returns:
true if the link is pending.
IPv4 LogicalLink::remote_addr ( ) const [inline]
Returns:
the protocol address of the neighbor's interface.
void LogicalLink::set_destination ( Neighbor n) [inline]

Set the cached neighbor pointer.

Parameters:
nthe Neighbor pointer.
void LogicalLink::set_faceid ( OlsrTypes::FaceID  faceid) [inline]

Set the ID of the local interface where this link resides.

Parameters:
faceidthe ID of the local interface.
void LogicalLink::set_neighbor_id ( OlsrTypes::NeighborID  neighborid) [inline]

Set the ID of the neighbor at the far end of this link.

Parameters:
neighboridthe ID of the neighbor.
TimeVal LogicalLink::sym_time_remaining ( ) const [inline]
Returns:
the amount of time remaining until the SYM timer fires.
TimeVal LogicalLink::time_remaining ( ) const [inline]
Returns:
the amount of time remaining until the DEAD timer fires.
void LogicalLink::update_timers ( const TimeVal vtime,
bool  saw_self = false,
const LinkCode  lc = LinkCode() 
)

Update the link timers, based on the information present in a HELLO message.

Section 7.1.1, 2: HELLO Message Processing.

Parameters:
vtimeThe validity time present in the HELLO message.
saw_selftrue if the neighbor advertised our own address.
lcthe link code with which our address was advertised.

Member Data Documentation

L_local_iface_addr protocol variable.

The protocol address of our local interface.

L_neighbor_iface_addr protocol variable.

The protocol address of the neighbor's interface.


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