37 #ifdef __DEVELOPMENT_ASSERTIONS__
46 : _stream(stream), _compressable(false)
51 : _stream(stream), _dictionary(d), _compressable(false)
78 const Block &b = (**iter);
112 bool post_payload =
false;
116 const Block &b = (**iter);
127 }
catch (
const std::bad_cast&) {
154 const Block &b = (**iter);
155 const std::list<dtn::data::EID> eids = b.
getEIDList();
157 for (std::list<dtn::data::EID>::const_iterator eit = eids.begin(); eit != eids.end(); ++eit)
173 _stream << dtn::data::BUNDLE_VERSION;
190 primaryheader[0] = ref.first;
191 primaryheader[1] = ref.second;
195 primaryheader[2] = ref.first;
196 primaryheader[3] = ref.second;
200 primaryheader[4] = ref.first;
201 primaryheader[5] = ref.second;
205 primaryheader[6] = ref.first;
206 primaryheader[7] = ref.second;
209 primaryheader[11] = 0;
215 primaryheader[0] = ref.first;
216 primaryheader[1] = ref.second;
220 primaryheader[2] = ref.first;
221 primaryheader[3] = ref.second;
225 primaryheader[4] = ref.first;
226 primaryheader[5] = ref.second;
230 primaryheader[6] = ref.first;
231 primaryheader[7] = ref.second;
238 for (
int i = 0; i < 12; ++i)
259 for (
int i = 0; i < 11; ++i)
291 #ifdef __DEVELOPMENT_ASSERTIONS__
299 for (Block::eid_list::const_iterator it = eids.begin(); it != eids.end(); ++it)
305 offsets = (*it).getCompressed();
334 #ifdef __DEVELOPMENT_ASSERTIONS__
342 for (Block::eid_list::const_iterator it = eids.begin(); it != eids.end(); ++it)
348 offsets = (*it).getCompressed();
364 Length frag_len = (clip_offset < payload_size) ? payload_size - clip_offset : 0;
367 if (frag_len > clip_length) frag_len = clip_length;
393 const Block &b = (**iter);
404 len +=
sizeof(dtn::data::BUNDLE_VERSION);
415 primaryheader[0] = ref.first;
416 primaryheader[1] = ref.second;
420 primaryheader[2] = ref.first;
421 primaryheader[3] = ref.second;;
425 primaryheader[4] = ref.first;
426 primaryheader[5] = ref.second;;
430 primaryheader[6] = ref.first;
431 primaryheader[7] = ref.second;;
434 primaryheader[11] =
Number(0);
440 primaryheader[0] = ref.first;
441 primaryheader[1] = ref.second;;
445 primaryheader[2] = ref.first;
446 primaryheader[3] = ref.second;;
450 primaryheader[4] = ref.first;
451 primaryheader[5] = ref.second;;
455 primaryheader[6] = ref.first;
456 primaryheader[7] = ref.second;;
471 for (
int i = 0; i < 11; ++i)
511 #ifdef __DEVELOPMENT_ASSERTIONS__
519 for (Block::eid_list::const_iterator it = eids.begin(); it != eids.end(); ++it)
522 len += offsets.first.getLength();
523 len += offsets.second.getLength();
538 : _stream(stream), _validator(_default_validator), _compressed(false), _fragmentation(false)
543 : _stream(stream), _validator(v), _compressed(false), _fragmentation(false)
549 _fragmentation = val;
561 bool lastblock =
false;
570 while (!
_stream.eof() && !lastblock)
573 _stream.get((
char&)block_type);
584 (*this).read(obj, block);
613 for (
unsigned int i = 0; eidcount > i; ++i)
626 _stream.ignore(block_size.get<std::streamsize>());
676 for (
int i = 0; i < 4; ++i)
696 obj.
destination = _dictionary.get(ref[0].first, ref[0].second);
697 obj.
source = _dictionary.get(ref[1].first, ref[1].second);
698 obj.
reportto = _dictionary.get(ref[2].first, ref[2].second);
699 obj.
custodian = _dictionary.get(ref[3].first, ref[3].second);
731 for (
unsigned int i = 0; eidcount > i; ++i)
743 obj.
addEID( _dictionary.
get(scheme, ssp) );
769 for (
unsigned int i = 0; eidcount > i; ++i)
781 obj.
addEID( _dictionary.
get(scheme, ssp) );
842 #ifdef __DEVELOPMENT_ASSERTIONS__
850 for (Block::eid_list::const_iterator it = eids.begin(); it != eids.end(); ++it)
876 #ifdef __DEVELOPMENT_ASSERTIONS__
884 for (Block::eid_list::const_iterator it = eids.begin(); it != eids.end(); ++it)
914 _stream.get((
char&)block_type);
928 for (
unsigned int i = 0; eidcount > i; ++i)