xorp

LinkOrderPred Struct Reference

Orders a sequence of OlsrTypes::LogicalLinkID in descending order of link preference. More...

#include <neighborhood.hh>

List of all members.

Public Member Functions

 LinkOrderPred (Neighborhood *nh)
bool operator() (const OlsrTypes::LogicalLinkID lhid, const OlsrTypes::LogicalLinkID rhid)
 Determine if the left-hand link comes before the the right-hand link.

Public Attributes

Neighborhood_nh

Detailed Description

Orders a sequence of OlsrTypes::LogicalLinkID in descending order of link preference.

Model of StrictWeakOrdering.


Member Function Documentation

bool LinkOrderPred::operator() ( const OlsrTypes::LogicalLinkID  lhid,
const OlsrTypes::LogicalLinkID  rhid 
)

Determine if the left-hand link comes before the the right-hand link.

Collation order: symmetric, most recently updated, highest ID.

TODO: This is a candidate for moving into class Link. TODO: ETX metrics, collation order will be: Anything !is_pending is above anything is_pending Then order in ascending near_etx(). Then order in ascending far_etx(). A change in the best link means a change in routes, unless we dampen flap somehow.

Returns:
true if link lhs is better than link rhs.

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