OverSim
BasePastry.cc File Reference
#include <sstream>
#include <stdint.h>
#include <assert.h>
#include <IPAddressResolver.h>
#include <IPvXAddress.h>
#include <IInterfaceTable.h>
#include <IPv4InterfaceData.h>
#include <RpcMacros.h>
#include <InitStages.h>
#include <NeighborCache.h>
#include <GlobalStatistics.h>
#include <BootstrapList.h>
#include "BasePastry.h"

Go to the source code of this file.

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)

Detailed Description

Author
Felix Palmen, Gerhard Petruschat, Bernhard Heep

Definition in file BasePastry.cc.

Function Documentation

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

Definition at line 1077 of file BasePastry.cc.

{
os << "PastryStateMsgProximity {" << endl;
os << " pr_rt {" << endl;
for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin();
i != pr.pr_rt.end(); ++i) {
os << " " << *i << endl;
}
os << " }" << endl;
os << " pr_ls {" << endl;
for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin();
i != pr.pr_ls.end(); ++i) {
os << " " << *i << endl;
}
os << " }" << endl;
os << " pr_ns {" << endl;
for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin();
i != pr.pr_ns.end(); ++i) {
os << " " << *i << endl;
}
os << " }" << endl;
os << "}" << endl;
return os;
}
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.

Definition at line 1049 of file BasePastry.cc.

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

{
return (hnd1.msg->getRow() < hnd2.msg->getRow());
}