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/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index 12374f1..9882033 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-manager.cpp
@@ -142,7 +142,12 @@
{
bool isSelfRegistration = (parameters.getFaceId() == 0);
if (isSelfRegistration) {
- parameters.setFaceId(request.getIncomingFaceId());
+ shared_ptr<lp::IncomingFaceIdTag> incomingFaceIdTag = request.getTag<lp::IncomingFaceIdTag>();
+ // NDNLPv2 says "application MUST be prepared to receive a packet without IncomingFaceId field",
+ // but it's fine to assert IncomingFaceId is available, because InternalFace lives inside NFD
+ // and is initialized synchronously with IncomingFaceId field enabled.
+ BOOST_ASSERT(incomingFaceIdTag != nullptr);
+ parameters.setFaceId(*incomingFaceIdTag);
}
}