pit: add EndpointId field in in-record and out-record
refs: #4842
Change-Id: Id4bca4ad9c2d7c8a2fd975c0b052fb9271b6e47d
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 13560a9..b07211b 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -176,7 +176,7 @@
return;
}
- auto inRecord = pitEntry->getInRecord(*inFace);
+ auto inRecord = pitEntry->getInRecord(*inFace, 0);
BOOST_ASSERT(inRecord != pitEntry->in_end());
// in-record is erased only if Interest is satisfied, and RTO timer should have been cancelled
// note: if this strategy is extended to send Nacks, that would also erase in-record,
@@ -225,7 +225,7 @@
return;
}
- auto outRecord = pitEntry->getOutRecord(inFace);
+ auto outRecord = pitEntry->getOutRecord(inFace, 0);
if (outRecord == pitEntry->out_end()) { // no out-record
NFD_LOG_DEBUG(pitEntry->getInterest() << " dataFrom " << inFace.getId() <<
" no-out-record");
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index 6302020..17771e0 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.cpp
@@ -114,7 +114,7 @@
FaceInfo::recordRtt(const shared_ptr<pit::Entry>& pitEntry, const Face& inFace)
{
// Calculate RTT
- pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(inFace);
+ pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(inFace, 0);
if (outRecord == pitEntry->out_end()) { // no out-record
NFD_LOG_TRACE(pitEntry->getInterest() << " dataFrom inFace=" << inFace.getId() << " no-out-record");
diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
index 03f27dc..7a1f063 100644
--- a/daemon/fw/best-route-strategy2.cpp
+++ b/daemon/fw/best-route-strategy2.cpp
@@ -88,7 +88,7 @@
if (wantUnused) {
// nexthop must not have unexpired out-record
- auto outRecord = pitEntry->getOutRecord(outFace);
+ auto outRecord = pitEntry->getOutRecord(outFace, 0);
if (outRecord != pitEntry->out_end() && outRecord->getExpiry() > now) {
return false;
}
@@ -112,7 +112,7 @@
if (!isNextHopEligible(inFace, interest, *it, pitEntry))
continue;
- auto outRecord = pitEntry->getOutRecord(it->getFace());
+ auto outRecord = pitEntry->getOutRecord(it->getFace(), 0);
BOOST_ASSERT(outRecord != pitEntry->out_end());
if (outRecord->getLastRenewed() < earliestRenewed) {
found = it;
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index b53b82d..f4e5ac9 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -176,7 +176,7 @@
++m_counters.nCsMisses;
// insert in-record
- pitEntry->insertOrUpdateInRecord(const_cast<Face&>(inFace), interest);
+ pitEntry->insertOrUpdateInRecord(const_cast<Face&>(inFace), 0, interest);
// set PIT expiry timer to the time that the last PIT in-record expires
auto lastExpiring = std::max_element(pitEntry->in_begin(), pitEntry->in_end(), &compare_InRecord_expiry);
@@ -230,7 +230,7 @@
" interest=" << pitEntry->getName());
// insert out-record
- pitEntry->insertOrUpdateOutRecord(outFace, interest);
+ pitEntry->insertOrUpdateOutRecord(outFace, 0, interest);
// send Interest
outFace.sendInterest(interest);
@@ -309,7 +309,7 @@
this->insertDeadNonceList(*pitEntry, &inFace);
// delete PIT entry's out-record
- pitEntry->deleteOutRecord(inFace);
+ pitEntry->deleteOutRecord(inFace, 0);
}
// when more than one PIT entry is matched, trigger strategy: before satisfy Interest,
// and send Data to all matched out faces
@@ -343,7 +343,7 @@
// clear PIT entry's in and out records
pitEntry->clearInRecords();
- pitEntry->deleteOutRecord(inFace);
+ pitEntry->deleteOutRecord(inFace, 0);
}
// foreach pending downstream
@@ -425,7 +425,7 @@
}
// has out-record?
- pit::OutRecordCollection::iterator outRecord = pitEntry->getOutRecord(inFace);
+ pit::OutRecordCollection::iterator outRecord = pitEntry->getOutRecord(inFace, 0);
// if no out-record found, drop
if (outRecord == pitEntry->out_end()) {
NFD_LOG_DEBUG("onIncomingNack face=" << inFace.getId() <<
@@ -472,7 +472,7 @@
}
// has in-record?
- pit::InRecordCollection::iterator inRecord = pitEntry->getInRecord(outFace);
+ pit::InRecordCollection::iterator inRecord = pitEntry->getInRecord(outFace, 0);
// if no in-record found, drop
if (inRecord == pitEntry->in_end()) {
@@ -499,7 +499,7 @@
nackPkt.setHeader(nack);
// erase in-record
- pitEntry->deleteInRecord(outFace);
+ pitEntry->deleteInRecord(outFace, 0);
// send Nack on face
const_cast<Face&>(outFace).sendNack(nackPkt);
@@ -548,7 +548,7 @@
}
else {
// insert outgoing Nonce of a specific face
- auto outRecord = pitEntry.getOutRecord(*upstream);
+ auto outRecord = pitEntry.getOutRecord(*upstream, 0);
if (outRecord != pitEntry.getOutRecords().end()) {
m_deadNonceList.add(pitEntry.getName(), outRecord->getLastNonce());
}
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 71fa7c1..7732e09 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -95,7 +95,7 @@
<< " pitEntry-to=" << outFace.getId());
if (suppressResult == RetxSuppressionResult::FORWARD) {
- m_retxSuppression.incrementIntervalForOutRecord(*pitEntry->getOutRecord(outFace));
+ m_retxSuppression.incrementIntervalForOutRecord(*pitEntry->getOutRecord(outFace, 0));
}
++nEligibleNextHops;
}
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index 9a16897..778ed2b 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -143,7 +143,7 @@
if (pitEntry == nullptr) {
return;
}
- auto inRecord = pitEntry->getInRecord(*inFace);
+ auto inRecord = pitEntry->getInRecord(*inFace, 0);
if (inRecord == pitEntry->in_end()) {
return;
}
diff --git a/daemon/fw/process-nack-traits.cpp b/daemon/fw/process-nack-traits.cpp
index 584bf70..4b2d091 100644
--- a/daemon/fw/process-nack-traits.cpp
+++ b/daemon/fw/process-nack-traits.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,
@@ -56,7 +56,7 @@
if (nOutRecordsNotNacked == 1) {
BOOST_ASSERT(lastFaceNotNacked != nullptr);
- pit::InRecordCollection::iterator inR = pitEntry->getInRecord(*lastFaceNotNacked);
+ pit::InRecordCollection::iterator inR = pitEntry->getInRecord(*lastFaceNotNacked, 0);
if (inR != pitEntry->in_end()) {
// one out-record not Nacked, which is also a downstream
NFD_LOG_DEBUG(nack.getInterest() << " nack-from=" << inFace.getId() <<
diff --git a/daemon/fw/retx-suppression-exponential.cpp b/daemon/fw/retx-suppression-exponential.cpp
index b110588..1275dd9 100644
--- a/daemon/fw/retx-suppression-exponential.cpp
+++ b/daemon/fw/retx-suppression-exponential.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,
@@ -95,7 +95,7 @@
RetxSuppressionExponential::decidePerUpstream(pit::Entry& pitEntry, Face& outFace)
{
// NEW if outRecord for the face does not exist
- auto outRecord = pitEntry.getOutRecord(outFace);
+ auto outRecord = pitEntry.getOutRecord(outFace, 0);
if (outRecord == pitEntry.out_end()) {
return RetxSuppressionResult::NEW;
}
diff --git a/daemon/fw/self-learning-strategy.cpp b/daemon/fw/self-learning-strategy.cpp
index 174dca4..42f0f22 100644
--- a/daemon/fw/self-learning-strategy.cpp
+++ b/daemon/fw/self-learning-strategy.cpp
@@ -73,7 +73,7 @@
const fib::NextHopList& nexthops = fibEntry.getNextHops();
bool isNonDiscovery = interest.getTag<lp::NonDiscoveryTag>() != nullptr;
- auto inRecordInfo = pitEntry->getInRecord(inFace)->insertStrategyInfo<InRecordInfo>().first;
+ auto inRecordInfo = pitEntry->getInRecord(inFace, 0)->insertStrategyInfo<InRecordInfo>().first;
if (isNonDiscovery) { // "non-discovery" Interest
inRecordInfo->isNonDiscoveryInterest = true;
if (nexthops.empty()) { // return NACK if no matching FIB entry exists
@@ -103,7 +103,7 @@
SelfLearningStrategy::afterReceiveData(const shared_ptr<pit::Entry>& pitEntry,
const Face& inFace, const Data& data)
{
- OutRecordInfo* outRecordInfo = pitEntry->getOutRecord(inFace)->getStrategyInfo<OutRecordInfo>();
+ OutRecordInfo* outRecordInfo = pitEntry->getOutRecord(inFace, 0)->getStrategyInfo<OutRecordInfo>();
if (outRecordInfo && outRecordInfo->isNonDiscoveryInterest) { // outgoing Interest was non-discovery
if (!needPrefixAnn(pitEntry)) { // no need to attach a PA (common cases)
sendDataToAll(pitEntry, inFace, data);
@@ -146,7 +146,7 @@
continue;
}
this->sendInterest(pitEntry, outFace, interest);
- pitEntry->getOutRecord(outFace)->insertStrategyInfo<OutRecordInfo>().first->isNonDiscoveryInterest = false;
+ pitEntry->getOutRecord(outFace, 0)->insertStrategyInfo<OutRecordInfo>().first->isNonDiscoveryInterest = false;
NFD_LOG_DEBUG("send discovery Interest=" << interest << " from="
<< inFace.getId() << " to=" << outFace.getId());
}
@@ -164,7 +164,7 @@
continue;
}
this->sendInterest(pitEntry, outFace, interest);
- pitEntry->getOutRecord(outFace)->insertStrategyInfo<OutRecordInfo>().first->isNonDiscoveryInterest = true;
+ pitEntry->getOutRecord(outFace, 0)->insertStrategyInfo<OutRecordInfo>().first->isNonDiscoveryInterest = true;
NFD_LOG_DEBUG("send non-discovery Interest=" << interest << " from="
<< inFace.getId() << " to=" << outFace.getId());
}
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index 3f364ea..378e554 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -199,7 +199,7 @@
// delete the PIT entry's in-record based on outFace,
// since Data is sent to outFace from which the Interest was received
- pitEntry->deleteInRecord(outFace);
+ pitEntry->deleteInRecord(outFace, 0);
m_forwarder.onOutgoingData(data, *const_pointer_cast<Face>(outFace.shared_from_this()));
}
diff --git a/daemon/table/cleanup.cpp b/daemon/table/cleanup.cpp
index 5a45bf7..d45b363 100644
--- a/daemon/table/cleanup.cpp
+++ b/daemon/table/cleanup.cpp
@@ -40,7 +40,7 @@
}
for (const auto& pitEntry : nte.getPitEntries()) {
- pit.deleteInOutRecords(pitEntry.get(), face);
+ pit.deleteInOutRecordsByFace(pitEntry.get(), face);
}
if (!nte.hasTableEntries()) {
diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index ee4b726..2edbc9f 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.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,
@@ -50,21 +50,25 @@
}
InRecordCollection::iterator
-Entry::getInRecord(const Face& face)
+Entry::getInRecord(const Face& face, uint64_t endpointId)
{
return std::find_if(m_inRecords.begin(), m_inRecords.end(),
- [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
+ [&face, endpointId] (const InRecord& inRecord) {
+ return &inRecord.getFace() == &face && inRecord.getEndpointId() == endpointId;
+ });
}
InRecordCollection::iterator
-Entry::insertOrUpdateInRecord(Face& face, const Interest& interest)
+Entry::insertOrUpdateInRecord(Face& face, uint64_t endpointId, const Interest& interest)
{
BOOST_ASSERT(this->canMatch(interest));
auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
- [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
+ [&face, endpointId] (const InRecord& inRecord) {
+ return &inRecord.getFace() == &face && inRecord.getEndpointId() == endpointId;
+ });
if (it == m_inRecords.end()) {
- m_inRecords.emplace_front(face);
+ m_inRecords.emplace_front(face, endpointId);
it = m_inRecords.begin();
}
@@ -73,10 +77,12 @@
}
void
-Entry::deleteInRecord(const Face& face)
+Entry::deleteInRecord(const Face& face, uint64_t endpointId)
{
auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
- [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
+ [&face, endpointId] (const InRecord& inRecord) {
+ return &inRecord.getFace() == &face && inRecord.getEndpointId() == endpointId;
+ });
if (it != m_inRecords.end()) {
m_inRecords.erase(it);
}
@@ -89,21 +95,25 @@
}
OutRecordCollection::iterator
-Entry::getOutRecord(const Face& face)
+Entry::getOutRecord(const Face& face, uint64_t endpointId)
{
return std::find_if(m_outRecords.begin(), m_outRecords.end(),
- [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
+ [&face, endpointId] (const OutRecord& outRecord) {
+ return &outRecord.getFace() == &face && outRecord.getEndpointId() == endpointId;
+ });
}
OutRecordCollection::iterator
-Entry::insertOrUpdateOutRecord(Face& face, const Interest& interest)
+Entry::insertOrUpdateOutRecord(Face& face, uint64_t endpointId, const Interest& interest)
{
BOOST_ASSERT(this->canMatch(interest));
auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
- [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
+ [&face, endpointId] (const OutRecord& outRecord) {
+ return &outRecord.getFace() == &face && outRecord.getEndpointId() == endpointId;
+ });
if (it == m_outRecords.end()) {
- m_outRecords.emplace_front(face);
+ m_outRecords.emplace_front(face, endpointId);
it = m_outRecords.begin();
}
@@ -112,14 +122,27 @@
}
void
-Entry::deleteOutRecord(const Face& face)
+Entry::deleteOutRecord(const Face& face, uint64_t endpointId)
{
auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
- [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
+ [&face, endpointId] (const OutRecord& outRecord) {
+ return &outRecord.getFace() == &face && outRecord.getEndpointId() == endpointId;
+ });
if (it != m_outRecords.end()) {
m_outRecords.erase(it);
}
}
+void
+Entry::deleteInOutRecordsByFace(const Face& face)
+{
+ m_inRecords.remove_if([&face] (const InRecord& inRecord) {
+ return &inRecord.getFace() == &face;
+ });
+ m_outRecords.remove_if([&face] (const OutRecord& outRecord) {
+ return &outRecord.getFace() == &face;
+ });
+}
+
} // namespace pit
} // namespace nfd
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index 2e49824..b1dc9ee 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.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,
@@ -132,22 +132,22 @@
return m_inRecords.end();
}
- /** \brief get the in-record for \p face
+ /** \brief get the in-record for \p face and \p endpointId
* \return an iterator to the in-record, or .in_end() if it does not exist
*/
InRecordCollection::iterator
- getInRecord(const Face& face);
+ getInRecord(const Face& face, uint64_t endpointId);
/** \brief insert or update an in-record
* \return an iterator to the new or updated in-record
*/
InRecordCollection::iterator
- insertOrUpdateInRecord(Face& face, const Interest& interest);
+ insertOrUpdateInRecord(Face& face, uint64_t endpointId, const Interest& interest);
- /** \brief delete the in-record for \p face if it exists
+ /** \brief delete the in-record for \p face and \p endpointId if it exists
*/
void
- deleteInRecord(const Face& face);
+ deleteInRecord(const Face& face, uint64_t endpointId);
/** \brief delete all in-records
*/
@@ -199,22 +199,28 @@
return m_outRecords.end();
}
- /** \brief get the out-record for \p face
+ /** \brief get the out-record for \p face and \p endpointId
* \return an iterator to the out-record, or .out_end() if it does not exist
*/
OutRecordCollection::iterator
- getOutRecord(const Face& face);
+ getOutRecord(const Face& face, uint64_t endpointId);
/** \brief insert or update an out-record
* \return an iterator to the new or updated out-record
*/
OutRecordCollection::iterator
- insertOrUpdateOutRecord(Face& face, const Interest& interest);
+ insertOrUpdateOutRecord(Face& face, uint64_t endpointId, const Interest& interest);
- /** \brief delete the out-record for \p face if it exists
+ /** \brief delete the out-record for \p face and \p endpointId if it exists
*/
void
- deleteOutRecord(const Face& face);
+ deleteOutRecord(const Face& face, uint64_t endpointId);
+
+public: // cleanup
+ /** \brief delete all in-records and out-records for \p face if it exists
+ */
+ void
+ deleteInOutRecordsByFace(const Face& face);
public:
/** \brief expiry timer
diff --git a/daemon/table/pit-face-record.cpp b/daemon/table/pit-face-record.cpp
index d594cb9..61fef7e 100644
--- a/daemon/table/pit-face-record.cpp
+++ b/daemon/table/pit-face-record.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, 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,
@@ -28,8 +28,9 @@
namespace nfd {
namespace pit {
-FaceRecord::FaceRecord(Face& face)
+FaceRecord::FaceRecord(Face& face, uint64_t endpointId)
: m_face(face)
+ , m_endpointId(endpointId)
, m_lastNonce(0)
, m_lastRenewed(time::steady_clock::TimePoint::min())
, m_expiry(time::steady_clock::TimePoint::min())
diff --git a/daemon/table/pit-face-record.hpp b/daemon/table/pit-face-record.hpp
index 90c3cdb..3e3f020 100644
--- a/daemon/table/pit-face-record.hpp
+++ b/daemon/table/pit-face-record.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, 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,
@@ -40,12 +40,14 @@
class FaceRecord : public StrategyInfoHost
{
public:
- explicit
- FaceRecord(Face& face);
+ FaceRecord(Face& face, uint64_t endpointId);
Face&
getFace() const;
+ uint64_t
+ getEndpointId() const;
+
uint32_t
getLastNonce() const;
@@ -65,6 +67,7 @@
private:
Face& m_face;
+ uint64_t m_endpointId;
uint32_t m_lastNonce;
time::steady_clock::TimePoint m_lastRenewed;
time::steady_clock::TimePoint m_expiry;
@@ -76,6 +79,12 @@
return m_face;
}
+inline uint64_t
+FaceRecord::getEndpointId() const
+{
+ return m_endpointId;
+}
+
inline uint32_t
FaceRecord::getLastNonce() const
{
diff --git a/daemon/table/pit-in-record.cpp b/daemon/table/pit-in-record.cpp
index 8167190..7bb10b9 100644
--- a/daemon/table/pit-in-record.cpp
+++ b/daemon/table/pit-in-record.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, 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,
@@ -28,8 +28,8 @@
namespace nfd {
namespace pit {
-InRecord::InRecord(Face& face)
- : FaceRecord(face)
+InRecord::InRecord(Face& face, uint64_t endpointId)
+ : FaceRecord(face, endpointId)
{
}
diff --git a/daemon/table/pit-in-record.hpp b/daemon/table/pit-in-record.hpp
index 45167c3..d758097 100644
--- a/daemon/table/pit-in-record.hpp
+++ b/daemon/table/pit-in-record.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, 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,
@@ -36,8 +36,7 @@
class InRecord : public FaceRecord
{
public:
- explicit
- InRecord(Face& face);
+ InRecord(Face& face, uint64_t endpointId);
void
update(const Interest& interest);
diff --git a/daemon/table/pit-out-record.cpp b/daemon/table/pit-out-record.cpp
index 8b4f609..75d7e7f 100644
--- a/daemon/table/pit-out-record.cpp
+++ b/daemon/table/pit-out-record.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, 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,
@@ -28,8 +28,8 @@
namespace nfd {
namespace pit {
-OutRecord::OutRecord(Face& face)
- : FaceRecord(face)
+OutRecord::OutRecord(Face& face, uint64_t endpointId)
+ : FaceRecord(face, endpointId)
{
}
diff --git a/daemon/table/pit-out-record.hpp b/daemon/table/pit-out-record.hpp
index 4400fd4..c0537fd 100644
--- a/daemon/table/pit-out-record.hpp
+++ b/daemon/table/pit-out-record.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, 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,
@@ -36,8 +36,7 @@
class OutRecord : public FaceRecord
{
public:
- explicit
- OutRecord(Face& face);
+ OutRecord(Face& face, uint64_t endpointId);
/** \return last NACK returned by \p getFace()
*
@@ -79,4 +78,4 @@
} // namespace pit
} // namespace nfd
-#endif // NFD_DAEMON_TABLE_PIT_IN_RECORD_HPP
+#endif // NFD_DAEMON_TABLE_PIT_OUT_RECORD_HPP
diff --git a/daemon/table/pit.cpp b/daemon/table/pit.cpp
index 7a708da..5e26fc0 100644
--- a/daemon/table/pit.cpp
+++ b/daemon/table/pit.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,
@@ -113,12 +113,11 @@
}
void
-Pit::deleteInOutRecords(Entry* entry, const Face& face)
+Pit::deleteInOutRecordsByFace(Entry* entry, const Face& face)
{
BOOST_ASSERT(entry != nullptr);
- entry->deleteInRecord(face);
- entry->deleteOutRecord(face);
+ entry->deleteInOutRecordsByFace(face);
/// \todo decide whether to delete PIT entry if there's no more in/out-record left
}
diff --git a/daemon/table/pit.hpp b/daemon/table/pit.hpp
index 6e8af8a..eb2438b 100644
--- a/daemon/table/pit.hpp
+++ b/daemon/table/pit.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,
@@ -93,10 +93,10 @@
this->erase(entry, true);
}
- /** \brief deletes in-record and out-record for face
+ /** \brief deletes all in-records and out-records for \p face
*/
void
- deleteInOutRecords(Entry* entry, const Face& face);
+ deleteInOutRecordsByFace(Entry* entry, const Face& face);
public: // enumeration
typedef Iterator const_iterator;