<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
As a point of historical interest, in  CCNx 0.8, all matching against a Content Object was done via the so-called “full name.”  The full name of a content object is its name plus its implicit digest.  And only in this sense does the MaxSuffixComponents/MinSuffixComponents
 make sense.
<div class=""><br class="">
</div>
<div class="">If one does not always append the implicit digest, then one could run in to situations where someone conjures up a name with a fake terminal digest component which could match an Interest with a digest component.  For example, I have a content
 object with real digest 0x123.  I create a name /foo/bar/digest=0xFFF.  The full name should be /foo/bar/digest=0xFFF/digest=0x123.  If one does not always append the implicit digest, then the content object could match an interest for /foo/bar/digest=0xFFF,
 particularly if an implementation was sloppy on how it handled the min/max suffix components (which is often misunderstood).</div>
<div class=""><br class="">
</div>
<div class="">Marc<br class="">
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Dec 12, 2015, at 7:14 AM, Thompson, Jeff <<a href="mailto:jefft0@remap.ucla.edu" class="">jefft0@remap.ucla.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-family: Calibri, sans-serif; font-size: 14px;" class="">
<div class="">I tested in PyNDN and I confirm the same problem: NFD does not match an incoming data packet with an interest in the PIT which has an implicit digest component (but it does match from the content store).</div>
<div class=""><br class="">
</div>
<div class="">Looking at the NFD code, Pit::findAllDataMatches calls m_nameTree.findAllMatches(data.getName(), …) which does a longest prefix match of the data name to the interest name.</div>
<div class=""><a href="https://github.com/named-data/NFD/blob/5e5e44518286e89a0092ea0ad93c22e64128bdd2/daemon/table/pit.cpp#L97" class="">https://github.com/named-data/NFD/blob/5e5e44518286e89a0092ea0ad93c22e64128bdd2/daemon/table/pit.cpp#L97</a></div>
<div class=""><br class="">
</div>
<div class="">But the interest name with the implicit digest component in the PIT is longer than the data name, so how can LPM match it? Should NFD strip the implicit digest component before putting the interest name in the PIT’s name tree?</div>
<div class=""><br class="">
</div>
<div class="">- Jeff T</div>
<div class=""><br class="">
</div>
<div class="">On 2015/12/11, 16:12:07, "Nfd-dev on behalf of <a href="mailto:christian.tschudin@unibas.ch" class="">
christian.tschudin@unibas.ch</a>" <<a href="mailto:nfd-dev-bounces@lists.cs.ucla.edu" class="">nfd-dev-bounces@lists.cs.ucla.edu</a> on behalf of
<a href="mailto:christian.tschudin@unibas.ch" class="">christian.tschudin@unibas.ch</a>> wrote:</div>
<div class=""><br class="">
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;" class="" type="cite">
<div class="">I'm hitting a wall with nfd behavior when it comes to the implicit digest.</div>
<div class=""><br class="">
</div>
<div class="">a) What is working correctly:</div>
<div class="">- first retrieve a packet by ordinary name</div>
<div class="">- compute the digest of the received packet</div>
<div class="">- then retrieve the same packet, but this time with the</div>
<div class="">   special digest component appended and MaxSuffix=0</div>
<div class="">- this works, the data will probably now be served from the CS</div>
<div class="">(digest is a3c19829edf901ff9d1a87f6da82af050a1cc302784b9b18ecd3812deef6795d)</div>
<div class=""><br class="">
</div>
<div class="">b) What is not working:</div>
<div class="">- directly retrieve another packet with its (other) name and including</div>
<div class="">   the special digest component for that data, and MaxSuffix=0</div>
<div class="">- nfd accepts this request and forwards it upstream</div>
<div class="">- nfd receives that data packet</div>
<div class="">- but the received data is not delivered to the downstream</div>
<div class="">   client (timeout of ndnpeek although I can see that nfd</div>
<div class="">   received the right packet).</div>
<div class="">(digest is 65d5baf5960a4151ee64f8aa93ed19c90c50932308d3019848f23b2f59bc0623)</div>
<div class=""><br class="">
</div>
<div class="">The content comes in both cases from an upstream node (running </div>
<div class="">ccn-lite), see the topology below.</div>
<div class=""><br class="">
</div>
<div class="">One potential catch is that the two names are almost identical:</div>
<div class=""><br class="">
</div>
<div class="">The name in step a) is</div>
<div class="">/ndn/ch/unibas/repo256/movie7.mp4/_</div>
<div class=""><br class="">
</div>
<div class="">The name in step b) is</div>
<div class="">/ndn/ch/unibas/repo256/movie7.mp4</div>
<div class=""><br class="">
</div>
<div class="">Is this a bug in PIT matching? Or has the second data object an internal
</div>
<div class="">problem that lets nfd refuse it (see the attached packet)? Below I also
</div>
<div class="">add the command line logs, FYI.</div>
<div class=""><br class="">
</div>
<div class="">Best, christian</div>
<div class=""><br class="">
</div>
<div class="">---</div>
<div class=""><br class="">
</div>
<div class=""># topology</div>
<div class=""><br class="">
</div>
<div class="">   ndnpeek --> nfd (UDP 6363) --> ccn-lite-relay (UDP 3636) --> ccn-lite-repo256 (UDP 7777)</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""># case a), showing correct behavior</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$ ndnpeek -v /ndn/ch/unibas/repo256/movie7.mp4/_ >pkt-1.bin</div>
<div class="">INTEREST: /ndn/ch/unibas/repo256/movie7.mp4/_</div>
<div class="">DATA, RTT: 5ms</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$ shasum -a 256 pkt-1.bin</div>
<div class="">a3c19829edf901ff9d1a87f6da82af050a1cc302784b9b18ecd3812deef6795d  pkt-1.bin</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$ ndnpeek -v /ndn/ch/unibas/repo256/movie7.mp4/_/sha256digest=a3c19829edf901ff9d1a87f6da82af050a1cc302784b9b18ecd3812deef6795d
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;" class="" type="cite">
<div class="">pkt-2.bin</div>
</blockquote>
<div class="">INTEREST: /ndn/ch/unibas/repo256/movie7.mp4/_/sha256digest=a3c19829edf901ff9d1a87f6da82af050a1cc302784b9b18ecd3812deef6795d</div>
<div class="">DATA, RTT: 5ms</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$ cmp pkt-1.bin pkt-2.bin</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""># case b), showing the error</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$ ndnpeek -v -M 0 /ndn/ch/unibas/repo256/movie6.mp4/sha256digest=bc5f1a0e0712304cb9790aad2639397c6ad3d01fb2adf74a4572b100c5f12885 >pkt-3.bin</div>
<div class="">INTEREST: /ndn/ch/unibas/repo256/movie6.mp4/sha256digest=bc5f1a0e0712304cb9790aad2639397c6ad3d01fb2adf74a4572b100c5f12885?ndn.MaxSuffixComponents=0</div>
<div class="">TIMEOUT</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""># Log file captured with tcpdump (case b)</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$ sudo tcpdump -i lo 'udp port 6363 or udp port 3636 or udp port 7777' >traffic.log &</div>
<div class="">[2] 20530</div>
<div class="">tcpdump: verbose output suppressed, use -v or -vv for full protocol decode</div>
<div class="">listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$ ndnpeek -v -M 0 /ndn/ch/unibas/repo256/movie7.mp4/sha256digest=65d5baf5960a4151ee64f8aa93ed19c90c50932308d3019848f23b2f59bc0623 >pkt-3.bin</div>
<div class="">INTEREST: /ndn/ch/unibas/repo256/movie7.mp4/sha256digest=65d5baf5960a4151ee64f8aa93ed19c90c50932308d3019848f23b2f59bc0623?ndn.MaxSuffixComponents=0</div>
<div class="">TIMEOUT</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$ fg</div>
<div class="">sudo tcpdump -i lo 'udp port 6363 or udp port 3636 or udp port 7777' > traffic.log</div>
<div class="">^C6 packets captured</div>
<div class="">12 packets received by filter</div>
<div class="">0 packets dropped by kernel</div>
<div class=""><br class="">
</div>
<div class="">tschudin@cs-ndn-testbed1:~$ less traffic.log</div>
<div class="">00:47:08.269244 IP <a href="http://cs-ndn-testbed1.cs.unibas.ch" class="">
cs-ndn-testbed1.cs.unibas.ch</a>.6363 > <a href="http://cs-ndn-testbed1.cs.unibas.ch" class="">
cs-ndn-testbed1.cs.unibas.ch</a>.3636: UDP, length 87</div>
<div class="">00:47:08.270061 IP localhost.3636 > localhost.6363: UDP, length 87</div>
<div class="">00:47:08.270181 IP localhost.6363 > localhost.3636: UDP, length 100</div>
<div class="">00:47:08.270362 IP localhost.3636 > localhost.7777: UDP, length 87</div>
<div class="">00:47:08.271063 IP localhost.7777 > localhost.3636: UDP, length 3862</div>
<div class="">00:47:08.271227 IP <a href="http://cs-ndn-testbed1.cs.unibas.ch" class="">
cs-ndn-testbed1.cs.unibas.ch</a>.3636 > <a href="http://cs-ndn-testbed1.cs.unibas.ch" class="">
cs-ndn-testbed1.cs.unibas.ch</a>.6363: UDP, length 3862</div>
<div class=""><br class="">
</div>
<div class="">traffic.log (END)</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""># log from the ccn-lite relay (which links to the upstream repo256, both running</div>
<div class=""># on the same machine as nfd but using UDP ports 3636 and 7777, respectively)</div>
<div class=""><br class="">
</div>
<div class="">[D] 100.1443: ccnl_core_RX ifndx=0, 87 bytes</div>
<div class="">[D] 100.1443:   face 9, peer=192.43.193.111/6363</div>
<div class="">[I] 100.1444:   incoming interest=</ndn/ch/unibas/repo256/movie7.mp4>[65d5..0623]ndn2013 from=192.43.193.111/6363</div>
<div class="">[D] 100.1444:   searching in CS</div>
<div class="">[D] 100.1446:   created new interest entry 0x1364f70 (prefix=/ndn/ch/unibas/repo256/movie7.mp4)</div>
<div class="">[D] 100.1446: ccnl_interest_propagate</div>
<div class="">[D] 100.1447:   ccnl_interest_propagate, fwd==0x13650d0</div>
<div class="">[I] 100.1447:   outgoing interest=</ndn/ch/unibas/repo256/movie7.mp4> to=127.0.0.1/6363</div>
<div class="">[D] 100.1449: udp sendto(87 Bytes) to 127.0.0.1/6363 returned 87/0</div>
<div class="">[D] 100.1450:   ccnl_interest_propagate, fwd==0x100e1f0</div>
<div class="">[I] 100.1450:   outgoing interest=</ndn/ch/unibas/repo256/movie7.mp4> to=127.0.0.1/7777</div>
<div class="">[D] 100.1450: udp sendto(87 Bytes) to 127.0.0.1/7777 returned 87/0</div>
<div class="">[D] 100.1450: ccnl_core_RX ifndx=0, 100 bytes</div>
<div class="">[D] 100.1451:   face 2, peer=127.0.0.1/6363</div>
<div class="">[I] 100.1457:   ndnlp packet</div>
<div class="">[D] 100.1458: ccnl_core_RX ifndx=0, 3862 bytes</div>
<div class="">[D] 100.1458:   face 6, peer=127.0.0.1/7777</div>
<div class="">[I] 100.1458:   incoming data=</ndn/ch/unibas/repo256/movie7.mp4>[65d5..0623]ndn2013 from=127.0.0.1/7777</div>
<div class="">[I] 100.1458:   outgoing data=</ndn/ch/unibas/repo256/movie7.mp4>ndn2013 to=192.43.193.111/6363</div>
<div class="">[D] 100.1460: udp sendto(3862 Bytes) to 192.43.193.111/6363 returned 3862/0</div>
<div class="">[D] 100.1460:   adding content to cache</div>
<div class=""><br class="">
</div>
<div class="">---</div>
</blockquote>
</div>
_______________________________________________<br class="">
Nfd-dev mailing list<br class="">
<a href="mailto:Nfd-dev@lists.cs.ucla.edu" class="">Nfd-dev@lists.cs.ucla.edu</a><br class="">
http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>