diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-02-07 13:12:19 +0100 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-02-07 13:15:40 +0000 |
commit | db1afad8749fce983636456c16c9df9c24d73af4 (patch) | |
tree | d78492674a1fbc5b923941991542d8115e11493d /libtransport/src/hicn/transport/interfaces | |
parent | 216e35ba535efa00af39b7624f363ca832836e3f (diff) |
[HICN-39] Added api that return a pointer to the signature hold in a packet
[HICN-40] Fixed signature calculation by allocating a contiguous portion of
memory that holds the entire hICN header (IP+TCP+AH)
Change-Id: I9d40bab0e3ecb82949b8b3a00e2cc1214457e4e3
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/interfaces')
3 files changed, 6 insertions, 7 deletions
diff --git a/libtransport/src/hicn/transport/interfaces/socket.h b/libtransport/src/hicn/transport/interfaces/socket.h index 22757810a..14ef86422 100644 --- a/libtransport/src/hicn/transport/interfaces/socket.h +++ b/libtransport/src/hicn/transport/interfaces/socket.h @@ -104,10 +104,7 @@ using ProducerContentObjectCallback = std::function<void(ProducerSocket &, core::ContentObject &)>; using ProducerInterestCallback = - std::function<void(ProducerSocket &, const core::Interest &)>; - -using ProducerInterestCallback = - std::function<void(ProducerSocket &, const core::Interest &)>; + std::function<void(ProducerSocket &, core::Interest &)>; using namespace protocol; diff --git a/libtransport/src/hicn/transport/interfaces/socket_producer.cc b/libtransport/src/hicn/transport/interfaces/socket_producer.cc index 5bd522faf..ab9de4a95 100644 --- a/libtransport/src/hicn/transport/interfaces/socket_producer.cc +++ b/libtransport/src/hicn/transport/interfaces/socket_producer.cc @@ -401,7 +401,7 @@ void ProducerSocket::asyncProduce( } } -void ProducerSocket::onInterest(const Interest &interest) { +void ProducerSocket::onInterest(Interest &interest) { if (on_interest_input_ != VOID_HANDLER) { on_interest_input_(*this, interest); } diff --git a/libtransport/src/hicn/transport/interfaces/socket_producer.h b/libtransport/src/hicn/transport/interfaces/socket_producer.h index 06c47d973..bd7d3f35f 100644 --- a/libtransport/src/hicn/transport/interfaces/socket_producer.h +++ b/libtransport/src/hicn/transport/interfaces/socket_producer.h @@ -69,7 +69,7 @@ class ProducerSocket : public Socket<BasePortal>, asio::io_service &getIoService() override; - virtual void onInterest(const Interest &interest); + virtual void onInterest(Interest &interest); virtual void onInterest(Interest::Ptr &&interest) override { onInterest(*interest); @@ -206,6 +206,8 @@ class ProducerSocket : public Socket<BasePortal>, // buffers utils::ContentStore output_buffer_; + std::unique_ptr<utils::Identity> identity_; + private: utils::EventThread async_thread_; @@ -221,7 +223,7 @@ class ProducerSocket : public Socket<BasePortal>, HashAlgorithm hash_algorithm_; utils::CryptoSuite crypto_suite_; - std::unique_ptr<utils::Identity> identity_; + //std::unique_ptr<utils::Identity> identity_; // utils::Signer& signer_; // buffers |