aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/core
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-03-19 14:26:52 +0100
committerMauro Sardara <msardara@cisco.com>2019-03-23 15:05:53 +0100
commit1ad06afe9f952642a26f4d28239cf05eb3283eb7 (patch)
tree1ea58529d64a38597cd09f78653cc784c4b61d79 /libtransport/src/hicn/transport/core
parente6d4612011483b267dc9f47c5d2b2444dd88f402 (diff)
[HICN-6] ATS Working, little refactoring of apps
Change-Id: I174815b70bf3a9fbe99ffab7dd2914be04d364b9 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/core')
-rw-r--r--libtransport/src/hicn/transport/core/forwarder_interface.h2
-rw-r--r--libtransport/src/hicn/transport/core/packet.cc4
-rw-r--r--libtransport/src/hicn/transport/core/packet.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/libtransport/src/hicn/transport/core/forwarder_interface.h b/libtransport/src/hicn/transport/core/forwarder_interface.h
index 974b1c39a..b4bc26da7 100644
--- a/libtransport/src/hicn/transport/core/forwarder_interface.h
+++ b/libtransport/src/hicn/transport/core/forwarder_interface.h
@@ -98,7 +98,7 @@ class ForwarderInterface {
}
packet.setChecksum();
- connector_.send(packet.data());
+ connector_.send(packet.acquireMemBufReference());
}
template <typename Handler>
diff --git a/libtransport/src/hicn/transport/core/packet.cc b/libtransport/src/hicn/transport/core/packet.cc
index c5c2b9796..de8ede421 100644
--- a/libtransport/src/hicn/transport/core/packet.cc
+++ b/libtransport/src/hicn/transport/core/packet.cc
@@ -230,7 +230,9 @@ Packet::Format Packet::getFormat() const {
return format_;
}
-const std::shared_ptr<utils::MemBuf> Packet::data() { return packet_; }
+const std::shared_ptr<utils::MemBuf> Packet::acquireMemBufReference() {
+ return packet_;
+}
void Packet::dump() const {
const_cast<Packet *>(this)->separateHeaderPayload();
diff --git a/libtransport/src/hicn/transport/core/packet.h b/libtransport/src/hicn/transport/core/packet.h
index 88d9f9318..6d8bc7e0f 100644
--- a/libtransport/src/hicn/transport/core/packet.h
+++ b/libtransport/src/hicn/transport/core/packet.h
@@ -99,7 +99,7 @@ class Packet : public std::enable_shared_from_this<Packet> {
std::size_t headerSize() const;
- const std::shared_ptr<utils::MemBuf> data();
+ const std::shared_ptr<utils::MemBuf> acquireMemBufReference();
virtual const Name &getName() const = 0;