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/table/cs.cpp b/daemon/table/cs.cpp
index 674d333..4550361 100644
--- a/daemon/table/cs.cpp
+++ b/daemon/table/cs.cpp
@@ -83,12 +83,11 @@
{
NFD_LOG_DEBUG("insert " << data.getName());
- // recognize CachingPolicy
- using ndn::nfd::LocalControlHeader;
- const LocalControlHeader& lch = data.getLocalControlHeader();
- if (lch.hasCachingPolicy()) {
- LocalControlHeader::CachingPolicy policy = lch.getCachingPolicy();
- if (policy == LocalControlHeader::CachingPolicy::NO_CACHE) {
+ // recognize CachePolicy
+ shared_ptr<lp::CachePolicyTag> tag = data.getTag<lp::CachePolicyTag>();
+ if (tag != nullptr) {
+ lp::CachePolicyType policy = tag->get().getPolicy();
+ if (policy == lp::CachePolicyType::NO_CACHE) {
return false;
}
}