From 1e1d08d94bb39e2de79d7182e5598fc5fa5e9fce Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Fri, 8 Feb 2019 12:00:25 +0100 Subject: [HICN-43] Fixed packet lifetime and setting AH flag when a data packet carries a signature Change-Id: I5e14716bc9bfcd8ffc3ab8cda8aa9ba0ca5c6d82 Signed-off-by: Alberto Compagno --- libtransport/src/hicn/transport/core/packet.cc | 4 ++-- .../src/hicn/transport/interfaces/socket_options_default_values.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'libtransport/src') diff --git a/libtransport/src/hicn/transport/core/packet.cc b/libtransport/src/hicn/transport/core/packet.cc index 3872510ec..cbfe082d3 100644 --- a/libtransport/src/hicn/transport/core/packet.cc +++ b/libtransport/src/hicn/transport/core/packet.cc @@ -58,7 +58,7 @@ Packet::Packet(MemBufPtr &&buffer) auto header_size = getHeaderSizeFromFormat(format_, signature_size); - auto payload_length = packet_->length() - header_size - signature_size; + auto payload_length = packet_->length() - header_size; if (!payload_length) { return; @@ -69,7 +69,7 @@ Packet::Packet(MemBufPtr &&buffer) if (payload_length) { auto payload = packet_->cloneOne(); payload_head_ = payload.get(); - payload_head_->advance(header_size + signature_size); + payload_head_->advance(header_size); payload_head_->append(payload_length); packet_->prependChain(std::move(payload)); packet_->append(header_size); diff --git a/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h b/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h index 5fae1c484..b4ff44f1e 100644 --- a/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h +++ b/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h @@ -15,6 +15,7 @@ #pragma once +#include #include #include @@ -25,8 +26,8 @@ namespace interface { namespace default_values { const uint32_t interest_lifetime = 1001; // milliseconds -const uint32_t content_object_expiry_time = - 0xffff; // milliseconds -> 50 seconds +const uint32_t never_expire_time = HICN_MAX_LIFETIME; +const uint32_t content_object_expiry_time = never_expire_time; // milliseconds -> 50 seconds const uint32_t content_object_packet_size = 1500; // The ethernet MTU const uint32_t producer_socket_input_buffer_size = 150000; // Interests const uint32_t producer_socket_output_buffer_size = 150000; // Content Object @@ -38,7 +39,6 @@ const uint32_t min_window_size = 1; // Interests const uint32_t max_window_size = 128000; // Interests const uint32_t digest_size = 34; // bytes const uint32_t max_out_of_order_segments = 3; // content object -const uint32_t never_expire_time = 0x0000ffff << 0x0f; // RAAQM const int sample_number = 30; -- cgit 1.2.3-korg