29 namespace scope_prefix {
31 const Name
LOCALHOP(
"ndn:/localhop");
39 if (outFace.getScope() == ndn::nfd::FACE_SCOPE_LOCAL) {
42 BOOST_ASSERT(outFace.getScope() == ndn::nfd::FACE_SCOPE_NON_LOCAL);
52 [] (
const pit::InRecord& inRecord) {
return inRecord.getFace().getScope() == ndn::nfd::FACE_SCOPE_LOCAL; });
62 time::steady_clock::TimePoint now = time::steady_clock::now();
64 bool hasUnexpiredOutRecord = std::any_of(pitEntry.
out_begin(), pitEntry.
out_end(),
66 return &outRecord.getFace() == &face && outRecord.getExpiry() >= now;
68 if (hasUnexpiredOutRecord) {
72 bool hasUnexpiredOtherInRecord = std::any_of(pitEntry.
in_begin(), pitEntry.
in_end(),
74 return &inRecord.getFace() != &face && inRecord.getExpiry() >= now;
76 if (!hasUnexpiredOtherInRecord) {
89 if (inRecord.getLastNonce() == nonce) {
90 if (&inRecord.getFace() == &face) {
100 if (outRecord.getLastNonce() == nonce) {
101 if (&outRecord.getFace() == &face) {
116 time::steady_clock::TimePoint now = time::steady_clock::now();
119 return outRecord.getExpiry() >= now &&
120 outRecord.getIncomingNack() ==
nullptr;
bool canForwardToLegacy(const pit::Entry &pitEntry, const Face &face)
decide whether Interest can be forwarded to face
const InRecordCollection & getInRecords() const
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
contains information about an Interest toward an outgoing face
bool violatesScope(const pit::Entry &pitEntry, const Face &outFace)
determine whether forwarding the Interest in pitEntry to outFace would violate scope ...
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
contains information about an Interest from an incoming face
const Name LOCALHOP
ndn:/localhop
InRecordCollection::iterator in_end()
bool hasPendingOutRecords(const pit::Entry &pitEntry)
determine whether pitEntry has any pending out-records
const Name LOCALHOST
ndn:/localhost
no duplicate Nonce is found
int findDuplicateNonce(const pit::Entry &pitEntry, uint32_t nonce, const Face &face)
determine whether pitEntry has duplicate Nonce nonce
OutRecordCollection::iterator out_begin()
OutRecordCollection::iterator out_end()
const OutRecordCollection & getOutRecords() const
const Name & getName() const
InRecordCollection::iterator in_begin()