From e1cc8df89a953871b3d76f55f82ebb03b86b8eb5 Mon Sep 17 00:00:00 2001 From: Olivier Roques Date: Mon, 9 Dec 2019 20:12:07 +0100 Subject: [HICN-501] Change calculation of next reassembly segment when manifests are enabled When manifests are enabled, the current way of computing the next reassembly segment is broken: if manifests are received out of order, which can happen if a interest for a manifest timeouts, reassembly will also be out of order. This patch makes uses of the SuffixContent class introduced in HICN-392 to correctly compute the index of the next segment to reassemble. Change-Id: I2784f3da544fef7b48a110dd6c233657610f44b8 Signed-off-by: Olivier Roques --- .../src/hicn/transport/protocols/manifest_indexing_manager.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h') diff --git a/libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h b/libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h index cb88940d5..645b20e9a 100644 --- a/libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h +++ b/libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h @@ -59,17 +59,20 @@ class ManifestIndexManager : public IncrementalIndexManager, protected: SuffixQueue suffix_queue_; - SuffixQueue::iterator next_reassembly_segment_; SuffixQueue::iterator next_to_retrieve_segment_; + utils::SuffixManifest suffix_manifest_; + utils::SuffixContent next_reassembly_segment_; + + // Holds segments that should not be requested. Useful when + // computing the next reassembly segment because some manifests + // may be incomplete. + std::vector ignored_segments_; // Hash verification std::unordered_map, core::HashAlgorithm>> suffix_hash_map_; - // Manifest Suffix - utils::SuffixManifest suffix_manifest_; - // (temporary) To call scheduleNextInterests() after receiving a manifest TransportProtocol *next_interest_; }; -- cgit 1.2.3-korg