face: deduplicate received LpPackets with reliability

refs #5079

Change-Id: I19ad959ba736253a750997fa468d419c93425686
diff --git a/daemon/face/lp-reliability.hpp b/daemon/face/lp-reliability.hpp
index ad7c968..1ea2b9a 100644
--- a/daemon/face/lp-reliability.hpp
+++ b/daemon/face/lp-reliability.hpp
@@ -93,8 +93,9 @@
 
   /** \brief extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue
    *  \param pkt incoming LpPacket
+   *  \return whether incoming LpPacket is new and not a duplicate
    */
-  void
+  bool
   processIncomingPacket(const lp::Packet& pkt);
 
   /** \brief called by GenericLinkService to attach Acks onto an outgoing LpPacket
@@ -139,7 +140,7 @@
    *  \return vector of the TxSequences of fragments removed due to a network packet being removed
    */
   std::vector<lp::Sequence>
-  onLpPacketLost(lp::Sequence txSeq);
+  onLpPacketLost(lp::Sequence txSeq, bool isTimeout);
 
   /** \brief remove the fragment with the given sequence number from the map of unacknowledged
    *         fragments, as well as its associated network packet (if any)
@@ -210,6 +211,8 @@
    */
   UnackedFrags::iterator m_firstUnackedFrag;
   std::queue<lp::Sequence> m_ackQueue;
+  std::map<lp::Sequence, time::steady_clock::TimePoint> m_recentRecvSeqs;
+  std::queue<lp::Sequence> m_recentRecvSeqsQueue;
   lp::Sequence m_lastTxSeqNo;
   scheduler::ScopedEventId m_idleAckTimer;
   ndn::util::RttEstimator m_rttEst;