class TwoHopLink

A link between a Neighbor and a TwoHopNeighbor. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

Association class between TwoHopNeighbor and Neighbor. TwoHopNeighbor cannot exist without TwoHopLink. Like Link and Neighbor, there is a co-dependent relationship. Both TwoHopNeighbor and TwoHopLink cannot exist without Neighbor.

TwoHopLinks are uniquely identified by the ID of the two-hop neighbor at the far end, and the Neighbor at the near end. When the last TwoHopLink associated with a TwoHopNeighbor is deleted, the TwoHopNeighbor MUST be deleted, to conform to the relations in the RFC.

 TwoHopLink (EventLoop& ev, Neighborhood* parent, OlsrTypes::TwoHopLinkID tlid, Neighbor* nexthop, const TimeVal& vtime)

TwoHopLink

inline OlsrTypes::TwoHopLinkID  id ()

id

[const]

Returns: A unique identifier for this link in the two-hop neighborhood.

inline Neighbor*  nexthop ()

nexthop

[const]

Returns: A pointer to the strict one-hop neighbor at the near end of this link.

inline TwoHopNeighbor*  destination ()

destination

[const]

Returns: A pointer to the strict two-hop neighbor at the far end of this link.

inline void  set_destination (TwoHopNeighbor* destination)

set_destination

Set the cached destination pointer.

Parameters:

destinationthe TwoHopNeighbor at the end of this link.
inline OlsrTypes::FaceID  face_id ()

face_id

[const]

Returns: The ID of the interface where the advertisement of this TwoHopLink was last heard by a Neighbor.

inline double  near_etx ()

near_etx

[const]

Returns: ETX measurement at near end of link.

inline double  far_etx ()

far_etx

[const]

Returns: ETX measurement at far end of link.

inline void  set_face_id (const OlsrTypes::FaceID faceid)

set_face_id

Set the ID of the interface where this link was last heard.

Parameters:

faceidthe ID of the interface.
inline void  set_near_etx (const double& near_etx)

set_near_etx

Set the ETX measurement at near end of link.

Parameters:

near_etxnear end ETX measurement.
inline void  set_far_etx (const double& far_etx)

set_far_etx

Set the ETX measurement at far end of link.

Parameters:

far_etxfar end ETX measurement.
inline TimeVal  time_remaining ()

time_remaining

[const]

Returns: the amount of time remaining until this two-hop link expires.

void  update_timer (const TimeVal& vtime)

update_timer

Update this link's expiry timer.

Parameters:

vtimethe amount of time from now til when the link expires.
void  event_dead ()

event_dead

Callback method to: tell the parent that this two-hop link has now expired.


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