click_chatter("[Cc] ACK for unknown route: [%s] ; from [%s]. Perhaps the route has been discarded in the meanwhile.\n", ackPayload->_target_route.unparse().c_str(), ackHeader->_route.unparse().c_str());
p->kill();
return;
}
ratetuple->_timeout = 0; //reset timeout
_priceTable.set(ackPayload->_target_route, ackPayload->_route_price); //store price. It will be read by timer to set new rate
_removed_routes.erase(ackPayload->_target_route);
}
}
p->kill();
}
}
void Cc::updateAllRates(){
#ifdef CLICK_USERLEVEL
for(HashTable<FormatedRoute,float>::iterator it = _priceTable.begin(); it; ++it){
#else
for(HashTable<FormatedRoute,uint32_t>::iterator it = _priceTable.begin(); it; ++it){
#endif
uint32_t new_rate = dtMultipathUpdateController(it.key(), it.value()); //get new rate
// set the corresponding rate accordingly (B/s)
#ifdef CLICK_USERLEVEL
if(_debug) click_chatter("[Cc-userlevel] setting new rate %f Mbps", (double)new_rate / (double)1000.0);