|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
58 bool hasUnexpiredOutRecord = std::any_of(pitEntry.
out_begin(), pitEntry.
out_end(),
60 return &outRecord.getFace() == &face && outRecord.getExpiry() >= now;
62 if (hasUnexpiredOutRecord) {
66 bool hasUnexpiredOtherInRecord = std::any_of(pitEntry.
in_begin(), pitEntry.
in_end(),
68 return &inRecord.getFace() != &face && inRecord.getExpiry() >= now;
70 if (!hasUnexpiredOtherInRecord) {
83 if (inRecord.getLastNonce() == nonce) {
84 if (&inRecord.getFace() == &face) {
94 if (outRecord.getLastNonce() == nonce) {
95 if (&outRecord.getFace() == &face) {
113 return outRecord.getExpiry() >= now &&
114 outRecord.getIncomingNack() == nullptr;
121 pit::OutRecordCollection::const_iterator lastOutgoing = std::max_element(
124 return a.getLastRenewed() < b.getLastRenewed();
126 BOOST_ASSERT(lastOutgoing != pitEntry.
out_end());
128 return lastOutgoing->getLastRenewed();
131 fib::NextHopList::const_iterator
134 const shared_ptr<pit::Entry>& pitEntry)
136 auto found = nexthops.end();
137 auto earliestRenewed = time::steady_clock::TimePoint::max();
139 for (
auto it = nexthops.begin(); it != nexthops.end(); ++it) {
143 auto outRecord = pitEntry->getOutRecord(it->getFace());
144 BOOST_ASSERT(outRecord != pitEntry->out_end());
145 if (outRecord->getLastRenewed() < earliestRenewed) {
147 earliestRenewed = outRecord->getLastRenewed();
156 const shared_ptr<pit::Entry>& pitEntry,
169 auto outRecord = pitEntry->getOutRecord(outFace);
170 if (outRecord != pitEntry->out_end() && outRecord->getExpiry() > now) {
@ DUPLICATE_NONCE_IN_SAME
in-record of same face
bool canForwardToLegacy(const pit::Entry &pitEntry, const Face &face)
decide whether Interest can be forwarded to face
Contains information about an Interest toward an outgoing face.
static time_point now() noexcept
@ LINK_TYPE_AD_HOC
link is ad hoc
OutRecordCollection::iterator out_end()
const Name LOCALHOST("ndn:/localhost")
ndn:/localhost
InRecordCollection::iterator in_begin()
@ DUPLICATE_NONCE_NONE
no duplicate Nonce is found
@ DUPLICATE_NONCE_OUT_SAME
out-record of same face
@ DUPLICATE_NONCE_IN_OTHER
in-record of other face
const InRecordCollection & getInRecords() const
Copyright (c) 2011-2015 Regents of the University of California.
@ DUPLICATE_NONCE_OUT_OTHER
out-record of other face
bool isNextHopEligible(const Face &inFace, const Interest &interest, const fib::NextHop &nexthop, const shared_ptr< pit::Entry > &pitEntry, bool wantUnused, time::steady_clock::TimePoint now)
determines whether a NextHop is eligible i.e.
generalization of a network interface
OutRecordCollection::iterator out_begin()
bool wouldViolateScope(const Face &inFace, const Interest &interest, const Face &outFace)
determine whether forwarding the Interest in pitEntry to outFace would violate scope
Contains information about an Interest from an incoming face.
Represents an Interest packet.
Represents a nexthop record in a FIB entry.
time::steady_clock::TimePoint getLastOutgoing(const pit::Entry &pitEntry)
const OutRecordCollection & getOutRecords() const
std::vector< NextHop > NextHopList
fib::NextHopList::const_iterator findEligibleNextHopWithEarliestOutRecord(const Face &inFace, const Interest &interest, const fib::NextHopList &nexthops, const shared_ptr< pit::Entry > &pitEntry)
pick an eligible NextHop with earliest out-record
bool hasPendingOutRecords(const pit::Entry &pitEntry)
determine whether pitEntry has any pending out-records
ndn::nfd::FaceScope getScope() const
@ FACE_SCOPE_LOCAL
face is local
int findDuplicateNonce(const pit::Entry &pitEntry, uint32_t nonce, const Face &face)
determine whether pitEntry has duplicate Nonce nonce
InRecordCollection::iterator in_end()
const Name & getName() const noexcept
const Name LOCALHOP("ndn:/localhop")
ndn:/localhop
ndn::nfd::LinkType getLinkType() const