diff --git a/daemon/fw/face-endpoint.hpp b/daemon/face/face-endpoint.hpp
similarity index 92%
rename from daemon/fw/face-endpoint.hpp
rename to daemon/face/face-endpoint.hpp
index acfbc2e..cf2c466 100644
--- a/daemon/fw/face-endpoint.hpp
+++ b/daemon/face/face-endpoint.hpp
@@ -23,10 +23,10 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NFD_DAEMON_FW_FACE_ENDPOINT_HPP
-#define NFD_DAEMON_FW_FACE_ENDPOINT_HPP
+#ifndef NFD_DAEMON_FACE_FACE_ENDPOINT_HPP
+#define NFD_DAEMON_FACE_FACE_ENDPOINT_HPP
 
-#include "face/face.hpp"
+#include "face.hpp"
 
 namespace nfd {
 
@@ -54,4 +54,4 @@
 
 } // namespace nfd
 
-#endif // NFD_DAEMON_FW_FACE_ENDPOINT_HPP
\ No newline at end of file
+#endif // NFD_DAEMON_FACE_FACE_ENDPOINT_HPP
diff --git a/daemon/face/face.hpp b/daemon/face/face.hpp
index 440bb4d..e96bc31 100644
--- a/daemon/face/face.hpp
+++ b/daemon/face/face.hpp
@@ -76,32 +76,32 @@
   getTransport() const;
 
 public: // upper interface connected to forwarding
-  /** \brief sends Interest on Face
+  /** \brief send Interest to \p endpointId
    */
   void
-  sendInterest(const Interest& interest);
+  sendInterest(const Interest& interest, const EndpointId& endpointId);
 
-  /** \brief sends Data on Face
+  /** \brief send Data to \p endpointId
    */
   void
-  sendData(const Data& data);
+  sendData(const Data& data, const EndpointId& endpointId);
 
-  /** \brief sends Nack on Face
+  /** \brief send Nack to \p endpointId
    */
   void
-  sendNack(const lp::Nack& nack);
+  sendNack(const lp::Nack& nack, const EndpointId& endpointId);
 
   /** \brief signals on Interest received
    */
-  signal::Signal<LinkService, Interest>& afterReceiveInterest;
+  signal::Signal<LinkService, Interest, EndpointId>& afterReceiveInterest;
 
   /** \brief signals on Data received
    */
-  signal::Signal<LinkService, Data>& afterReceiveData;
+  signal::Signal<LinkService, Data, EndpointId>& afterReceiveData;
 
   /** \brief signals on Nack received
    */
-  signal::Signal<LinkService, lp::Nack>& afterReceiveNack;
+  signal::Signal<LinkService, lp::Nack, EndpointId>& afterReceiveNack;
 
   /** \brief signals on Interest dropped by reliability system for exceeding allowed number of retx
    */
@@ -201,21 +201,21 @@
 }
 
 inline void
-Face::sendInterest(const Interest& interest)
+Face::sendInterest(const Interest& interest, const EndpointId& endpointId)
 {
-  m_service->sendInterest(interest);
+  m_service->sendInterest(interest, endpointId);
 }
 
 inline void
-Face::sendData(const Data& data)
+Face::sendData(const Data& data, const EndpointId& endpointId)
 {
-  m_service->sendData(data);
+  m_service->sendData(data, endpointId);
 }
 
 inline void
-Face::sendNack(const lp::Nack& nack)
+Face::sendNack(const lp::Nack& nack, const EndpointId& endpointId)
 {
-  m_service->sendNack(nack);
+  m_service->sendNack(nack, endpointId);
 }
 
 inline FaceId
diff --git a/daemon/face/generic-link-service.cpp b/daemon/face/generic-link-service.cpp
index 55ec6ee..09b874c 100644
--- a/daemon/face/generic-link-service.cpp
+++ b/daemon/face/generic-link-service.cpp
@@ -65,15 +65,15 @@
 }
 
 void
-GenericLinkService::requestIdlePacket()
+GenericLinkService::requestIdlePacket(const EndpointId& endpointId)
 {
   // No need to request Acks to attach to this packet from LpReliability, as they are already
   // attached in sendLpPacket
-  this->sendLpPacket({});
+  this->sendLpPacket({}, endpointId);
 }
 
 void
-GenericLinkService::sendLpPacket(lp::Packet&& pkt)
+GenericLinkService::sendLpPacket(lp::Packet&& pkt, const EndpointId& endpointId)
 {
   const ssize_t mtu = this->getTransport()->getMtu();
 
@@ -91,38 +91,38 @@
     NFD_LOG_FACE_WARN("attempted to send packet over MTU limit");
     return;
   }
-  this->sendPacket(std::move(tp));
+  this->sendPacket(std::move(tp), endpointId);
 }
 
 void
-GenericLinkService::doSendInterest(const Interest& interest)
+GenericLinkService::doSendInterest(const Interest& interest, const EndpointId& endpointId)
 {
   lp::Packet lpPacket(interest.wireEncode());
 
   encodeLpFields(interest, lpPacket);
 
-  this->sendNetPacket(std::move(lpPacket), true);
+  this->sendNetPacket(std::move(lpPacket), endpointId, true);
 }
 
 void
-GenericLinkService::doSendData(const Data& data)
+GenericLinkService::doSendData(const Data& data, const EndpointId& endpointId)
 {
   lp::Packet lpPacket(data.wireEncode());
 
   encodeLpFields(data, lpPacket);
 
-  this->sendNetPacket(std::move(lpPacket), false);
+  this->sendNetPacket(std::move(lpPacket), endpointId, false);
 }
 
 void
-GenericLinkService::doSendNack(const lp::Nack& nack)
+GenericLinkService::doSendNack(const lp::Nack& nack, const EndpointId& endpointId)
 {
   lp::Packet lpPacket(nack.getInterest().wireEncode());
   lpPacket.add<lp::NackField>(nack.getHeader());
 
   encodeLpFields(nack, lpPacket);
 
-  this->sendNetPacket(std::move(lpPacket), false);
+  this->sendNetPacket(std::move(lpPacket), endpointId, false);
 }
 
 void
@@ -154,7 +154,7 @@
 }
 
 void
-GenericLinkService::sendNetPacket(lp::Packet&& pkt, bool isInterest)
+GenericLinkService::sendNetPacket(lp::Packet&& pkt, const EndpointId& endpointId, bool isInterest)
 {
   std::vector<lp::Packet> frags;
   ssize_t mtu = this->getTransport()->getMtu();
@@ -206,7 +206,7 @@
   }
 
   for (lp::Packet& frag : frags) {
-    this->sendLpPacket(std::move(frag));
+    this->sendLpPacket(std::move(frag), endpointId);
   }
 }
 
@@ -302,7 +302,7 @@
     std::tie(isReassembled, netPkt, firstPkt) = m_reassembler.receiveFragment(packet.remoteEndpoint,
                                                                               pkt);
     if (isReassembled) {
-      this->decodeNetPacket(netPkt, firstPkt);
+      this->decodeNetPacket(netPkt, firstPkt, packet.remoteEndpoint);
     }
   }
   catch (const tlv::Error& e) {
@@ -312,20 +312,21 @@
 }
 
 void
-GenericLinkService::decodeNetPacket(const Block& netPkt, const lp::Packet& firstPkt)
+GenericLinkService::decodeNetPacket(const Block& netPkt, const lp::Packet& firstPkt,
+                                    const EndpointId& endpointId)
 {
   try {
     switch (netPkt.type()) {
       case tlv::Interest:
         if (firstPkt.has<lp::NackField>()) {
-          this->decodeNack(netPkt, firstPkt);
+          this->decodeNack(netPkt, firstPkt, endpointId);
         }
         else {
-          this->decodeInterest(netPkt, firstPkt);
+          this->decodeInterest(netPkt, firstPkt, endpointId);
         }
         break;
       case tlv::Data:
-        this->decodeData(netPkt, firstPkt);
+        this->decodeData(netPkt, firstPkt, endpointId);
         break;
       default:
         ++this->nInNetInvalid;
@@ -340,7 +341,8 @@
 }
 
 void
-GenericLinkService::decodeInterest(const Block& netPkt, const lp::Packet& firstPkt)
+GenericLinkService::decodeInterest(const Block& netPkt, const lp::Packet& firstPkt,
+                                   const EndpointId& endpointId)
 {
   BOOST_ASSERT(netPkt.type() == tlv::Interest);
   BOOST_ASSERT(!firstPkt.has<lp::NackField>());
@@ -387,11 +389,12 @@
     return;
   }
 
-  this->receiveInterest(*interest);
+  this->receiveInterest(*interest, endpointId);
 }
 
 void
-GenericLinkService::decodeData(const Block& netPkt, const lp::Packet& firstPkt)
+GenericLinkService::decodeData(const Block& netPkt, const lp::Packet& firstPkt,
+                               const EndpointId& endpointId)
 {
   BOOST_ASSERT(netPkt.type() == tlv::Data);
 
@@ -440,11 +443,12 @@
     }
   }
 
-  this->receiveData(*data);
+  this->receiveData(*data, endpointId);
 }
 
 void
-GenericLinkService::decodeNack(const Block& netPkt, const lp::Packet& firstPkt)
+GenericLinkService::decodeNack(const Block& netPkt, const lp::Packet& firstPkt,
+                               const EndpointId& endpointId)
 {
   BOOST_ASSERT(netPkt.type() == tlv::Interest);
   BOOST_ASSERT(firstPkt.has<lp::NackField>());
@@ -484,7 +488,7 @@
     return;
   }
 
-  this->receiveNack(nack);
+  this->receiveNack(nack, endpointId);
 }
 
 } // namespace face
diff --git a/daemon/face/generic-link-service.hpp b/daemon/face/generic-link-service.hpp
index c440932..c28b9ef 100644
--- a/daemon/face/generic-link-service.hpp
+++ b/daemon/face/generic-link-service.hpp
@@ -173,28 +173,27 @@
   /** \brief request an IDLE packet to transmit pending service fields
    */
   void
-  requestIdlePacket();
+  requestIdlePacket(const EndpointId& endpointId);
 
-  /** \brief send an LpPacket fragment
-   *  \param pkt LpPacket to send
+  /** \brief send an LpPacket to \p endpointId
    */
   void
-  sendLpPacket(lp::Packet&& pkt);
+  sendLpPacket(lp::Packet&& pkt, const EndpointId& endpointId);
 
   /** \brief send Interest
    */
   void
-  doSendInterest(const Interest& interest) OVERRIDE_WITH_TESTS_ELSE_FINAL;
+  doSendInterest(const Interest& interest, const EndpointId& endpointId) OVERRIDE_WITH_TESTS_ELSE_FINAL;
 
   /** \brief send Data
    */
   void
-  doSendData(const Data& data) OVERRIDE_WITH_TESTS_ELSE_FINAL;
+  doSendData(const Data& data, const EndpointId& endpointId) OVERRIDE_WITH_TESTS_ELSE_FINAL;
 
   /** \brief send Nack
    */
   void
-  doSendNack(const ndn::lp::Nack& nack) OVERRIDE_WITH_TESTS_ELSE_FINAL;
+  doSendNack(const ndn::lp::Nack& nack, const EndpointId& endpointId) OVERRIDE_WITH_TESTS_ELSE_FINAL;
 
 private: // send path
   /** \brief encode link protocol fields from tags onto an outgoing LpPacket
@@ -206,10 +205,11 @@
 
   /** \brief send a complete network layer packet
    *  \param pkt LpPacket containing a complete network layer packet
+   *  \param endpointId destination endpoint to which LpPacket will be sent
    *  \param isInterest whether the network layer packet is an Interest
    */
   void
-  sendNetPacket(lp::Packet&& pkt, bool isInterest);
+  sendNetPacket(lp::Packet&& pkt, const EndpointId& endpointId, bool isInterest);
 
   /** \brief assign a sequence number to an LpPacket
    */
@@ -237,16 +237,18 @@
   /** \brief decode incoming network-layer packet
    *  \param netPkt reassembled network-layer packet
    *  \param firstPkt LpPacket of first fragment
+   *  \param endpointId endpoint of peer who sent the packet
    *
    *  If decoding is successful, a receive signal is emitted;
    *  otherwise, a warning is logged.
    */
   void
-  decodeNetPacket(const Block& netPkt, const lp::Packet& firstPkt);
+  decodeNetPacket(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
 
   /** \brief decode incoming Interest
    *  \param netPkt reassembled network-layer packet; TLV-TYPE must be Interest
    *  \param firstPkt LpPacket of first fragment; must not have Nack field
+   *  \param endpointId endpoint of peer who sent the Interest
    *
    *  If decoding is successful, receiveInterest signal is emitted;
    *  otherwise, a warning is logged.
@@ -254,11 +256,12 @@
    *  \throw tlv::Error parse error in an LpHeader field
    */
   void
-  decodeInterest(const Block& netPkt, const lp::Packet& firstPkt);
+  decodeInterest(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
 
   /** \brief decode incoming Interest
    *  \param netPkt reassembled network-layer packet; TLV-TYPE must be Data
    *  \param firstPkt LpPacket of first fragment
+   *  \param endpointId endpoint of peer who sent the Data
    *
    *  If decoding is successful, receiveData signal is emitted;
    *  otherwise, a warning is logged.
@@ -266,11 +269,12 @@
    *  \throw tlv::Error parse error in an LpHeader field
    */
   void
-  decodeData(const Block& netPkt, const lp::Packet& firstPkt);
+  decodeData(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
 
   /** \brief decode incoming Interest
    *  \param netPkt reassembled network-layer packet; TLV-TYPE must be Interest
    *  \param firstPkt LpPacket of first fragment; must have Nack field
+   *  \param endpointId endpoint of peer who sent the Nack
    *
    *  If decoding is successful, receiveNack signal is emitted;
    *  otherwise, a warning is logged.
@@ -278,7 +282,7 @@
    *  \throw tlv::Error parse error in an LpHeader field
    */
   void
-  decodeNack(const Block& netPkt, const lp::Packet& firstPkt);
+  decodeNack(const Block& netPkt, const lp::Packet& firstPkt, const EndpointId& endpointId);
 
 PROTECTED_WITH_TESTS_ELSE_PRIVATE:
   Options m_options;
diff --git a/daemon/face/link-service.cpp b/daemon/face/link-service.cpp
index c5dcdfc..34abd58 100644
--- a/daemon/face/link-service.cpp
+++ b/daemon/face/link-service.cpp
@@ -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,
@@ -52,66 +52,66 @@
 }
 
 void
-LinkService::sendInterest(const Interest& interest)
+LinkService::sendInterest(const Interest& interest, const EndpointId& endpointId)
 {
   BOOST_ASSERT(m_transport != nullptr);
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nOutInterests;
 
-  doSendInterest(interest);
+  doSendInterest(interest, endpointId);
 }
 
 void
-LinkService::sendData(const Data& data)
+LinkService::sendData(const Data& data, const EndpointId& endpointId)
 {
   BOOST_ASSERT(m_transport != nullptr);
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nOutData;
 
-  doSendData(data);
+  doSendData(data, endpointId);
 }
 
 void
-LinkService::sendNack(const ndn::lp::Nack& nack)
+LinkService::sendNack(const ndn::lp::Nack& nack, const EndpointId& endpointId)
 {
   BOOST_ASSERT(m_transport != nullptr);
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nOutNacks;
 
-  doSendNack(nack);
+  doSendNack(nack, endpointId);
 }
 
 void
-LinkService::receiveInterest(const Interest& interest)
+LinkService::receiveInterest(const Interest& interest, const EndpointId& endpointId)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nInInterests;
 
-  afterReceiveInterest(interest);
+  afterReceiveInterest(interest, endpointId);
 }
 
 void
-LinkService::receiveData(const Data& data)
+LinkService::receiveData(const Data& data, const EndpointId& endpointId)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nInData;
 
-  afterReceiveData(data);
+  afterReceiveData(data, endpointId);
 }
 
 void
-LinkService::receiveNack(const ndn::lp::Nack& nack)
+LinkService::receiveNack(const ndn::lp::Nack& nack, const EndpointId& endpointId)
 {
   NFD_LOG_FACE_TRACE(__func__);
 
   ++this->nInNacks;
 
-  afterReceiveNack(nack);
+  afterReceiveNack(nack, endpointId);
 }
 
 void
diff --git a/daemon/face/link-service.hpp b/daemon/face/link-service.hpp
index 0caa857..fd77391 100644
--- a/daemon/face/link-service.hpp
+++ b/daemon/face/link-service.hpp
@@ -112,35 +112,35 @@
   getCounters() const;
 
 public: // upper interface to be used by forwarding
-  /** \brief send Interest
+  /** \brief send Interest to \p endpointId
    *  \pre setTransport has been called
    */
   void
-  sendInterest(const Interest& interest);
+  sendInterest(const Interest& interest, const EndpointId& endpointId);
 
-  /** \brief send Data
+  /** \brief send Data to \p endpointId
    *  \pre setTransport has been called
    */
   void
-  sendData(const Data& data);
+  sendData(const Data& data, const EndpointId& endpointId);
 
-  /** \brief send Nack
+  /** \brief send Nack to \p endpointId
    *  \pre setTransport has been called
    */
   void
-  sendNack(const ndn::lp::Nack& nack);
+  sendNack(const ndn::lp::Nack& nack, const EndpointId& endpointId);
 
   /** \brief signals on Interest received
    */
-  signal::Signal<LinkService, Interest> afterReceiveInterest;
+  signal::Signal<LinkService, Interest, EndpointId> afterReceiveInterest;
 
   /** \brief signals on Data received
    */
-  signal::Signal<LinkService, Data> afterReceiveData;
+  signal::Signal<LinkService, Data, EndpointId> afterReceiveData;
 
   /** \brief signals on Nack received
    */
-  signal::Signal<LinkService, lp::Nack> afterReceiveNack;
+  signal::Signal<LinkService, lp::Nack, EndpointId> afterReceiveNack;
 
   /** \brief signals on Interest dropped by reliability system for exceeding allowed number of retx
    */
@@ -156,43 +156,43 @@
   /** \brief delivers received Interest to forwarding
    */
   void
-  receiveInterest(const Interest& interest);
+  receiveInterest(const Interest& interest, const EndpointId& endpointId);
 
   /** \brief delivers received Data to forwarding
    */
   void
-  receiveData(const Data& data);
+  receiveData(const Data& data, const EndpointId& endpointId);
 
   /** \brief delivers received Nack to forwarding
    */
   void
-  receiveNack(const lp::Nack& nack);
+  receiveNack(const lp::Nack& nack, const EndpointId& endpointId);
 
 protected: // lower interface to be invoked in subclass (send path termination)
-  /** \brief sends a lower-layer packet via Transport
+  /** \brief send a lower-layer packet via Transport to \p endpointId
    */
   void
-  sendPacket(Transport::Packet&& packet);
+  sendPacket(Transport::Packet&& packet, const EndpointId& endpointId);
 
 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
+  /** \brief performs LinkService specific operations to send an Interest to \p endpointId
    */
   virtual void
-  doSendInterest(const Interest& interest) = 0;
+  doSendInterest(const Interest& interest, const EndpointId& endpointId) = 0;
 
-  /** \brief performs LinkService specific operations to send a Data
+  /** \brief performs LinkService specific operations to send a Data to \p endpointId
    */
   virtual void
-  doSendData(const Data& data) = 0;
+  doSendData(const Data& data, const EndpointId& endpointId) = 0;
 
-  /** \brief performs LinkService specific operations to send a Nack
+  /** \brief performs LinkService specific operations to send a Nack to \p endpointId
    */
   virtual void
-  doSendNack(const lp::Nack& nack) = 0;
+  doSendNack(const lp::Nack& nack, const EndpointId& endpointId) = 0;
 
 private: // lower interface to be overridden in subclass
   virtual void
@@ -234,8 +234,9 @@
 }
 
 inline void
-LinkService::sendPacket(Transport::Packet&& packet)
+LinkService::sendPacket(Transport::Packet&& packet, const EndpointId& endpointId)
 {
+  packet.remoteEndpoint = endpointId;
   m_transport->send(std::move(packet));
 }
 
diff --git a/daemon/face/lp-reliability.cpp b/daemon/face/lp-reliability.cpp
index 7f7ee14..f19f713 100644
--- a/daemon/face/lp-reliability.cpp
+++ b/daemon/face/lp-reliability.cpp
@@ -202,7 +202,7 @@
 
   m_idleAckTimer = getScheduler().schedule(m_options.idleAckTimerPeriod, [this] {
     while (!m_ackQueue.empty()) {
-      m_linkService->requestIdlePacket();
+      m_linkService->requestIdlePacket(0);
     }
 
     m_isIdleAckTimerRunning = false;
@@ -302,7 +302,7 @@
     deleteUnackedFrag(txSeqIt);
 
     // Retransmit fragment
-    m_linkService->sendLpPacket(lp::Packet(newTxFrag.pkt));
+    m_linkService->sendLpPacket(lp::Packet(newTxFrag.pkt), 0);
 
     // Start RTO timer for this sequence
     newTxFrag.rtoTimer = getScheduler().schedule(m_rto.computeRto(), [=] { onLpPacketLost(newTxSeq); });
diff --git a/daemon/face/null-link-service.hpp b/daemon/face/null-link-service.hpp
index 7a8e8ba..d31304b 100644
--- a/daemon/face/null-link-service.hpp
+++ b/daemon/face/null-link-service.hpp
@@ -37,17 +37,17 @@
 {
 private:
   void
-  doSendInterest(const Interest&) final
+  doSendInterest(const Interest&, const EndpointId&) final
   {
   }
 
   void
-  doSendData(const Data&) final
+  doSendData(const Data&, const EndpointId&) final
   {
   }
 
   void
-  doSendNack(const lp::Nack&) final
+  doSendNack(const lp::Nack&, const EndpointId&) final
   {
   }
 
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 17751bf..b2cb4b0 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -53,16 +53,16 @@
 {
   m_faceTable.afterAdd.connect([this] (Face& face) {
     face.afterReceiveInterest.connect(
-      [this, &face] (const Interest& interest) {
-        this->startProcessInterest(FaceEndpoint(face, 0), interest);
+      [this, &face] (const Interest& interest, const EndpointId& endpointId) {
+        this->startProcessInterest(FaceEndpoint(face, endpointId), interest);
       });
     face.afterReceiveData.connect(
-      [this, &face] (const Data& data) {
-        this->startProcessData(FaceEndpoint(face, 0), data);
+      [this, &face] (const Data& data, const EndpointId& endpointId) {
+        this->startProcessData(FaceEndpoint(face, endpointId), data);
       });
     face.afterReceiveNack.connect(
-      [this, &face] (const lp::Nack& nack) {
-        this->startProcessNack(FaceEndpoint(face, 0), nack);
+      [this, &face] (const lp::Nack& nack, const EndpointId& endpointId) {
+        this->startProcessNack(FaceEndpoint(face, endpointId), nack);
       });
     face.onDroppedInterest.connect(
       [this, &face] (const Interest& interest) {
@@ -157,7 +157,7 @@
   // note: Don't enter outgoing Nack pipeline because it needs an in-record.
   lp::Nack nack(interest);
   nack.setReason(lp::NackReason::DUPLICATE);
-  ingress.face.sendNack(nack);
+  ingress.face.sendNack(nack, ingress.endpoint);
 }
 
 void
@@ -232,7 +232,7 @@
   pitEntry->insertOrUpdateOutRecord(egress.face, egress.endpoint, interest);
 
   // send Interest
-  egress.face.sendInterest(interest);
+  egress.face.sendInterest(interest, egress.endpoint);
   ++m_counters.nOutInterests;
 }
 
@@ -371,7 +371,7 @@
 }
 
 void
-Forwarder::onOutgoingData(const Data& data, FaceEndpoint egress)
+Forwarder::onOutgoingData(const Data& data, const FaceEndpoint& egress)
 {
   if (egress.face.getId() == face::INVALID_FACEID) {
     NFD_LOG_WARN("onOutgoingData out=(invalid) data=" << data.getName());
@@ -391,7 +391,7 @@
   // TODO traffic manager
 
   // send Data
-  egress.face.sendData(data);
+  egress.face.sendData(data, egress.endpoint);
   ++m_counters.nOutData;
 }
 
@@ -493,7 +493,7 @@
   pitEntry->deleteInRecord(egress.face, egress.endpoint);
 
   // send Nack on face
-  egress.face.sendNack(nackPkt);
+  egress.face.sendNack(nackPkt, egress.endpoint);
   ++m_counters.nOutNacks;
 }
 
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index 18ca483..cc1d048 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -26,10 +26,10 @@
 #ifndef NFD_DAEMON_FW_FORWARDER_HPP
 #define NFD_DAEMON_FW_FORWARDER_HPP
 
-#include "face-endpoint.hpp"
 #include "face-table.hpp"
 #include "forwarder-counters.hpp"
 #include "unsolicited-data-policy.hpp"
+#include "face/face-endpoint.hpp"
 #include "table/fib.hpp"
 #include "table/pit.hpp"
 #include "table/cs.hpp"
@@ -228,7 +228,7 @@
   /** \brief outgoing Data pipeline
    */
   VIRTUAL_WITH_TESTS void
-  onOutgoingData(const Data& data, FaceEndpoint egress);
+  onOutgoingData(const Data& data, const FaceEndpoint& egress);
 
   /** \brief incoming Nack pipeline
    */
diff --git a/tests/daemon/face/dummy-face.cpp b/tests/daemon/face/dummy-face.cpp
index 9e7e0b6..b7e74ca 100644
--- a/tests/daemon/face/dummy-face.cpp
+++ b/tests/daemon/face/dummy-face.cpp
@@ -51,21 +51,21 @@
 }
 
 void
-DummyFace::receiveInterest(const Interest& interest)
+DummyFace::receiveInterest(const Interest& interest, const EndpointId& endpointId)
 {
-  getDummyLinkService()->receiveInterest(interest);
+  getDummyLinkService()->receiveInterest(interest, endpointId);
 }
 
 void
-DummyFace::receiveData(const Data& data)
+DummyFace::receiveData(const Data& data, const EndpointId& endpointId)
 {
-  getDummyLinkService()->receiveData(data);
+  getDummyLinkService()->receiveData(data, endpointId);
 }
 
 void
-DummyFace::receiveNack(const lp::Nack& nack)
+DummyFace::receiveNack(const lp::Nack& nack, const EndpointId& endpointId)
 {
-  getDummyLinkService()->receiveNack(nack);
+  getDummyLinkService()->receiveNack(nack, endpointId);
 }
 
 DummyLinkService*
diff --git a/tests/daemon/face/dummy-face.hpp b/tests/daemon/face/dummy-face.hpp
index 387206a..94b5363 100644
--- a/tests/daemon/face/dummy-face.hpp
+++ b/tests/daemon/face/dummy-face.hpp
@@ -62,17 +62,17 @@
   /** \brief causes the face to receive an Interest
    */
   void
-  receiveInterest(const Interest& interest);
+  receiveInterest(const Interest& interest, const EndpointId& endpointId);
 
   /** \brief causes the face to receive a Data
    */
   void
-  receiveData(const Data& data);
+  receiveData(const Data& data, const EndpointId& endpointId);
 
   /** \brief causes the face to receive a Nack
    */
   void
-  receiveNack(const lp::Nack& nack);
+  receiveNack(const lp::Nack& nack, const EndpointId& endpointId);
 
   /** \brief Emitted after a network-layer packet is sent.
    *
diff --git a/tests/daemon/face/dummy-link-service.cpp b/tests/daemon/face/dummy-link-service.cpp
index 2c92a52..019e9dc 100644
--- a/tests/daemon/face/dummy-link-service.cpp
+++ b/tests/daemon/face/dummy-link-service.cpp
@@ -30,7 +30,7 @@
 namespace tests {
 
 void
-DummyLinkService::doSendInterest(const Interest& interest)
+DummyLinkService::doSendInterest(const Interest& interest, const EndpointId& endpointId)
 {
   if (m_loggingFlags & LogSentInterests)
     sentInterests.push_back(interest);
@@ -39,7 +39,7 @@
 }
 
 void
-DummyLinkService::doSendData(const Data& data)
+DummyLinkService::doSendData(const Data& data, const EndpointId& endpointId)
 {
   if (m_loggingFlags & LogSentData)
     sentData.push_back(data);
@@ -48,7 +48,7 @@
 }
 
 void
-DummyLinkService::doSendNack(const lp::Nack& nack)
+DummyLinkService::doSendNack(const lp::Nack& nack, const EndpointId& endpointId)
 {
   if (m_loggingFlags & LogSentNacks)
     sentNacks.push_back(nack);
diff --git a/tests/daemon/face/dummy-link-service.hpp b/tests/daemon/face/dummy-link-service.hpp
index 3717336..b1caf8c 100644
--- a/tests/daemon/face/dummy-link-service.hpp
+++ b/tests/daemon/face/dummy-link-service.hpp
@@ -67,13 +67,13 @@
 
 private:
   void
-  doSendInterest(const Interest& interest) final;
+  doSendInterest(const Interest& interest, const EndpointId& endpointId) final;
 
   void
-  doSendData(const Data& data) final;
+  doSendData(const Data& data, const EndpointId& endpointId) final;
 
   void
-  doSendNack(const lp::Nack& nack) final;
+  doSendNack(const lp::Nack& nack, const EndpointId& endpointId) final;
 
   void
   doReceivePacket(Transport::Packet&& packet) final;
diff --git a/tests/daemon/face/face.t.cpp b/tests/daemon/face/face.t.cpp
index 2dd3c95..165d5db 100644
--- a/tests/daemon/face/face.t.cpp
+++ b/tests/daemon/face/face.t.cpp
@@ -107,32 +107,32 @@
 
   for (size_t i = 0; i < nInInterests; ++i) {
     shared_ptr<Interest> interest = makeInterest("/JSQdqward4");
-    face1->receiveInterest(*interest);
+    face1->receiveInterest(*interest, 0);
   }
 
   for (size_t i = 0; i < nInData; ++i) {
     shared_ptr<Data> data = makeData("/hT8FDigWn1");
-    face1->receiveData(*data);
+    face1->receiveData(*data, 0);
   }
 
   for (size_t i = 0; i < nInNacks; ++i) {
     lp::Nack nack = makeNack("/StnEVTj4Ex", 561, lp::NackReason::CONGESTION);
-    face1->receiveNack(nack);
+    face1->receiveNack(nack, 0);
   }
 
   for (size_t i = 0; i < nOutInterests; ++i) {
     shared_ptr<Interest> interest = makeInterest("/XyUAFYQDmd");
-    face1->sendInterest(*interest);
+    face1->sendInterest(*interest, 0);
   }
 
   for (size_t i = 0; i < nOutData; ++i) {
     shared_ptr<Data> data = makeData("/GigPEtPH6");
-    face1->sendData(*data);
+    face1->sendData(*data, 0);
   }
 
   for (size_t i = 0; i < nOutNacks; ++i) {
     lp::Nack nack = makeNack("/9xK6FbwIBM", 365, lp::NackReason::CONGESTION);
-    face1->sendNack(nack);
+    face1->sendNack(nack, 0);
   }
 
   BOOST_CHECK_EQUAL(face1->getCounters().nInInterests, nInInterests);
diff --git a/tests/daemon/face/generic-link-service.t.cpp b/tests/daemon/face/generic-link-service.t.cpp
index 64682c0..74e388f 100644
--- a/tests/daemon/face/generic-link-service.t.cpp
+++ b/tests/daemon/face/generic-link-service.t.cpp
@@ -75,11 +75,11 @@
     transport = static_cast<DummyTransport*>(face->getTransport());
 
     face->afterReceiveInterest.connect(
-      [this] (const Interest& interest) { receivedInterests.push_back(interest); });
+      [this] (const Interest& interest, const EndpointId&) { receivedInterests.push_back(interest); });
     face->afterReceiveData.connect(
-      [this] (const Data& data) { receivedData.push_back(data); });
+      [this] (const Data& data, const EndpointId&) { receivedData.push_back(data); });
     face->afterReceiveNack.connect(
-      [this] (const lp::Nack& nack) { receivedNacks.push_back(nack); });
+      [this] (const lp::Nack& nack, const EndpointId&) { receivedNacks.push_back(nack); });
   }
 
   lp::PrefixAnnouncementHeader
@@ -112,7 +112,7 @@
 
   shared_ptr<Interest> interest1 = makeInterest("/localhost/test");
 
-  face->sendInterest(*interest1);
+  face->sendInterest(*interest1, 0);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutInterests, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -131,7 +131,7 @@
 
   shared_ptr<Data> data1 = makeData("/localhost/test");
 
-  face->sendData(*data1);
+  face->sendData(*data1, 0);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutData, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -150,7 +150,7 @@
 
   lp::Nack nack1 = makeNack("/localhost/test", 323, lp::NackReason::NO_ROUTE);
 
-  face->sendNack(nack1);
+  face->sendNack(nack1, 0);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutNacks, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -287,7 +287,7 @@
   transport->setMtu(55);
 
   shared_ptr<Data> data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data);
+  face->sendData(*data, 0);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 0);
   BOOST_CHECK_EQUAL(service->getCounters().nOutOverMtu, 1);
@@ -303,7 +303,7 @@
   transport->setMtu(MTU_UNLIMITED);
 
   shared_ptr<Data> data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data);
+  face->sendData(*data, 0);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 1);
 }
@@ -318,7 +318,7 @@
   transport->setMtu(105);
 
   shared_ptr<Data> data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data);
+  face->sendData(*data, 0);
 
   BOOST_CHECK_EQUAL(transport->sentPackets.size(), 1);
 }
@@ -333,7 +333,7 @@
   transport->setMtu(60);
 
   shared_ptr<Data> data = makeData("/test/data/123456789/987654321/123456789");
-  face->sendData(*data);
+  face->sendData(*data, 0);
 
   BOOST_CHECK_GT(transport->sentPackets.size(), 1);
 }
@@ -425,7 +425,7 @@
 
   shared_ptr<Interest> interest1 = makeInterest("/localhost/test");
 
-  face->sendInterest(*interest1);
+  face->sendInterest(*interest1, 0);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutInterests, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -445,7 +445,7 @@
 
   shared_ptr<Data> data1 = makeData("/localhost/test");
 
-  face->sendData(*data1);
+  face->sendData(*data1, 0);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutData, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -465,7 +465,7 @@
 
   lp::Nack nack1 = makeNack("/localhost/test", 323, lp::NackReason::NO_ROUTE);
 
-  face->sendNack(nack1);
+  face->sendNack(nack1, 0);
 
   BOOST_CHECK_EQUAL(service->getCounters().nOutNacks, 1);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
@@ -497,7 +497,7 @@
 
   // no congestion
   transport->setSendQueueLength(0);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet pkt1;
   BOOST_REQUIRE_NO_THROW(pkt1.wireDecode(transport->sentPackets.back().packet));
@@ -508,7 +508,7 @@
 
   // no congestion
   transport->setSendQueueLength(32768);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 2);
   lp::Packet pkt2;
   BOOST_REQUIRE_NO_THROW(pkt2.wireDecode(transport->sentPackets.back().packet));
@@ -535,7 +535,7 @@
 
   // first congested packet, will be marked
   transport->setSendQueueLength(32769);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet pkt1;
   BOOST_REQUIRE_NO_THROW(pkt1.wireDecode(transport->sentPackets.back().packet));
@@ -553,7 +553,7 @@
 
   // second congested packet, but within marking interval, will not be marked
   transport->setSendQueueLength(33000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 2);
   lp::Packet pkt2;
   BOOST_REQUIRE_NO_THROW(pkt2.wireDecode(transport->sentPackets.back().packet));
@@ -568,7 +568,7 @@
 
   // first congested packet after waiting marking interval, will be marked
   transport->setSendQueueLength(40000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 3);
   lp::Packet pkt3;
   BOOST_REQUIRE_NO_THROW(pkt3.wireDecode(transport->sentPackets.back().packet));
@@ -589,7 +589,7 @@
 
   // still congested, but within marking interval cycle
   transport->setSendQueueLength(38000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 4);
   lp::Packet pkt4;
   BOOST_REQUIRE_NO_THROW(pkt4.wireDecode(transport->sentPackets.back().packet));
@@ -604,7 +604,7 @@
 
   // still congested, after marking interval cycle
   transport->setSendQueueLength(39000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 5);
   lp::Packet pkt5;
   BOOST_REQUIRE_NO_THROW(pkt5.wireDecode(transport->sentPackets.back().packet));
@@ -624,7 +624,7 @@
 
   // still congested, but within marking interval cycle
   transport->setSendQueueLength(38000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 6);
   lp::Packet pkt6;
   BOOST_REQUIRE_NO_THROW(pkt6.wireDecode(transport->sentPackets.back().packet));
@@ -638,7 +638,7 @@
 
   // still congested, after marking interval cycle
   transport->setSendQueueLength(34000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 7);
   lp::Packet pkt7;
   BOOST_REQUIRE_NO_THROW(pkt7.wireDecode(transport->sentPackets.back().packet));
@@ -656,7 +656,7 @@
 
   // no more congestion
   transport->setSendQueueLength(30000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 8);
   lp::Packet pkt8;
   BOOST_REQUIRE_NO_THROW(pkt8.wireDecode(transport->sentPackets.back().packet));
@@ -670,7 +670,7 @@
 
   // send queue congested again, but can't mark packet because within one full interval of last mark
   transport->setSendQueueLength(50000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 9);
   lp::Packet pkt9;
   BOOST_REQUIRE_NO_THROW(pkt9.wireDecode(transport->sentPackets.back().packet));
@@ -684,7 +684,7 @@
   this->advanceClocks(51_ms);
 
   transport->setSendQueueLength(40000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 10);
   lp::Packet pkt10;
   BOOST_REQUIRE_NO_THROW(pkt10.wireDecode(transport->sentPackets.back().packet));
@@ -702,7 +702,7 @@
 
   // not marked since within 100ms window before can mark again
   transport->setSendQueueLength(50000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 11);
   lp::Packet pkt11;
   BOOST_REQUIRE_NO_THROW(pkt11.wireDecode(transport->sentPackets.back().packet));
@@ -717,7 +717,7 @@
 
   // markable packet, queue length still above threshold
   transport->setSendQueueLength(33000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 12);
   lp::Packet pkt12;
   BOOST_REQUIRE_NO_THROW(pkt12.wireDecode(transport->sentPackets.back().packet));
@@ -735,7 +735,7 @@
 
   // no more congestion
   transport->setSendQueueLength(10000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 13);
   lp::Packet pkt13;
   BOOST_REQUIRE_NO_THROW(pkt13.wireDecode(transport->sentPackets.back().packet));
@@ -750,7 +750,7 @@
 
   // start congestion again
   transport->setSendQueueLength(50000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 14);
   lp::Packet pkt14;
   BOOST_REQUIRE_NO_THROW(pkt14.wireDecode(transport->sentPackets.back().packet));
@@ -765,7 +765,7 @@
 
   // no more congestion, cancel marking interval
   transport->setSendQueueLength(5000);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 15);
   lp::Packet pkt15;
   BOOST_REQUIRE_NO_THROW(pkt15.wireDecode(transport->sentPackets.back().packet));
@@ -793,7 +793,7 @@
 
   // no congestion
   transport->setSendQueueLength(0);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet pkt1;
   BOOST_REQUIRE_NO_THROW(pkt1.wireDecode(transport->sentPackets.back().packet));
@@ -804,7 +804,7 @@
 
   // no congestion
   transport->setSendQueueLength(65536);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 2);
   lp::Packet pkt2;
   BOOST_REQUIRE_NO_THROW(pkt2.wireDecode(transport->sentPackets.back().packet));
@@ -815,7 +815,7 @@
 
   // first congested (and marked) packet
   transport->setSendQueueLength(65537);
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 3);
   lp::Packet pkt3;
   BOOST_REQUIRE_NO_THROW(pkt3.wireDecode(transport->sentPackets.back().packet));
@@ -973,7 +973,7 @@
   shared_ptr<Interest> interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::IncomingFaceIdTag>(1000));
 
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -991,7 +991,7 @@
   shared_ptr<Interest> interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::IncomingFaceIdTag>(1000));
 
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1058,7 +1058,7 @@
   shared_ptr<Interest> interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::CongestionMarkTag>(1));
 
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1071,7 +1071,7 @@
   shared_ptr<Data> data = makeData("/12345678");
   data->setTag(make_shared<lp::CongestionMarkTag>(0));
 
-  face->sendData(*data);
+  face->sendData(*data, 0);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1084,7 +1084,7 @@
   lp::Nack nack = makeNack("/localhost/test", 123, lp::NackReason::NO_ROUTE);
   nack.setTag(make_shared<lp::CongestionMarkTag>(std::numeric_limits<uint64_t>::max()));
 
-  face->sendNack(nack);
+  face->sendNack(nack, 0);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1146,7 +1146,7 @@
   shared_ptr<Interest> interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::NonDiscoveryTag>(lp::EmptyValue{}));
 
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1162,7 +1162,7 @@
   shared_ptr<Interest> interest = makeInterest("/12345678");
   interest->setTag(make_shared<lp::NonDiscoveryTag>(lp::EmptyValue{}));
 
-  face->sendInterest(*interest);
+  face->sendInterest(*interest, 0);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1250,7 +1250,7 @@
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   data->setTag(make_shared<lp::PrefixAnnouncementTag>(pah));
 
-  face->sendData(*data);
+  face->sendData(*data, 0);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
@@ -1267,7 +1267,7 @@
   auto pah = makePrefixAnnHeader("/local/ndn/prefix");
   data->setTag(make_shared<lp::PrefixAnnouncementTag>(pah));
 
-  face->sendData(*data);
+  face->sendData(*data, 0);
 
   BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
   lp::Packet sent(transport->sentPackets.back().packet);
diff --git a/tests/daemon/face/internal-face.t.cpp b/tests/daemon/face/internal-face.t.cpp
index ecd1d00..a830e3e 100644
--- a/tests/daemon/face/internal-face.t.cpp
+++ b/tests/daemon/face/internal-face.t.cpp
@@ -45,11 +45,11 @@
     std::tie(forwarderFace, clientFace) = makeInternalFace(m_keyChain);
 
     forwarderFace->afterReceiveInterest.connect(
-      [this] (const Interest& interest) { receivedInterests.push_back(interest); } );
+      [this] (const Interest& interest, const EndpointId&) { receivedInterests.push_back(interest); } );
     forwarderFace->afterReceiveData.connect(
-      [this] (const Data& data) { receivedData.push_back(data); } );
+      [this] (const Data& data, const EndpointId&) { receivedData.push_back(data); } );
     forwarderFace->afterReceiveNack.connect(
-      [this] (const lp::Nack& nack) { receivedNacks.push_back(nack); } );
+      [this] (const lp::Nack& nack, const EndpointId&) { receivedNacks.push_back(nack); } );
   }
 
 protected:
@@ -117,7 +117,7 @@
   BOOST_REQUIRE_EQUAL(receivedInterests.size(), 1);
   BOOST_CHECK_EQUAL(receivedInterests.back().getName(), "/PQstEJGdL");
 
-  forwarderFace->sendData(*makeData("/PQstEJGdL/aI7oCrDXNX"));
+  forwarderFace->sendData(*makeData("/PQstEJGdL/aI7oCrDXNX"), 0);
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasReceivedData);
@@ -140,7 +140,7 @@
   BOOST_REQUIRE_EQUAL(receivedInterests.size(), 1);
   BOOST_CHECK_EQUAL(receivedInterests.back().getName(), "/1HrsRM1X");
 
-  forwarderFace->sendNack(makeNack("/1HrsRM1X", 152, lp::NackReason::NO_ROUTE));
+  forwarderFace->sendNack(makeNack("/1HrsRM1X", 152, lp::NackReason::NO_ROUTE), 0);
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasReceivedNack);
@@ -157,7 +157,7 @@
       clientFace->put(*makeData("/Wpc8TnEeoF/f6SzV8hD/3uytUJCuIi"));
     });
 
-  forwarderFace->sendInterest(*makeInterest("/Wpc8TnEeoF/f6SzV8hD"));
+  forwarderFace->sendInterest(*makeInterest("/Wpc8TnEeoF/f6SzV8hD"), 0);
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasDeliveredInterest);
@@ -176,7 +176,7 @@
       clientFace->put(makeNack("/4YgJKWcXN/5oaTe05o", 191, lp::NackReason::NO_ROUTE));
     });
 
-  forwarderFace->sendInterest(*makeInterest("/4YgJKWcXN/5oaTe05o", 191));
+  forwarderFace->sendInterest(*makeInterest("/4YgJKWcXN/5oaTe05o", 191), 0);
   this->advanceClocks(1_ms, 10);
 
   BOOST_CHECK(hasDeliveredInterest);
@@ -210,7 +210,7 @@
   g_io.poll(); // #3248 workaround
   clientFace.reset();
 
-  forwarderFace->sendInterest(*makeInterest("/aau42XQqb"));
+  forwarderFace->sendInterest(*makeInterest("/aau42XQqb"), 0);
   BOOST_CHECK_NO_THROW(this->advanceClocks(1_ms, 10));
 }
 
diff --git a/tests/daemon/face/lp-reliability.t.cpp b/tests/daemon/face/lp-reliability.t.cpp
index f995174..2b3a48e 100644
--- a/tests/daemon/face/lp-reliability.t.cpp
+++ b/tests/daemon/face/lp-reliability.t.cpp
@@ -62,25 +62,25 @@
     }
 
     for (lp::Packet frag : frags) {
-      this->sendLpPacket(std::move(frag));
+      this->sendLpPacket(std::move(frag), 0);
     }
   }
 
 private:
   void
-  doSendInterest(const Interest&) final
+  doSendInterest(const Interest&, const EndpointId&) final
   {
     BOOST_ASSERT(false);
   }
 
   void
-  doSendData(const Data&) final
+  doSendData(const Data&, const EndpointId&) final
   {
     BOOST_ASSERT(false);
   }
 
   void
-  doSendNack(const lp::Nack&) final
+  doSendNack(const lp::Nack&, const EndpointId&) final
   {
     BOOST_ASSERT(false);
   }
diff --git a/tests/daemon/face/null-face.t.cpp b/tests/daemon/face/null-face.t.cpp
index d7f7d29..de343e0 100644
--- a/tests/daemon/face/null-face.t.cpp
+++ b/tests/daemon/face/null-face.t.cpp
@@ -74,10 +74,10 @@
   auto face = makeNullFace();
   BOOST_CHECK_EQUAL(face->getState(), FaceState::UP);
 
-  face->sendInterest(*makeInterest("/A"));
+  face->sendInterest(*makeInterest("/A"), 0);
   BOOST_CHECK_EQUAL(face->getState(), FaceState::UP);
 
-  face->sendData(*makeData("/B"));
+  face->sendData(*makeData("/B"), 0);
   BOOST_CHECK_EQUAL(face->getState(), FaceState::UP);
 }
 
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index d07d160..7325f24 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -60,7 +60,7 @@
   BOOST_CHECK_EQUAL(forwarder.getCounters().nOutInterests, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 0);
-  face1->receiveInterest(*interestAB);
+  face1->receiveInterest(*interestAB, 0);
   this->advanceClocks(100_ms, 1_s);
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
   BOOST_CHECK_EQUAL(face2->sentInterests[0].getName(), "/A/B");
@@ -73,7 +73,7 @@
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nInData, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nOutData, 0);
-  face2->receiveData(*dataABC);
+  face2->receiveData(*dataABC, 0);
   this->advanceClocks(100_ms, 1_s);
   BOOST_REQUIRE_EQUAL(face1->sentData.size(), 1);
   BOOST_CHECK_EQUAL(face1->sentData[0].getName(), "/A/B/C");
@@ -110,7 +110,7 @@
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsHits, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nCsMisses, 0);
-  face1->receiveInterest(*interestA);
+  face1->receiveInterest(*interestA, 0);
   this->advanceClocks(1_ms, 5_ms);
   // Interest matching ContentStore should not be forwarded
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 0);
@@ -170,7 +170,7 @@
   shared_ptr<Interest> interest = makeInterest("/A/B");
   interest->setTag(make_shared<lp::NextHopFaceIdTag>(face2->getId()));
 
-  face1->receiveInterest(*interest);
+  face1->receiveInterest(*interest, 0);
   this->advanceClocks(100_ms, 1_s);
   BOOST_CHECK_EQUAL(face3->sentInterests.size(), 0);
   BOOST_REQUIRE_EQUAL(face2->sentInterests.size(), 1);
@@ -501,19 +501,19 @@
   // receive Interest on face1
   face1->sentNacks.clear();
   shared_ptr<Interest> interest1a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 732);
-  face1->receiveInterest(*interest1a);
+  face1->receiveInterest(*interest1a, 0);
   BOOST_CHECK(face1->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face1: legit retransmission
   face1->sentNacks.clear();
   shared_ptr<Interest> interest1b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 732);
-  face1->receiveInterest(*interest1b);
+  face1->receiveInterest(*interest1b, 0);
   BOOST_CHECK(face1->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face2
   face2->sentNacks.clear();
   shared_ptr<Interest> interest2a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 732);
-  face2->receiveInterest(*interest2a);
+  face2->receiveInterest(*interest2a, 0);
   BOOST_REQUIRE_EQUAL(face2->sentNacks.size(), 1);
   BOOST_CHECK_EQUAL(face2->sentNacks.back().getInterest(), *interest2a);
   BOOST_CHECK_EQUAL(face2->sentNacks.back().getReason(), lp::NackReason::DUPLICATE);
@@ -521,13 +521,13 @@
   // receive Interest with new Nonce on face2
   face2->sentNacks.clear();
   shared_ptr<Interest> interest2b = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 944);
-  face2->receiveInterest(*interest2b);
+  face2->receiveInterest(*interest2b, 0);
   BOOST_CHECK(face2->sentNacks.empty());
 
   // receive Interest with duplicate Nonce on face3, don't send Nack to multi-access face
   face3->sentNacks.clear();
   shared_ptr<Interest> interest3a = makeInterest("/zT4XwK0Hnx/28JBUvbEzc", 732);
-  face3->receiveInterest(*interest3a);
+  face3->receiveInterest(*interest3a, 0);
   BOOST_CHECK(face3->sentNacks.empty());
 }
 
@@ -543,7 +543,7 @@
   face2->afterSend.connect([face1, face2] (uint32_t pktType) {
     if (pktType == tlv::Interest) {
       auto interest = make_shared<Interest>(face2->sentInterests.back());
-      getScheduler().schedule(170_ms, [face1, interest] { face1->receiveInterest(*interest); });
+      getScheduler().schedule(170_ms, [face1, interest] { face1->receiveInterest(*interest, 0); });
     }
   });
 
@@ -554,7 +554,7 @@
   shared_ptr<Interest> interest = makeInterest("ndn:/A/1");
   interest->setNonce(82101183);
   interest->setInterestLifetime(50_ms);
-  face1->receiveInterest(*interest);
+  face1->receiveInterest(*interest, 0);
 
   // interest should be forwarded only once, as long as Nonce is in Dead Nonce List
   BOOST_ASSERT(25_ms * 40 < forwarder.getDeadNonceList().getLifetime());
diff --git a/tests/daemon/fw/pit-expiry.t.cpp b/tests/daemon/fw/pit-expiry.t.cpp
index 5467c4a..94caac9 100644
--- a/tests/daemon/fw/pit-expiry.t.cpp
+++ b/tests/daemon/fw/pit-expiry.t.cpp
@@ -135,8 +135,8 @@
   interest1->setInterestLifetime(90_ms);
   interest2->setInterestLifetime(90_ms);
 
-  face1->receiveInterest(*interest1);
-  face2->receiveInterest(*interest2);
+  face1->receiveInterest(*interest1, 0);
+  face2->receiveInterest(*interest2, 0);
   BOOST_CHECK_EQUAL(pit.size(), 2);
 
   this->advanceClocks(100_ms);
@@ -158,10 +158,10 @@
   interest->setInterestLifetime(90_ms);
   shared_ptr<Data> data = makeData("/A/0");
 
-  face1->receiveInterest(*interest);
+  face1->receiveInterest(*interest, 0);
 
   this->advanceClocks(30_ms);
-  face2->receiveData(*data);
+  face2->receiveData(*data, 0);
 
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 0);
@@ -192,14 +192,14 @@
   Cs& cs = forwarder.getCs();
   cs.insert(*data);
 
-  face1->receiveInterest(*interest);
+  face1->receiveInterest(*interest, 0);
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 1);
 
   this->advanceClocks(190_ms);
   BOOST_CHECK_EQUAL(pit.size(), 0);
 
-  face1->receiveInterest(*interest);
+  face1->receiveInterest(*interest, 0);
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 0);
 }
@@ -225,13 +225,13 @@
   interest->setInterestLifetime(90_ms);
   lp::Nack nack = makeNack("/A/0", 562, lp::NackReason::CONGESTION);
 
-  face1->receiveInterest(*interest);
+  face1->receiveInterest(*interest, 0);
   auto entry = pit.find(*interest);
   entry->insertOrUpdateOutRecord(*face2, 0, *interest);
   entry->insertOrUpdateOutRecord(*face3, 0, *interest);
 
   this->advanceClocks(10_ms);
-  face2->receiveNack(nack);
+  face2->receiveNack(nack, 0);
 
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 1);
@@ -256,7 +256,7 @@
   shared_ptr<Interest> interest = makeInterest("/A/0");
   interest->setInterestLifetime(90_ms);
 
-  face->receiveInterest(*interest);
+  face->receiveInterest(*interest, 0);
   BOOST_CHECK_EQUAL(pit.size(), 1);
 
   this->advanceClocks(100_ms);
@@ -291,30 +291,30 @@
   interest2->setInterestLifetime(90_ms);
   shared_ptr<Data> data = makeData("/A/0");
 
-  face1->receiveInterest(*interest1);
-  face2->receiveInterest(*interest2);
+  face1->receiveInterest(*interest1, 0);
+  face2->receiveInterest(*interest2, 0);
   BOOST_CHECK_EQUAL(pit.size(), 2);
 
   // beforeSatisfyInterest: the first Data prolongs PIT expiry timer by 190 ms
   this->advanceClocks(30_ms);
-  face3->receiveData(*data);
+  face3->receiveData(*data, 0);
   this->advanceClocks(189_ms);
   BOOST_CHECK_EQUAL(pit.size(), 2);
   this->advanceClocks(2_ms);
   BOOST_CHECK_EQUAL(pit.size(), 0);
 
-  face1->receiveInterest(*interest1);
-  face2->receiveInterest(*interest2);
+  face1->receiveInterest(*interest1, 0);
+  face2->receiveInterest(*interest2, 0);
 
   // beforeSatisfyInterest: the second Data prolongs PIT expiry timer
   // and the third one sets the timer to now
   this->advanceClocks(30_ms);
-  face3->receiveData(*data);
+  face3->receiveData(*data, 0);
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 2);
 
   this->advanceClocks(30_ms);
-  face3->receiveData(*data);
+  face3->receiveData(*data, 0);
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 0);
 
@@ -343,27 +343,27 @@
   interest->setInterestLifetime(90_ms);
   shared_ptr<Data> data = makeData("/A/0");
 
-  face1->receiveInterest(*interest);
+  face1->receiveInterest(*interest, 0);
 
   // afterReceiveData: the first Data prolongs PIT expiry timer by 290 ms
   this->advanceClocks(30_ms);
-  face2->receiveData(*data);
+  face2->receiveData(*data, 0);
   this->advanceClocks(289_ms);
   BOOST_CHECK_EQUAL(pit.size(), 1);
   this->advanceClocks(2_ms);
   BOOST_CHECK_EQUAL(pit.size(), 0);
 
-  face1->receiveInterest(*interest);
+  face1->receiveInterest(*interest, 0);
 
   // afterReceiveData: the second Data prolongs PIT expiry timer
   // and the third one sets the timer to now
   this->advanceClocks(30_ms);
-  face2->receiveData(*data);
+  face2->receiveData(*data, 0);
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 1);
 
   this->advanceClocks(30_ms);
-  face2->receiveData(*data);
+  face2->receiveData(*data, 0);
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 0);
 
@@ -392,20 +392,20 @@
   interest->setInterestLifetime(90_ms);
   lp::Nack nack = makeNack("/A/0", 562, lp::NackReason::CONGESTION);
 
-  face1->receiveInterest(*interest);
+  face1->receiveInterest(*interest, 0);
   auto entry = pit.find(*interest);
   entry->insertOrUpdateOutRecord(*face2, 0, *interest);
   entry->insertOrUpdateOutRecord(*face3, 0, *interest);
 
   //pitEntry is not erased after receiving the first Nack
   this->advanceClocks(10_ms);
-  face2->receiveNack(nack);
+  face2->receiveNack(nack, 0);
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 1);
 
   //pitEntry is erased after receiving the second Nack
   this->advanceClocks(10_ms);
-  face3->receiveNack(nack);
+  face3->receiveNack(nack, 0);
   this->advanceClocks(1_ms);
   BOOST_CHECK_EQUAL(pit.size(), 0);
 }
diff --git a/tests/daemon/fw/topology-tester.cpp b/tests/daemon/fw/topology-tester.cpp
index 5c63f61..2c077ba 100644
--- a/tests/daemon/fw/topology-tester.cpp
+++ b/tests/daemon/fw/topology-tester.cpp
@@ -138,27 +138,27 @@
   ///\todo #3941 call GenericLinkServiceCounters constructor in TopologyPcapLinkService constructor
 
   void
-  doSendInterest(const Interest& interest) override
+  doSendInterest(const Interest& interest, const EndpointId& endpointId) override
   {
     this->sentInterests.push_back(interest);
     this->sentInterests.back().setTag(std::make_shared<TopologyPcapTimestamp>(time::steady_clock::now()));
-    this->GenericLinkService::doSendInterest(interest);
+    this->GenericLinkService::doSendInterest(interest, endpointId);
   }
 
   void
-  doSendData(const Data& data) override
+  doSendData(const Data& data, const EndpointId& endpointId) override
   {
     this->sentData.push_back(data);
     this->sentData.back().setTag(std::make_shared<TopologyPcapTimestamp>(time::steady_clock::now()));
-    this->GenericLinkService::doSendData(data);
+    this->GenericLinkService::doSendData(data, endpointId);
   }
 
   void
-  doSendNack(const lp::Nack& nack) override
+  doSendNack(const lp::Nack& nack, const EndpointId& endpointId) override
   {
     this->sentNacks.push_back(nack);
     this->sentNacks.back().setTag(std::make_shared<TopologyPcapTimestamp>(time::steady_clock::now()));
-    this->GenericLinkService::doSendNack(nack);
+    this->GenericLinkService::doSendNack(nack, endpointId);
   }
 };
 
diff --git a/tests/daemon/mgmt/face-manager-update-face.t.cpp b/tests/daemon/mgmt/face-manager-update-face.t.cpp
index a20394f..f7e89f8 100644
--- a/tests/daemon/mgmt/face-manager-update-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-update-face.t.cpp
@@ -110,7 +110,7 @@
         if (isForOnDemandFace) {
           auto face = target.faceTable.get(static_cast<FaceId>(this->faceId));
           // to force creation of on-demand face
-          face->sendInterest(*make_shared<Interest>("/hello/world"));
+          face->sendInterest(*make_shared<Interest>("/hello/world"), 0);
         }
       });
 
diff --git a/tests/other/face-benchmark.cpp b/tests/other/face-benchmark.cpp
index 1b86cd5..5c7703f 100644
--- a/tests/other/face-benchmark.cpp
+++ b/tests/other/face-benchmark.cpp
@@ -148,9 +148,15 @@
   static void
   tieFaces(const shared_ptr<Face>& face1, const shared_ptr<Face>& face2)
   {
-    face1->afterReceiveInterest.connect([face2] (const Interest& interest) { face2->sendInterest(interest); });
-    face1->afterReceiveData.connect([face2] (const Data& data) { face2->sendData(data); });
-    face1->afterReceiveNack.connect([face2] (const ndn::lp::Nack& nack) { face2->sendNack(nack); });
+    face1->afterReceiveInterest.connect([face2] (const Interest& interest, const EndpointId&) {
+      face2->sendInterest(interest, 0);
+    });
+    face1->afterReceiveData.connect([face2] (const Data& data, const EndpointId&) {
+      face2->sendData(data, 0);
+    });
+    face1->afterReceiveNack.connect([face2] (const ndn::lp::Nack& nack, const EndpointId&) {
+      face2->sendNack(nack, 0);
+    });
   }
 
   static void
