PeerInfo.cc
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00024 #include "PeerInfo.h"
00025
00026 PeerInfo::PeerInfo(uint32_t type, int moduleId, cObject** context)
00027 {
00028 bootstrapped = false;
00029 malicious = false;
00030 this->moduleId = moduleId;
00031 this->type = type;
00032 this->npsLayer = -1;
00033 this->context = context;
00034 }
00035
00036 void PeerInfo::dummy() {}
00037
00038
00039
00040 std::ostream& operator<<(std::ostream& os, const PeerInfo info)
00041 {
00042 os << "ModuleId: " << info.moduleId << "Bootstrapped: "
00043 << (info.bootstrapped ? "true" : "false");
00044
00045 if (info.npsLayer >= 0) os << "; NPS Layer: " << info.npsLayer;
00046 return os;
00047 }
00048