49 #ifdef WITH_BUNDLE_SECURITY
54 #ifdef WITH_COMPRESSION
58 using namespace dtn::data;
59 using namespace dtn::utils;
66 const std::string BundleCore::TAG =
"BundleCore";
75 bool BundleCore::forwarding =
true;
83 BundleCore::BundleCore()
84 : _clock(1), _storage(NULL), _seeker(NULL), _router(NULL), _globally_connected(true)
93 BundleCore::~BundleCore()
161 if (transit_limit > 0)
168 if (config.getNetwork().doForwarding())
179 const std::set<ibrcommon::vinterface> &global_nets = config.getNetwork().getInternetDevices();
185 for (std::set<ibrcommon::vinterface>::const_iterator iter = global_nets.begin(); iter != global_nets.end(); ++iter)
191 check_connection_state();
221 if (_storage == NULL)
223 throw ibrcommon::Exception(
"No bundle storage is set! Use BundleCore::setStorage() to set a storage.");
232 throw ibrcommon::Exception(
"No bundle seeker is set! Use BundleCore::setSeeker() to set a seeker.");
245 _connectionmanager.queue(transfer);
259 return _connectionmanager;
274 return _globally_connected;
293 bool delivered =
false;
304 custody.
read(payload);
306 getStorage().releaseCustody(bundle.
source, custody.bundleid);
338 }
catch (
const std::bad_cast&) {}
359 }
catch (
const std::bad_cast&) { }
383 }
catch (
const std::bad_cast&) { };
397 }
catch (
const std::bad_cast&) { }
404 }
catch (
const std::bad_cast&) { }
521 if (b.destination.isNone())
534 #ifdef WITH_BUNDLE_SECURITY
561 }
catch (
const std::bad_cast&) { }
576 #ifdef WITH_BUNDLE_SECURITY
593 #ifdef WITH_COMPRESSION
609 if (global_nets.find(evt.
getInterface()) != global_nets.end()) {
610 check_connection_state();
616 if (val == _globally_connected)
return;
624 _globally_connected = val;
627 void BundleCore::check_connection_state() throw ()
631 if (global_nets.empty()) {
637 for (std::set<ibrcommon::vinterface>::const_iterator iter = global_nets.begin(); iter != global_nets.end(); ++iter)