BasePastry.cc File Reference

#include <IPAddressResolver.h>
#include <IPvXAddress.h>
#include <InterfaceTable.h>
#include <IPv4InterfaceData.h>
#include <RpcMacros.h>
#include <InitStages.h>
#include <SimpleNetConfigurator.h>
#include <NeighborCache.h>
#include <GlobalStatistics.h>
#include <BootstrapList.h>
#include <assert.h>
#include "BasePastry.h"

Functions

bool stateMsgIsSmaller (const PastryStateMsgHandle &hnd1, const PastryStateMsgHandle &hnd2)
 predicate for comparing two pointers to PastryStateMessages based on their joinHopCount.
std::ostream & operator<< (std::ostream &os, const PastryStateMsgProximity pr)


Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const PastryStateMsgProximity  pr 
)

01309 {
01310     os << "PastryStateMsgProximity {" << endl;
01311     os << "  pr_rt {" << endl;
01312     for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin();
01313          i != pr.pr_rt.end(); ++i) {
01314         os << "    " << *i << endl;
01315     }
01316     os << "  }" << endl;
01317     os << "  pr_ls {" << endl;
01318     for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin();
01319          i != pr.pr_ls.end(); ++i) {
01320         os << "    " << *i << endl;
01321     }
01322     os << "  }" << endl;
01323     os << "  pr_ns {" << endl;
01324     for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin();
01325          i != pr.pr_ns.end(); ++i) {
01326         os << "    " << *i << endl;
01327     }
01328     os << "  }" << endl;
01329     os << "}" << endl;
01330     return os;
01331 }

bool stateMsgIsSmaller ( const PastryStateMsgHandle hnd1,
const PastryStateMsgHandle hnd2 
)

predicate for comparing two pointers to PastryStateMessages based on their joinHopCount.

Needed for sorting the received PastryStateMessages.

Referenced by Pastry::handleStateMessage(), Pastry::handleTimerEvent(), and Bamboo::handleTimerEvent().

01304 {
01305     return (hnd1.msg->getJoinHopCount() < hnd2.msg->getJoinHopCount());
01306 }


Generated on Fri Sep 19 13:05:05 2008 for ITM OverSim by  doxygen 1.5.5