diff options
author | Mauro Sardara <msardara@cisco.com> | 2019-03-23 01:50:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-03-23 01:50:27 +0000 |
commit | e6d4612011483b267dc9f47c5d2b2444dd88f402 (patch) | |
tree | cf6d96bb31af3069853b6b5bd7d203f13a9f791c /libtransport/src/hicn/transport/core/packet.cc | |
parent | f88831fb8df34730141c728138c66698fc1d0ca7 (diff) | |
parent | d35f9469120c2eb4062fb19050ebd2e0d5e7b0f8 (diff) |
Merge "[HICN-135] Fix setLifetime function."
Diffstat (limited to 'libtransport/src/hicn/transport/core/packet.cc')
-rw-r--r-- | libtransport/src/hicn/transport/core/packet.cc | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/libtransport/src/hicn/transport/core/packet.cc b/libtransport/src/hicn/transport/core/packet.cc index ea9666ff7..c5c2b9796 100644 --- a/libtransport/src/hicn/transport/core/packet.cc +++ b/libtransport/src/hicn/transport/core/packet.cc @@ -140,22 +140,6 @@ std::size_t Packet::headerSize() const { reinterpret_cast<uint8_t *>(packet_start_)); } -void Packet::setLifetime(uint32_t lifetime) { - if (hicn_interest_set_lifetime(packet_start_, lifetime) < 0) { - throw errors::MalformedPacketException(); - } -} - -uint32_t Packet::getLifetime() const { - uint32_t lifetime = 0; - - if (hicn_packet_get_lifetime(packet_start_, &lifetime) < 0) { - throw errors::MalformedPacketException(); - } - - return lifetime; -} - Packet &Packet::appendPayload(std::unique_ptr<utils::MemBuf> &&payload) { separateHeaderPayload(); |