diff options
author | Olivier Roques <oroques+fdio@cisco.com> | 2019-12-09 20:12:07 +0100 |
---|---|---|
committer | Olivier Roques <oroques+fdio@cisco.com> | 2020-02-04 15:48:14 +0100 |
commit | e1cc8df89a953871b3d76f55f82ebb03b86b8eb5 (patch) | |
tree | 9c7b66c1eead036a17d3d46323ea19023a4fb152 /libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h | |
parent | e90a3ec9cbc98d73dfeb2175ee12edfb56af11ee (diff) |
[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 <oroques+fdio@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h')
-rw-r--r-- | libtransport/src/hicn/transport/protocols/manifest_indexing_manager.h | 11 |
1 files changed, 7 insertions, 4 deletions
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<uint32_t> ignored_segments_; // Hash verification std::unordered_map<uint32_t, std::pair<std::vector<uint8_t>, core::HashAlgorithm>> suffix_hash_map_; - // Manifest Suffix - utils::SuffixManifest suffix_manifest_; - // (temporary) To call scheduleNextInterests() after receiving a manifest TransportProtocol *next_interest_; }; |