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 
)

01438 {
01439     os << "PastryStateMsgProximity {" << endl;
01440     os << "  pr_rt {" << endl;
01441     for (std::vector<simtime_t>::const_iterator i = pr.pr_rt.begin();
01442             i != pr.pr_rt.end(); ++i)
01443     {
01444         os << "    " << *i << endl;
01445     }
01446     os << "  }" << endl;
01447     os << "  pr_ls {" << endl;
01448     for (std::vector<simtime_t>::const_iterator i = pr.pr_ls.begin();
01449             i != pr.pr_ls.end(); ++i)
01450     {
01451         os << "    " << *i << endl;
01452     }
01453     os << "  }" << endl;
01454     os << "  pr_ns {" << endl;
01455     for (std::vector<simtime_t>::const_iterator i = pr.pr_ns.begin();
01456             i != pr.pr_ns.end(); ++i)
01457     {
01458         os << "    " << *i << endl;
01459     }
01460     os << "  }" << endl;
01461     os << "}" << endl;
01462     return os;
01463 }

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.

01433 {
01434     return (msg1->getJoinHopCount() < msg2->getJoinHopCount());
01435 }


Generated on Fri May 11 14:52:39 2007 for ITM OverSim by  doxygen 1.4.7