28 numCloseNodes = neighborCache->par(
"discoveryModeNumCloseNodes");
30 maxSteps = neighborCache->par(
"discoveryModeMaxSteps");
31 spreadedSteps = (int)neighborCache->par(
"discoveryModeSpreadedSteps");
45 <<
" starting Discovery Mode (first asking "
46 << bootstrapNode.
getIp() <<
" for "
47 << (
basePastry ?
"leafSet" :
"spreaded nodes)") <<
")"
56 bootstrapNode, discoveryCall, NULL,
72 <<
" stopping Discovery mode with "
74 <<
improvement <<
" s closer (RTT) than the original bootstrap node."
77 neighborCache->getParentModule()->bubble(
"Discovery Mode finished!");
91 std::cout <<
"step: " <<
step <<
", e: " << svivaldi.
getOwnError() <<
", l: " << svivaldi.
getLoss() << std::endl;
93 const_cast<SVivaldi&
>(svivaldi).stopAdaptation();
99 if (dynamic_cast<DiscoveryCall*>(msg)) {
102 std::vector<TransportAddress>* temp;
115 if (discoveryCall->
getIndex() == 0) {
120 if (rowIndex < 1) rowIndex = 1;
128 for (uint16_t i = 0; i < temp->size(); ++i) {
129 discoveryResponse->
setNodes(i, (*temp)[i]);
141 cPolymorphic* context,
142 int rpcId, simtime_t rtt)
144 if (dynamic_cast<DiscoveryResponse*>(msg)) {
152 <<
" receiving DiscoveryResponse from "
154 <<
" (step = " << (int)
step <<
")"
160 EV <<
" , which is now the closest known neighbor."
173 node = &(discoveryResponse->
getNodes(i));
210 cPolymorphic* context,
int rpcId,
218 cPolymorphic *contextPointer,
Prox prox)
260 <<
" sending new DiscoveryCall to "
262 << (
basePastry ?
"routing table row" :
"close nodes")
263 <<
". (step = " << (
int)
step <<
")"