<div dir="ltr">Hi Jeff<div><br></div><div>Nack is hop-to-hop. A Nack packet cannot be "forwarded".</div><div>When NFD decides to send a Nack to a downstream, the Nack being sent is constructed from the latest Interest received from the downstream; it's not a copy of a Nack received from elsewhere. Thus, it would have the same wire encoding.</div><div><br></div><div>From protocol point of view, the Nack must be able to locate the correct PIT entry, which requires it to have the same Name, Selectors, and Link as the original Interest.</div><div>The Nack must also carry the latest Nonce coming from the downstream. Otherwise, in case a Nack and a retransmitted Interest are in-flight at the same time between an upstream and a downstream, if the downstream ignores the Nonce and accepts the Nack, it would incorrectly conclude that the upstream cannot answer its retransmitted Interest while the upstream is actively trying to find content for its retransmitted Interest.</div><div><br></div><div>After fixing Name, Selectors, Link, and Nonce, the only leftover field is InterestLifetime. Theoretically, the protocol could operate correctly even if the InterestLifetime in Nack differs from the InterestLifetime in Interest. In NFD implementation, InterestLifetime field never changes, so it's safe for ndn-cxx to compare the wire encoding of entire Interest.</div><div><br></div><div>Yours, Junxiao</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 25, 2016 at 12:13 PM, Thompson, Jeff <span dir="ltr"><<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hello all,</div>
<div><br>
</div>
<div>To support the network Nack in ndn-cxx, expressInterest takes a NackCallback and stores this along with the Interest in the library PIT. When ndn-cxx receives a Nack, it has to find the PIT entry with the “same” interest as the interest in the Nack packet.
 The test for “same” uses exact equality of the Interest wire encoding (including the nonce and all the selectors).</div>
<div><a href="https://github.com/named-data/ndn-cxx/blob/4b4699897cf281c08b85343a1b0d02961eb727f0/src/interest.hpp#L429" target="_blank">https://github.com/named-data/ndn-cxx/blob/4b4699897cf281c08b85343a1b0d02961eb727f0/src/interest.hpp#L429</a></div>
<div><br>
</div>
<div>Is it guaranteed that the Interest which goes through the whole network and is returned Nack will have the exact same encoding bytes as the Interest that was originally expressed? Is this stated somewhere? Could the encoding ever be different?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>- Jeff T</div></div></blockquote></div></div></div>