35 const shared_ptr<pit::Entry>& pitEntry)
37 int nOutRecordsNotNacked = 0;
38 Face* lastFaceNotNacked =
nullptr;
39 lp::NackReason leastSevereReason = lp::NackReason::NONE;
41 const lp::NackHeader* inNack = outR.getIncomingNack();
42 if (inNack ==
nullptr) {
43 ++nOutRecordsNotNacked;
44 lastFaceNotNacked = &outR.getFace();
48 if (isLessSevere(inNack->getReason(), leastSevereReason)) {
49 leastSevereReason = inNack->getReason();
53 lp::NackHeader outNack;
54 outNack.setReason(leastSevereReason);
56 if (nOutRecordsNotNacked == 1) {
57 BOOST_ASSERT(lastFaceNotNacked !=
nullptr);
58 auto inR = pitEntry->findInRecord(*lastFaceNotNacked);
59 if (inR != pitEntry->in_end()) {
62 <<
" out-nack=" << outNack.getReason());
63 this->sendNackForProcessNackTraits(pitEntry, *lastFaceNotNacked, outNack);
68 if (nOutRecordsNotNacked > 0) {
75 this->sendNacksForProcessNackTraits(pitEntry, outNack);
Generalization of a network interface.
FaceId getId() const noexcept
Returns the face ID.
void processNack(const lp::Nack &nack, const Face &inFace, const shared_ptr< pit::Entry > &pitEntry)
Contains information about an Interest toward an outgoing face.
#define NFD_LOG_INIT(name)
#define NFD_LOG_NACK_FROM(nack, ingress, msg)
Logs the reception of nack on ingress, followed by msg, at DEBUG level.