pit: add EndpointId field in in-record and out-record
refs: #4842
Change-Id: Id4bca4ad9c2d7c8a2fd975c0b052fb9271b6e47d
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());
}