Thank you for helping me, Johannes!
I'm not familiar with ibr-dtn logic and I'm not a good programmer, so it is difficult to me to understand your explanation. I understood, that bundles are selected for forwarding in rounds, one round for each neighbor. But I can't understand this part: "only the routes are selected where no other path exists", mainly "where no other path exists". Could you please explain the algorithm in more detail?
1. Get a list of current neighbors; 2. ...; 3. ...
Best regards, Sergey Sireskin
2013/8/21 Johannes Morgenroth morgenroth@ibr.cs.tu-bs.de
Look at the code starting at line 175:
// remove all routes of the previous round routes.clear();
// look for routes to this node for (std::list<StaticRoute*>::**const_iterator iter = _routes.begin(); iter != _routes.end(); ++iter) { const StaticRoute *route = (*iter); if (route->getDestination() == task.eid) { // add to the valid routes routes.push_back(route); } }
In this part the router selects the valid routes for a neighbor. The best way would be to limit routes here, so that only the routes are selected where no other path exists. "dtn::core::BundleCore::**getInstance().** getConnectionManager().**getNeighbors()" gives you a list of current neighbors.
The reason way you can not simply abort a loop here is that bundle routing is much different to usual network routing. Here, the extensions are select the bundles to forward in rounds and in each round only one neighbor is considered. So you can not know, if another round has already forwarded the bundle to another neighbor.
Kind regards, Johannes Morgenroth
Am 21.08.2013 14:49, schrieb ssireskin@gmail.com:
Johannes,
I know that there is no such an option, I was asking about the possibility of adding such an option.
I tried to add iter = _routes.end(); after transferTo(route.**getDestination(), task.bundle); in StaticRoutingExtension.cpp, but it didn't help.
Could you please advise, which part of StaticRoutingExtension I should look at?
Best regards, Sergey Sireskin