face: use IncomingFaceId, NextHopFaceId, CachePolicy tags
This commit replaces all LocalControlHeader usages with these tags,
and deletes LocalFace.
This commit also does minor improvements in RIB test suites.
refs #3339
Change-Id: I14cbfc296a6723a5860bf8bd95d9804d3bac3da5
diff --git a/daemon/fw/client-control-strategy.cpp b/daemon/fw/client-control-strategy.cpp
index f65cf69..7cc07fd 100644
--- a/daemon/fw/client-control-strategy.cpp
+++ b/daemon/fw/client-control-strategy.cpp
@@ -50,14 +50,13 @@
shared_ptr<fib::Entry> fibEntry,
shared_ptr<pit::Entry> pitEntry)
{
- // Strategy needn't check whether LocalControlHeader-NextHopFaceId is enabled.
- // LocalFace does this check.
- if (!interest.getLocalControlHeader().hasNextHopFaceId()) {
+ shared_ptr<lp::NextHopFaceIdTag> tag = interest.getTag<lp::NextHopFaceIdTag>();
+ if (tag == nullptr) {
this->BestRouteStrategy::afterReceiveInterest(inFace, interest, fibEntry, pitEntry);
return;
}
- FaceId outFaceId = static_cast<FaceId>(interest.getNextHopFaceId());
+ FaceId outFaceId = static_cast<FaceId>(*tag);
shared_ptr<Face> outFace = this->getFace(outFaceId);
if (!static_cast<bool>(outFace)) {
// If outFace doesn't exist, it's better to reject the Interest