[Nfd-dev] Interest equality for for Nack

Junxiao Shi shijunxiao at email.arizona.edu
Mon Apr 25 16:40:01 PDT 2016


Hi Jeff

Nack is hop-to-hop. A Nack packet cannot be "forwarded".
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.

>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.
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.

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.

Yours, Junxiao

On Mon, Apr 25, 2016 at 12:13 PM, Thompson, Jeff <jefft0 at remap.ucla.edu>
wrote:

> Hello all,
>
> 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).
>
> https://github.com/named-data/ndn-cxx/blob/4b4699897cf281c08b85343a1b0d02961eb727f0/src/interest.hpp#L429
>
> 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?
>
> Thanks,
> - Jeff T
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20160425/29f58ee8/attachment.html>


More information about the Nfd-dev mailing list