52 const std::string FloodRoutingExtension::TAG =
"FloodRoutingExtension";
68 _taskqueue.push(
new SearchNextBundleTask( peer ) );
76 for (std::set<dtn::core::Node>::const_iterator iter = nl.begin(); iter != nl.end(); ++iter)
83 eventDataChanged(n.
getEID());
124 : _entry(entry), _neighbors(neighbors)
127 virtual ~BundleFilter() {};
129 virtual dtn::data::Size limit()
const throw () {
return _entry.getFreeTransferSlots(); };
166 if (_neighbors.find(n) != _neighbors.end())
173 if (_entry.has(meta))
183 const std::set<dtn::core::Node> &_neighbors;
190 std::set<dtn::core::Node> neighbors;
195 Task *t = _taskqueue.getnpop(
true);
196 std::auto_ptr<Task> killer(t);
202 SearchNextBundleTask &task =
dynamic_cast<SearchNextBundleTask&
>(*t);
224 BundleFilter filter(entry, neighbors);
231 (**this).getSeeker().get(filter, list);
235 for (std::list<dtn::data::MetaBundle>::const_iterator iter = list.begin(); iter != list.end(); ++iter)
248 }
catch (
const std::bad_cast&) { };
252 }
catch (
const std::exception &ex) {
263 FloodRoutingExtension::SearchNextBundleTask::SearchNextBundleTask(
const dtn::data::EID &e)
267 FloodRoutingExtension::SearchNextBundleTask::~SearchNextBundleTask()
270 std::string FloodRoutingExtension::SearchNextBundleTask::toString()
272 return "SearchNextBundleTask: " + eid.getString();