36 const shared_ptr<pit::Entry>& pitEntry)
38 int nOutRecordsNotNacked = 0;
39 Face* lastFaceNotNacked =
nullptr;
40 lp::NackReason leastSevereReason = lp::NackReason::NONE;
42 const lp::NackHeader* inNack = outR.getIncomingNack();
43 if (inNack ==
nullptr) {
44 ++nOutRecordsNotNacked;
45 lastFaceNotNacked = &outR.getFace();
49 if (isLessSevere(inNack->getReason(), leastSevereReason)) {
50 leastSevereReason = inNack->getReason();
54 lp::NackHeader outNack;
55 outNack.setReason(leastSevereReason);
57 if (nOutRecordsNotNacked == 1) {
58 BOOST_ASSERT(lastFaceNotNacked !=
nullptr);
59 pit::InRecordCollection::iterator inR = pitEntry->getInRecord(*lastFaceNotNacked);
60 if (inR != pitEntry->in_end()) {
63 " nack=" << nack.getReason() <<
64 " nack-to(bidirectional)=" << lastFaceNotNacked->
getId() <<
65 " out-nack=" << outNack.getReason());
66 this->sendNackForProcessNackTraits(pitEntry, *lastFaceNotNacked, outNack);
71 if (nOutRecordsNotNacked > 0) {
73 " nack=" << nack.getReason() <<
74 " waiting=" << nOutRecordsNotNacked);
80 " nack=" << nack.getReason() <<
81 " nack-to=all out-nack=" << outNack.getReason());
82 this->sendNacksForProcessNackTraits(pitEntry, outNack);
Contains information about an Interest toward an outgoing face.
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
generalization of a network interface
#define NFD_LOG_INIT(name)
void processNack(const Face &inFace, const lp::Nack &nack, const shared_ptr< pit::Entry > &pitEntry)