diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp
index fcde63b..dfe8bee 100644
--- a/daemon/face/datagram-transport.hpp
+++ b/daemon/face/datagram-transport.hpp
@@ -69,7 +69,7 @@
   doClose() override;
 
   void
-  doSend(Transport::Packet&& packet) override;
+  doSend(const Block& packet, const EndpointId& endpoint) override;
 
   void
   handleSend(const boost::system::error_code& error, size_t nBytesSent);
@@ -157,13 +157,13 @@
 
 template<class T, class U>
 void
-DatagramTransport<T, U>::doSend(Transport::Packet&& packet)
+DatagramTransport<T, U>::doSend(const Block& packet, const EndpointId&)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
-  m_socket.async_send(boost::asio::buffer(packet.packet),
-                      // packet.packet is copied into the lambda to retain the underlying Buffer
-                      [this, p = packet.packet] (auto&&... args) {
+  m_socket.async_send(boost::asio::buffer(packet),
+                      // 'packet' is copied into the lambda to retain the underlying Buffer
+                      [this, packet] (auto&&... args) {
                         this->handleSend(std::forward<decltype(args)>(args)...);
                       });
 }
@@ -193,9 +193,7 @@
   }
   m_hasRecentlyReceived = true;
 
-  Transport::Packet tp(std::move(element));
-  tp.remoteEndpoint = makeEndpointId(m_sender);
-  this->receive(std::move(tp));
+  this->receive(element, makeEndpointId(m_sender));
 }
 
 template<class T, class U>
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index a2f3e9b..6b419bf 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.cpp
@@ -102,11 +102,11 @@
 }
 
 void
-EthernetTransport::doSend(Transport::Packet&& packet)
+EthernetTransport::doSend(const Block& packet, const EndpointId&)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
-  sendPacket(packet.packet);
+  sendPacket(packet);
 }
 
 void
@@ -209,13 +209,13 @@
   }
   m_hasRecentlyReceived = true;
 
-  Transport::Packet tp(std::move(element));
-  static_assert(sizeof(tp.remoteEndpoint) >= ethernet::ADDR_LEN,
-                "Transport::Packet::remoteEndpoint is too small");
+  static_assert(sizeof(EndpointId) >= ethernet::ADDR_LEN, "EndpointId is too small");
+  EndpointId endpoint = 0;
   if (m_destAddress.isMulticast()) {
-    std::memcpy(&tp.remoteEndpoint, sender.data(), sender.size());
+    std::memcpy(&endpoint, sender.data(), sender.size());
   }
-  this->receive(std::move(tp));
+
+  this->receive(element, endpoint);
 }
 
 void
diff --git a/daemon/face/ethernet-transport.hpp b/daemon/face/ethernet-transport.hpp
index 798b937..8258285 100644
--- a/daemon/face/ethernet-transport.hpp
+++ b/daemon/face/ethernet-transport.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,6 +29,7 @@
 #include "ethernet-protocol.hpp"
 #include "pcap-helper.hpp"
 #include "transport.hpp"
+
 #include <ndn-cxx/net/network-interface.hpp>
 
 namespace nfd {
@@ -43,11 +44,7 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
   /**
@@ -84,7 +81,7 @@
   handleNetifStateChange(ndn::net::InterfaceState netifState);
 
   void
-  doSend(Transport::Packet&& packet) final;
+  doSend(const Block& packet, const EndpointId& endpoint) final;
 
   /**
    * @brief Sends the specified TLV block on the network wrapped in an Ethernet frame
diff --git a/daemon/face/face-endpoint.hpp b/daemon/face/face-endpoint.hpp
index cf2c466..4d33634 100644
--- a/daemon/face/face-endpoint.hpp
+++ b/daemon/face/face-endpoint.hpp
@@ -30,7 +30,8 @@
 
 namespace nfd {
 
-/** \brief Represents a face-endpoint pair in the forwarder
+/** \brief Represents a face-endpoint pair in the forwarder.
+ *  \sa face::Face, face::EndpointId
  */
 class FaceEndpoint
 {
@@ -49,7 +50,7 @@
 inline std::ostream&
 operator<<(std::ostream& os, const FaceEndpoint& fe)
 {
-  return os << "(" << fe.face.getId() << "," << fe.endpoint << ")";
+  return os << '(' << fe.face.getId() << ',' << fe.endpoint << ')';
 }
 
 } // namespace nfd
diff --git a/daemon/face/generic-link-service.cpp b/daemon/face/generic-link-service.cpp
index 09b874c..5a3664c 100644
--- a/daemon/face/generic-link-service.cpp
+++ b/daemon/face/generic-link-service.cpp
@@ -85,13 +85,13 @@
     checkCongestionLevel(pkt);
   }
 
-  Transport::Packet tp(pkt.wireEncode());
-  if (mtu != MTU_UNLIMITED && tp.packet.size() > static_cast<size_t>(mtu)) {
+  auto block = pkt.wireEncode();
+  if (mtu != MTU_UNLIMITED && block.size() > static_cast<size_t>(mtu)) {
     ++this->nOutOverMtu;
     NFD_LOG_FACE_WARN("attempted to send packet over MTU limit");
     return;
   }
-  this->sendPacket(std::move(tp), endpointId);
+  this->sendPacket(block, endpointId);
 }
 
 void
@@ -276,10 +276,10 @@
 }
 
 void
-GenericLinkService::doReceivePacket(Transport::Packet&& packet)
+GenericLinkService::doReceivePacket(const Block& packet, const EndpointId& endpoint)
 {
   try {
-    lp::Packet pkt(packet.packet);
+    lp::Packet pkt(packet);
 
     if (m_options.reliabilityOptions.isEnabled) {
       m_reliability.processIncomingPacket(pkt);
@@ -299,10 +299,9 @@
     bool isReassembled = false;
     Block netPkt;
     lp::Packet firstPkt;
-    std::tie(isReassembled, netPkt, firstPkt) = m_reassembler.receiveFragment(packet.remoteEndpoint,
-                                                                              pkt);
+    std::tie(isReassembled, netPkt, firstPkt) = m_reassembler.receiveFragment(endpoint, pkt);
     if (isReassembled) {
-      this->decodeNetPacket(netPkt, firstPkt, packet.remoteEndpoint);
+      this->decodeNetPacket(netPkt, firstPkt, endpoint);
     }
   }
   catch (const tlv::Error& e) {
diff --git a/daemon/face/generic-link-service.hpp b/daemon/face/generic-link-service.hpp
index c28b9ef..fe8e962 100644
--- a/daemon/face/generic-link-service.hpp
+++ b/daemon/face/generic-link-service.hpp
@@ -232,7 +232,7 @@
   /** \brief receive Packet from Transport
    */
   void
-  doReceivePacket(Transport::Packet&& packet) OVERRIDE_WITH_TESTS_ELSE_FINAL;
+  doReceivePacket(const Block& packet, const EndpointId& endpoint) OVERRIDE_WITH_TESTS_ELSE_FINAL;
 
   /** \brief decode incoming network-layer packet
    *  \param netPkt reassembled network-layer packet
diff --git a/daemon/face/internal-transport.cpp b/daemon/face/internal-transport.cpp
index 18bfe0a..e5d598a 100644
--- a/daemon/face/internal-transport.cpp
+++ b/daemon/face/internal-transport.cpp
@@ -46,21 +46,21 @@
 }
 
 void
-InternalForwarderTransport::receivePacket(Block&& packet)
+InternalForwarderTransport::receivePacket(const Block& packet)
 {
-  getGlobalIoService().post([this, pkt = std::move(packet)] () mutable {
-    NFD_LOG_FACE_TRACE("Received: " << pkt.size() << " bytes");
-    receive(Packet{std::move(pkt)});
+  getGlobalIoService().post([this, packet] {
+    NFD_LOG_FACE_TRACE("Received: " << packet.size() << " bytes");
+    receive(packet);
   });
 }
 
 void
-InternalForwarderTransport::doSend(Packet&& packet)
+InternalForwarderTransport::doSend(const Block& packet, const EndpointId&)
 {
   NFD_LOG_FACE_TRACE("Sending to " << m_peer);
 
   if (m_peer)
-    m_peer->receivePacket(std::move(packet.packet));
+    m_peer->receivePacket(packet);
 }
 
 void
@@ -104,12 +104,12 @@
 }
 
 void
-InternalClientTransport::receivePacket(Block&& packet)
+InternalClientTransport::receivePacket(const Block& packet)
 {
-  getGlobalIoService().post([this, pkt = std::move(packet)] {
-    NFD_LOG_TRACE("Received: " << pkt.size() << " bytes");
+  getGlobalIoService().post([this, packet] {
+    NFD_LOG_TRACE("Received: " << packet.size() << " bytes");
     if (m_receiveCallback) {
-      m_receiveCallback(pkt);
+      m_receiveCallback(packet);
     }
   });
 }
@@ -120,7 +120,7 @@
   NFD_LOG_TRACE("Sending to " << m_forwarder);
 
   if (m_forwarder)
-    m_forwarder->receivePacket(Block{wire});
+    m_forwarder->receivePacket(wire);
 }
 
 void
diff --git a/daemon/face/internal-transport.hpp b/daemon/face/internal-transport.hpp
index f859099..71ae4d5 100644
--- a/daemon/face/internal-transport.hpp
+++ b/daemon/face/internal-transport.hpp
@@ -42,7 +42,7 @@
   ~InternalTransportBase() = default;
 
   virtual void
-  receivePacket(Block&& packet) = 0;
+  receivePacket(const Block& packet) = 0;
 };
 
 /** \brief Implements a forwarder-side transport that can be paired with another transport.
@@ -63,7 +63,7 @@
   }
 
   void
-  receivePacket(Block&& packet) final;
+  receivePacket(const Block& packet) final;
 
 protected:
   void
@@ -71,7 +71,7 @@
 
 private:
   void
-  doSend(Packet&& packet) final;
+  doSend(const Block& packet, const EndpointId& endpoint) final;
 
 private:
   NFD_LOG_MEMBER_DECL();
@@ -98,7 +98,7 @@
   connectToForwarder(InternalForwarderTransport* forwarder);
 
   void
-  receivePacket(Block&& packet) final;
+  receivePacket(const Block& packet) final;
 
   void
   send(const Block& wire) final;
diff --git a/daemon/face/link-service.cpp b/daemon/face/link-service.cpp
index 34abd58..a382ebe 100644
--- a/daemon/face/link-service.cpp
+++ b/daemon/face/link-service.cpp
@@ -52,66 +52,66 @@
 }
 
 void
-LinkService::sendInterest(const Interest& interest, const EndpointId& endpointId)
+LinkService::sendInterest(const Interest& interest, const EndpointId& endpoint)
 {
   BOOST_ASSERT(m_transport != nullptr);
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nOutInterests;
 
-  doSendInterest(interest, endpointId);
+  doSendInterest(interest, endpoint);
 }
 
 void
-LinkService::sendData(const Data& data, const EndpointId& endpointId)
+LinkService::sendData(const Data& data, const EndpointId& endpoint)
 {
   BOOST_ASSERT(m_transport != nullptr);
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nOutData;
 
-  doSendData(data, endpointId);
+  doSendData(data, endpoint);
 }
 
 void
-LinkService::sendNack(const ndn::lp::Nack& nack, const EndpointId& endpointId)
+LinkService::sendNack(const ndn::lp::Nack& nack, const EndpointId& endpoint)
 {
   BOOST_ASSERT(m_transport != nullptr);
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nOutNacks;
 
-  doSendNack(nack, endpointId);
+  doSendNack(nack, endpoint);
 }
 
 void
-LinkService::receiveInterest(const Interest& interest, const EndpointId& endpointId)
+LinkService::receiveInterest(const Interest& interest, const EndpointId& endpoint)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nInInterests;
 
-  afterReceiveInterest(interest, endpointId);
+  afterReceiveInterest(interest, endpoint);
 }
 
 void
-LinkService::receiveData(const Data& data, const EndpointId& endpointId)
+LinkService::receiveData(const Data& data, const EndpointId& endpoint)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nInData;
 
-  afterReceiveData(data, endpointId);
+  afterReceiveData(data, endpoint);
 }
 
 void
-LinkService::receiveNack(const ndn::lp::Nack& nack, const EndpointId& endpointId)
+LinkService::receiveNack(const ndn::lp::Nack& nack, const EndpointId& endpoint)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nInNacks;
 
-  afterReceiveNack(nack, endpointId);
+  afterReceiveNack(nack, endpoint);
 }
 
 void
diff --git a/daemon/face/link-service.hpp b/daemon/face/link-service.hpp
index fd77391..8396137 100644
--- a/daemon/face/link-service.hpp
+++ b/daemon/face/link-service.hpp
@@ -112,23 +112,23 @@
   getCounters() const;
 
 public: // upper interface to be used by forwarding
-  /** \brief send Interest to \p endpointId
+  /** \brief Send Interest to \p endpoint
    *  \pre setTransport has been called
    */
   void
-  sendInterest(const Interest& interest, const EndpointId& endpointId);
+  sendInterest(const Interest& interest, const EndpointId& endpoint);
 
-  /** \brief send Data to \p endpointId
+  /** \brief Send Data to \p endpoint
    *  \pre setTransport has been called
    */
   void
-  sendData(const Data& data, const EndpointId& endpointId);
+  sendData(const Data& data, const EndpointId& endpoint);
 
-  /** \brief send Nack to \p endpointId
+  /** \brief Send Nack to \p endpoint
    *  \pre setTransport has been called
    */
   void
-  sendNack(const ndn::lp::Nack& nack, const EndpointId& endpointId);
+  sendNack(const ndn::lp::Nack& nack, const EndpointId& endpoint);
 
   /** \brief signals on Interest received
    */
@@ -150,53 +150,53 @@
   /** \brief performs LinkService specific operations to receive a lower-layer packet
    */
   void
-  receivePacket(Transport::Packet&& packet);
+  receivePacket(const Block& packet, const EndpointId& endpoint);
 
 protected: // upper interface to be invoked in subclass (receive path termination)
   /** \brief delivers received Interest to forwarding
    */
   void
-  receiveInterest(const Interest& interest, const EndpointId& endpointId);
+  receiveInterest(const Interest& interest, const EndpointId& endpoint);
 
   /** \brief delivers received Data to forwarding
    */
   void
-  receiveData(const Data& data, const EndpointId& endpointId);
+  receiveData(const Data& data, const EndpointId& endpoint);
 
   /** \brief delivers received Nack to forwarding
    */
   void
-  receiveNack(const lp::Nack& nack, const EndpointId& endpointId);
+  receiveNack(const lp::Nack& nack, const EndpointId& endpoint);
 
 protected: // lower interface to be invoked in subclass (send path termination)
-  /** \brief send a lower-layer packet via Transport to \p endpointId
+  /** \brief send a lower-layer packet via Transport to \p endpoint
    */
   void
-  sendPacket(Transport::Packet&& packet, const EndpointId& endpointId);
+  sendPacket(const Block& packet, const EndpointId& endpoint);
 
 protected:
   void
   notifyDroppedInterest(const Interest& packet);
 
 private: // upper interface to be overridden in subclass (send path entrypoint)
-  /** \brief performs LinkService specific operations to send an Interest to \p endpointId
+  /** \brief performs LinkService specific operations to send an Interest to \p endpoint
    */
   virtual void
-  doSendInterest(const Interest& interest, const EndpointId& endpointId) = 0;
+  doSendInterest(const Interest& interest, const EndpointId& endpoint) = 0;
 
-  /** \brief performs LinkService specific operations to send a Data to \p endpointId
+  /** \brief performs LinkService specific operations to send a Data to \p endpoint
    */
   virtual void
-  doSendData(const Data& data, const EndpointId& endpointId) = 0;
+  doSendData(const Data& data, const EndpointId& endpoint) = 0;
 
-  /** \brief performs LinkService specific operations to send a Nack to \p endpointId
+  /** \brief performs LinkService specific operations to send a Nack to \p endpoint
    */
   virtual void
-  doSendNack(const lp::Nack& nack, const EndpointId& endpointId) = 0;
+  doSendNack(const lp::Nack& nack, const EndpointId& endpoint) = 0;
 
 private: // lower interface to be overridden in subclass
   virtual void
-  doReceivePacket(Transport::Packet&& packet) = 0;
+  doReceivePacket(const Block& packet, const EndpointId& endpoint) = 0;
 
 private:
   Face* m_face;
@@ -228,16 +228,15 @@
 }
 
 inline void
-LinkService::receivePacket(Transport::Packet&& packet)
+LinkService::receivePacket(const Block& packet, const EndpointId& endpoint)
 {
-  doReceivePacket(std::move(packet));
+  doReceivePacket(packet, endpoint);
 }
 
 inline void
-LinkService::sendPacket(Transport::Packet&& packet, const EndpointId& endpointId)
+LinkService::sendPacket(const Block& packet, const EndpointId& endpoint)
 {
-  packet.remoteEndpoint = endpointId;
-  m_transport->send(std::move(packet));
+  m_transport->send(packet, endpoint);
 }
 
 std::ostream&
diff --git a/daemon/face/lp-reassembler.hpp b/daemon/face/lp-reassembler.hpp
index 2c5ff91..e9f0556 100644
--- a/daemon/face/lp-reassembler.hpp
+++ b/daemon/face/lp-reassembler.hpp
@@ -72,13 +72,13 @@
   const LinkService*
   getLinkService() const;
 
-  /** \brief adds received fragment to buffer
-   *  \param remoteEndpoint endpoint whose sends the packet
-   *  \param packet received fragment;
-   *                must have Fragment field
-   *  \return whether network-layer packet has been completely received,
+  /** \brief adds received fragment to the buffer
+   *  \param remoteEndpoint endpoint that sent the packet
+   *  \param packet received fragment; must have Fragment field
+   *  \return a tuple containing:
+   *          whether a network-layer packet has been completely received,
    *          the reassembled network-layer packet,
-   *          and the first fragment for inspecting other NDNLPv2 headers
+   *          the first fragment for inspecting other NDNLPv2 headers
    *  \throw tlv::Error packet is malformed
    */
   std::tuple<bool, Block, lp::Packet>
diff --git a/daemon/face/multicast-udp-transport.cpp b/daemon/face/multicast-udp-transport.cpp
index 689b7e0..5017e7d 100644
--- a/daemon/face/multicast-udp-transport.cpp
+++ b/daemon/face/multicast-udp-transport.cpp
@@ -82,13 +82,13 @@
 }
 
 void
-MulticastUdpTransport::doSend(Transport::Packet&& packet)
+MulticastUdpTransport::doSend(const Block& packet, const EndpointId&)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
-  m_sendSocket.async_send_to(boost::asio::buffer(packet.packet), m_multicastGroup,
-                             // packet.packet is copied into the lambda to retain the underlying Buffer
-                             [this, p = packet.packet] (auto&&... args) {
+  m_sendSocket.async_send_to(boost::asio::buffer(packet), m_multicastGroup,
+                             // 'packet' is copied into the lambda to retain the underlying Buffer
+                             [this, packet] (auto&&... args) {
                                this->handleSend(std::forward<decltype(args)>(args)...);
                              });
 }
diff --git a/daemon/face/multicast-udp-transport.hpp b/daemon/face/multicast-udp-transport.hpp
index bea7cb4..c85df82 100644
--- a/daemon/face/multicast-udp-transport.hpp
+++ b/daemon/face/multicast-udp-transport.hpp
@@ -52,11 +52,7 @@
   class Error : public std::runtime_error
   {
   public:
-    explicit
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
+    using std::runtime_error::runtime_error;
   };
 
   /**
@@ -88,7 +84,7 @@
 
 private:
   void
-  doSend(Transport::Packet&& packet) final;
+  doSend(const Block& packet, const EndpointId& endpoint) final;
 
   void
   doClose() final;
diff --git a/daemon/face/null-link-service.hpp b/daemon/face/null-link-service.hpp
index d31304b..3823d9a 100644
--- a/daemon/face/null-link-service.hpp
+++ b/daemon/face/null-link-service.hpp
@@ -52,7 +52,7 @@
   }
 
   void
-  doReceivePacket(Transport::Packet&&) final
+  doReceivePacket(const Block&, const EndpointId&) final
   {
   }
 };
diff --git a/daemon/face/null-transport.hpp b/daemon/face/null-transport.hpp
index 9f8e54e..303b1e8 100644
--- a/daemon/face/null-transport.hpp
+++ b/daemon/face/null-transport.hpp
@@ -51,7 +51,7 @@
 
 private:
   void
-  doSend(Packet&&) OVERRIDE_WITH_TESTS_ELSE_FINAL
+  doSend(const Block&, const EndpointId&) OVERRIDE_WITH_TESTS_ELSE_FINAL
   {
   }
 };
diff --git a/daemon/face/stream-transport.hpp b/daemon/face/stream-transport.hpp
index e0a7d6d..04941b5 100644
--- a/daemon/face/stream-transport.hpp
+++ b/daemon/face/stream-transport.hpp
@@ -63,7 +63,7 @@
   deferredClose();
 
   void
-  doSend(Transport::Packet&& packet) override;
+  doSend(const Block& packet, const EndpointId& endpoint) override;
 
   void
   sendFromQueue();
@@ -180,7 +180,7 @@
 
 template<class T>
 void
-StreamTransport<T>::doSend(Transport::Packet&& packet)
+StreamTransport<T>::doSend(const Block& packet, const EndpointId&)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
@@ -188,8 +188,8 @@
     return;
 
   bool wasQueueEmpty = m_sendQueue.empty();
-  m_sendQueue.push(packet.packet);
-  m_sendQueueBytes += packet.packet.size();
+  m_sendQueue.push(packet);
+  m_sendQueueBytes += packet.size();
 
   if (wasQueueEmpty)
     sendFromQueue();
@@ -255,7 +255,7 @@
     offset += element.size();
     BOOST_ASSERT(offset <= m_receiveBufferSize);
 
-    this->receive(Transport::Packet(std::move(element)));
+    this->receive(element);
   }
 
   if (!isOk && m_receiveBufferSize == ndn::MAX_NDN_PACKET_SIZE && offset == 0) {
diff --git a/daemon/face/transport.cpp b/daemon/face/transport.cpp
index e93480f..7b1bb18 100644
--- a/daemon/face/transport.cpp
+++ b/daemon/face/transport.cpp
@@ -52,12 +52,6 @@
   }
 }
 
-Transport::Packet::Packet(Block&& packet1)
-  : packet(std::move(packet1))
-  , remoteEndpoint(0)
-{
-}
-
 Transport::Transport()
   : m_face(nullptr)
   , m_service(nullptr)
@@ -97,10 +91,11 @@
 }
 
 void
-Transport::send(Packet&& packet)
+Transport::send(const Block& packet, const EndpointId& endpoint)
 {
+  BOOST_ASSERT(packet.isValid());
   BOOST_ASSERT(this->getMtu() == MTU_UNLIMITED ||
-               packet.packet.size() <= static_cast<size_t>(this->getMtu()));
+               packet.size() <= static_cast<size_t>(this->getMtu()));
 
   TransportState state = this->getState();
   if (state != TransportState::UP && state != TransportState::DOWN) {
@@ -110,22 +105,23 @@
 
   if (state == TransportState::UP) {
     ++this->nOutPackets;
-    this->nOutBytes += packet.packet.size();
+    this->nOutBytes += packet.size();
   }
 
-  this->doSend(std::move(packet));
+  this->doSend(packet, endpoint);
 }
 
 void
-Transport::receive(Packet&& packet)
+Transport::receive(const Block& packet, const EndpointId& endpoint)
 {
+  BOOST_ASSERT(packet.isValid());
   BOOST_ASSERT(this->getMtu() == MTU_UNLIMITED ||
-               packet.packet.size() <= static_cast<size_t>(this->getMtu()));
+               packet.size() <= static_cast<size_t>(this->getMtu()));
 
   ++this->nInPackets;
-  this->nInBytes += packet.packet.size();
+  this->nInBytes += packet.size();
 
-  m_service->receivePacket(std::move(packet));
+  m_service->receivePacket(packet, endpoint);
 }
 
 bool
diff --git a/daemon/face/transport.hpp b/daemon/face/transport.hpp
index aaea75a..2dd81a0 100644
--- a/daemon/face/transport.hpp
+++ b/daemon/face/transport.hpp
@@ -37,11 +37,19 @@
 class Face;
 class LinkService;
 
-/** \brief identifies an endpoint on the link
+/** \brief Identifies a remote endpoint on the link.
+ *
+ *  This ID is only meaningful in the context of the same Transport.
+ *  Incoming packets from the same remote endpoint have the same EndpointId,
+ *  and incoming packets from different remote endpoints have different EndpointIds.
+ *
+ *  Typically, a point-to-point Transport has only one meaningful EndpointId (usually 0).
+ *
+ *  \sa FaceEndpoint
  */
-typedef uint64_t EndpointId;
+using EndpointId = uint64_t;
 
-/** \brief indicates the state of a transport
+/** \brief Indicates the state of a transport.
  */
 enum class TransportState {
   NONE,
@@ -55,9 +63,9 @@
 std::ostream&
 operator<<(std::ostream& os, TransportState state);
 
-/** \brief counters provided by Transport
- *  \note The type name 'TransportCounters' is implementation detail.
- *        Use 'Transport::Counters' in public API.
+/** \brief Counters provided by a transport.
+ *  \note The type name TransportCounters is an implementation detail.
+ *        Use Transport::Counters in public API.
  */
 class TransportCounters
 {
@@ -111,43 +119,20 @@
  */
 const ssize_t QUEUE_ERROR = -2;
 
-/** \brief the lower part of a Face
+/** \brief The lower half of a Face.
  *  \sa Face
  */
 class Transport : protected virtual TransportCounters, noncopyable
 {
 public:
-  /** \brief stores a packet along with the remote endpoint
+  /** \brief Counters provided by a transport.
+   *  \sa TransportCounters
    */
-  class Packet
-  {
-  public:
-    Packet() = default;
+  using Counters = TransportCounters;
 
-    explicit
-    Packet(Block&& packet);
-
-  public:
-    /** \brief the packet as a TLV block
-     */
-    Block packet;
-
-    /** \brief identifies the remote endpoint
-     *
-     *  This ID is only meaningful in the context of the same Transport.
-     *  Incoming packets from the same remote endpoint have the same EndpointId,
-     *  and incoming packets from different remote endpoints have different EndpointIds.
-     */
-    EndpointId remoteEndpoint;
-  };
-
-  /** \brief counters provided by Transport
-   */
-  typedef TransportCounters Counters;
-
-  /** \brief constructor
+  /** \brief Default constructor.
    *
-   *  Transport constructor initializes static properties to invalid values.
+   *  This constructor initializes static properties to invalid values.
    *  Subclass constructor must explicitly set every static property.
    *
    *  This constructor initializes TransportState to UP;
@@ -184,7 +169,7 @@
   getCounters() const;
 
 public: // upper interface
-  /** \brief request the transport to be closed
+  /** \brief Request the transport to be closed
    *
    *  This operation is effective only if transport is in UP or DOWN state,
    *  otherwise it has no effect.
@@ -195,12 +180,14 @@
   void
   close();
 
-  /** \brief send a link-layer packet
-   *  \note This operation has no effect if \p getState() is neither UP nor DOWN
-   *  \warning undefined behavior if packet size exceeds MTU limit
+  /** \brief Send a link-layer packet
+   *  \param packet the packet to be sent, must be a valid and well-formed TLV block
+   *  \param endpoint the destination endpoint
+   *  \note This operation has no effect if getState() is neither UP nor DOWN
+   *  \warning Behavior is undefined if packet size exceeds the MTU limit
    */
   void
-  send(Packet&& packet);
+  send(const Block& packet, const EndpointId& endpoint = 0);
 
 public: // static properties
   /** \return a FaceUri representing local endpoint
@@ -239,7 +226,7 @@
   void
   setPersistency(ndn::nfd::FacePersistency newPersistency);
 
-  /** \return whether face is point-to-point or multi-access
+  /** \return the link type of the transport
    */
   ndn::nfd::LinkType
   getLinkType() const;
@@ -290,11 +277,13 @@
   }
 
 protected: // upper interface to be invoked by subclass
-  /** \brief receive a link-layer packet
-   *  \warning undefined behavior if packet size exceeds MTU limit
+  /** \brief Pass a received link-layer packet to the upper layer for further processing
+   *  \param packet the received packet, must be a valid and well-formed TLV block
+   *  \param endpoint the source endpoint
+   *  \warning Behavior is undefined if packet size exceeds the MTU limit
    */
   void
-  receive(Packet&& packet);
+  receive(const Block& packet, const EndpointId& endpoint = 0);
 
 protected: // properties to be set by subclass
   void
@@ -360,11 +349,12 @@
 
 private: // to be overridden by subclass
   /** \brief performs Transport specific operations to send a packet
-   *  \param packet the packet, which must be a well-formed TLV block
-   *  \pre state is either UP or DOWN
+   *  \param packet the packet to be sent, can be assumed to be valid and well-formed
+   *  \param endpoint the destination endpoint
+   *  \pre transport state is either UP or DOWN
    */
   virtual void
-  doSend(Packet&& packet) = 0;
+  doSend(const Block& packet, const EndpointId& endpoint) = 0;
 
 public:
   /** \brief minimum MTU that may be set on a transport
diff --git a/daemon/face/websocket-transport.cpp b/daemon/face/websocket-transport.cpp
index d20e54c..bd45711 100644
--- a/daemon/face/websocket-transport.cpp
+++ b/daemon/face/websocket-transport.cpp
@@ -78,17 +78,17 @@
 }
 
 void
-WebSocketTransport::doSend(Transport::Packet&& packet)
+WebSocketTransport::doSend(const Block& packet, const EndpointId&)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
   websocketpp::lib::error_code error;
-  m_server.send(m_handle, packet.packet.wire(), packet.packet.size(),
+  m_server.send(m_handle, packet.wire(), packet.size(),
                 websocketpp::frame::opcode::binary, error);
   if (error)
     return processErrorCode(error);
 
-  NFD_LOG_FACE_TRACE("Successfully sent: " << packet.packet.size() << " bytes");
+  NFD_LOG_FACE_TRACE("Successfully sent: " << packet.size() << " bytes");
 }
 
 void
@@ -104,7 +104,7 @@
     return;
   }
 
-  this->receive(Transport::Packet(std::move(element)));
+  this->receive(element);
 }
 
 void
diff --git a/daemon/face/websocket-transport.hpp b/daemon/face/websocket-transport.hpp
index 0bdadb5..10f4b2a 100644
--- a/daemon/face/websocket-transport.hpp
+++ b/daemon/face/websocket-transport.hpp
@@ -83,7 +83,7 @@
 
 private:
   void
-  doSend(Transport::Packet&& packet) final;
+  doSend(const Block& packet, const EndpointId& endpoint) final;
 
   void
   schedulePing();
