fw: use dead Nonce list in pipelines
refs #1953
Change-Id: I0faef2a985b03fe96387c2e0181588713550b9ce
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index 420bb29..5a691de 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -26,7 +26,6 @@
#ifndef NFD_DAEMON_TABLE_PIT_ENTRY_HPP
#define NFD_DAEMON_TABLE_PIT_ENTRY_HPP
-#include "pit-nonce-list.hpp"
#include "pit-in-record.hpp"
#include "pit-out-record.hpp"
#include "core/scheduler.hpp"
@@ -49,6 +48,20 @@
*/
typedef std::list<OutRecord> OutRecordCollection;
+/** \brief indicates where duplicate Nonces are found
+ */
+enum DuplicateNonceWhere {
+ DUPLICATE_NONCE_NONE = 0,
+ /// in-record of same face
+ DUPLICATE_NONCE_IN_SAME = (1 << 0),
+ /// in-record of other face
+ DUPLICATE_NONCE_IN_OTHER = (1 << 1),
+ /// out-record of same face
+ DUPLICATE_NONCE_OUT_SAME = (1 << 2),
+ /// out-record of other face
+ DUPLICATE_NONCE_OUT_OTHER = (1 << 3)
+};
+
/** \brief represents a PIT entry
*/
class Entry : public StrategyInfoHost, noncopyable
@@ -86,12 +99,11 @@
bool
violatesScope(const Face& face) const;
- /** \brief records a nonce
- *
- * \return true if nonce is new; false if nonce is seen before
+ /** \brief finds where a duplicate Nonce appears
+ * \return OR'ed DuplicateNonceWhere
*/
- bool
- addNonce(uint32_t nonce);
+ int
+ findNonce(uint32_t nonce, const Face& face) const;
public: // InRecord
const InRecordCollection&
@@ -156,7 +168,6 @@
EventId m_stragglerTimer;
private:
- pit::NonceList m_nonceList;
shared_ptr<const Interest> m_interest;
InRecordCollection m_inRecords;
OutRecordCollection m_outRecords;