Pastry.cc File Reference


Detailed Description

Author:
Felix Palmen

#include <IPAddressResolver.h>
#include <IPvXAddress.h>
#include <InterfaceTable.h>
#include <IPv4InterfaceData.h>
#include <RpcMacros.h>
#include <InitStages.h>
#include "Pastry.h"

Functions

 Define_Module (Pastry)
bool stateMsgIsSmaller (const PastryStateMessage *msg1, const PastryStateMessage *msg2)
 predicate for comparing two pointers to PastryStateMessages based on their joinHopCount.
std::ostream & operator<< (std::ostream &os, const PastryStateMsgProximity pr)


Function Documentation

Define_Module ( Pastry   ) 

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

01684 {
01685     os << "PastryStateMsgProximity {" << endl;
01686     os << "  pr_rt {" << endl;
01687     for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin();
01688             i != pr.pr_rt.end(); ++i)
01689     {
01690         os << "    " << *i << endl;
01691     }
01692     os << "  }" << endl;
01693     os << "  pr_ls {" << endl;
01694     for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin();
01695             i != pr.pr_ls.end(); ++i)
01696     {
01697         os << "    " << *i << endl;
01698     }
01699     os << "  }" << endl;
01700     os << "  pr_ns {" << endl;
01701     for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin();
01702             i != pr.pr_ns.end(); ++i)
01703     {
01704         os << "    " << *i << endl;
01705     }
01706     os << "  }" << endl;
01707     os << "}" << endl;
01708     return os;
01709 }

bool stateMsgIsSmaller ( const PastryStateMessage *  msg1,
const PastryStateMessage *  msg2 
)

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

Needed for sorting the received PastryStateMessages.

01679 {
01680     return (msg1->getJoinHopCount() < msg2->getJoinHopCount());
01681 }


Generated on Tue Jul 24 16:51:17 2007 for ITM OverSim by  doxygen 1.5.1