xorp

ExternalRouteOrderPred Struct Reference

Orders a sequence of OlsrTypes::ExternalID in descending order of preference for route selection. More...

#include <external.hh>

List of all members.

Public Member Functions

 ExternalRouteOrderPred (ExternalRoutes &ers)
bool operator() (const OlsrTypes::ExternalID lhid, const OlsrTypes::ExternalID rhid)
 Functor to: implement collation order on external route maps.

Public Attributes

ExternalRoutes_ers

Detailed Description

Orders a sequence of OlsrTypes::ExternalID in descending order of preference for route selection.

Model of StrictWeakOrdering.


Member Function Documentation

bool ExternalRouteOrderPred::operator() ( const OlsrTypes::ExternalID  lhid,
const OlsrTypes::ExternalID  rhid 
)

Functor to: implement collation order on external route maps.

12.6: The distance to the last-hop, as measured from the HNA message, is used as the current discriminator; this is what's specified in the RFC.

Because identifiers for these structures are normally passed around rather than the pointers themselves, it is necessary to use a functor.

Collation order: 1. Network destination, as per IPvXNet. 2. If not self originated, distance in ascending order.

Parameters:
lhidthe ID of the external route on the left-hand side.
rhidthe ID of the external route on the right-hand side.
Returns:
true if lhid comes before rhid.

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