#include <cassert>#include <TransportAddress.h>#include <NodeHandle.h>#include <PeerInfo.h>#include <GlobalStatisticsAccess.h>#include <Vivaldi.h>#include <CoordMessages_m.h>#include <GlobalNodeListAccess.h>#include <hashWatch.h>#include "NeighborCache.h"Go to the source code of this file.
Functions | |
| std::ostream & | operator<< (std::ostream &os, const NeighborCache::NeighborCacheEntry &entry) |
| Define_Module (NeighborCache) | |
Definition in file NeighborCache.cc.
| Define_Module | ( | NeighborCache | ) |
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const NeighborCache::NeighborCacheEntry & | entry | |||
| ) |
Definition at line 41 of file NeighborCache.cc.
00043 { 00044 if (entry.rttState == NeighborCache::RTTSTATE_VALID) { 00045 os << entry.rtt; 00046 } else { 00047 if (entry.rttState == NeighborCache::RTTSTATE_TIMEOUT) os << "TIMEOUT"; 00048 else if (entry.rttState == NeighborCache::RTTSTATE_UNKNOWN) os << "UNKNOWN"; 00049 else if (entry.rttState == NeighborCache::RTTSTATE_WAITING) os << "WAITING"; 00050 } 00051 os << " (inserted: " << entry.insertTime; 00052 00053 if (entry.waitingContexts != NULL) { 00054 os << ", #contexts: " 00055 << entry.waitingContexts->pingContexts.size(); 00056 } 00057 if (!entry.nodeRef.isUnspecified()) os << ", <KEY>"; 00058 00059 if (entry.coordsInfo.coordinates.size() > 0) { 00060 if (entry.coordsInfo.npsLayer >= 0) { 00061 os << ", NPS layer: " 00062 << (int)entry.coordsInfo.npsLayer; 00063 } 00064 os << ", coords: <"; 00065 for (uint32_t i = 0; i < entry.coordsInfo.coordinates.size(); ++i) { 00066 if (i != 0) os << ", "; 00067 os << entry.coordsInfo.coordinates[i]; 00068 } 00069 if (entry.coordsInfo.coordErr >= 0) { 00070 os << ", E: " 00071 << entry.coordsInfo.coordErr; 00072 } 00073 os << ">"; 00074 } 00075 os << ")"; 00076 00077 return os; 00078 }
1.5.8