<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi All, </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I am trying to study how PyNDN segment fetcher would work if multiple interests of a fixed window size were sent out at once. But before that, I need to confirm its current behaviour details. Could any of you please confirm me on these points?</div><div class="gmail_default"><span id="gmail-docs-internal-guid-4cd786b7-7c75-d4e7-bde4-b240f83857d3"><ol style="margin-top:0pt;margin-bottom:0pt"><ol style="margin-top:0pt;margin-bottom:0pt"><font face="tahoma, sans-serif"><li dir="ltr" style="list-style-type:lower-alpha;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline"><p dir="ltr" style="line-height:1.44;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Each data packet goes through signature validation, segment verification and expected data segment verification before next data packet is processed.</span></p></li><li dir="ltr" style="list-style-type:lower-alpha;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline"><p dir="ltr" style="line-height:1.44;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">It sends out interest request(one by one) for all the data packets that the file has been segmented into. And later concatenates all the retrieved data packets when all the data packets have been received. </span><span style="background-color:transparent">Each interest </span>have<span style="background-color:transparent;white-space:pre-wrap"> an interest </span>timeout<span style="background-color:transparent;white-space:pre-wrap">, data_segment_verification (whether a segment of the data is </span>whar<span style="background-color:transparent;white-space:pre-wrap"> we are looking for, and whether a verified segment). </span></p></li><li dir="ltr" style="list-style-type:lower-alpha;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline"><p dir="ltr" style="line-height:1.44;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">If signature validation or verification of any segment  fails, fetch process is aborted. (This can be turned off)</span></p></li><li dir="ltr" style="list-style-type:lower-alpha;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline"><p dir="ltr" style="line-height:1.44;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Fetch function calls the first data packet which in return calls the next data packets.  Once each interest packet is both validated and verified, AND is the expected data packet, the content is saved and concatenated to the final blob. Retries once, if the expected data packet does not arrive. Each data packet, when received successfully, calls the next data packet(_fetchNextSegment).</span></p></li><li dir="ltr" style="list-style-type:lower-alpha;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline"><p dir="ltr" style="line-height:1.44;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Process a-d go on until it is the last data packet.</span></p></li><li dir="ltr" style="list-style-type:lower-alpha;color:rgb(0,0,0);background-color:transparent;vertical-align:baseline"><p dir="ltr" style="line-height:1.44;margin-top:0pt;margin-bottom:0pt"><span style="background-color:transparent;vertical-align:baseline;white-space:pre-wrap">Thus, the packets are fetched and stored one-by-one. If any packet retrieval fails, the fetch process is aborted. (Maybe if this can be modified to fetch a chunk of segments, the file download time will be faster?)</span></p></li></font></ol></ol></span></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font face="tahoma, sans-serif"><span style="font-size:12.8000001907349px">Regards,</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Ishita </span></font><br></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Jun 1, 2017 at 12:09 PM,  <span dir="ltr"><<a href="mailto:Marc.Mosko@parc.com" target="_blank">Marc.Mosko@parc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
Just to flesh this out a little, and I agree with Nick’s suggestion, it does use the “right-most-child” selector.  By specifying the %C1.FS.file name component one will get the greatest version in the next name component, but you will also get the greatest
 segment too.  So, if you have metadata information, or key locators, or signing information, it would work best, I think, to put all that in the last segment which would be the first segment retrieved by this process.
<div><br>
</div>
<div>Marc</div><div><div class="h5">
<div><br>
<div>
<blockquote type="cite">
<div>On May 31, 2017, at 8:00 PM, Nick Briggs <<a href="mailto:nicholas.h.briggs@gmail.com" target="_blank">nicholas.h.briggs@gmail.com</a>> wrote:</div>
<br class="m_5295169313353281241Apple-interchange-newline">
<div>
<div style="word-wrap:break-word">
I think we misunderstand each other -- I don't think I was suggesting something that depended on the "greater" name component -- I'm suggesting that for whatever file name, in this case
<div><span class="m_5295169313353281241Apple-tab-span" style="white-space:pre-wrap"></span><span style="font-family:tahoma,sans-serif">/ndn/broadcast/ndnfs/<wbr>BigBuckBunny_4s_simple_2014_<wbr>05_09.mpd</span></div>
<div><font face="tahoma, sans-serif">his first interest should be for</font></div>
<div><font face="tahoma, sans-serif"><span class="m_5295169313353281241Apple-tab-span" style="white-space:pre-wrap"></span></font><span style="font-family:tahoma,sans-serif">/ndn/broadcast/ndnfs/<wbr>BigBuckBunny_4s_simple_2014_<wbr>05_09.mpd/%C1.FS.file</span></div>
<div><font face="tahoma, sans-serif">explicitly including the %C1.FS.file name component, which we know will be available, and which should get him a versioned response such as</font></div>
<div><font face="tahoma, sans-serif"><span class="m_5295169313353281241Apple-tab-span" style="white-space:pre-wrap"></span></font><span style="font-family:tahoma,sans-serif">/ndn/broadcast/ndnfs/<wbr>BigBuckBunny_4s_simple_2014_<wbr>05_09.mpd/</span><span style="font-family:tahoma,sans-serif">%C1.FS.file/</span><span style="font-family:tahoma,sans-serif">%FDY.%<wbr>DA%3D</span></div>
<div><font face="tahoma, sans-serif">(he couldn't get just a version number in place of the %C1.FS.file component... it wouldn't match)</font></div>
<div><font face="tahoma, sans-serif">and then he can extract the version number from that content and proceed to ask for the segments of the original name+newly discovered version.  It's the same two-step retrieval that was proposed, but if
 you add the %C1.FS.file component explicitly then you don't have to deal with the case you were warning about.</font></div>
<div><font face="tahoma, sans-serif"><br>
</font></div>
<div><font face="tahoma, sans-serif">-- Nick</font></div>
<div><font face="tahoma, sans-serif"><br>
</font></div>
<div><font face="tahoma, sans-serif"><br>
</font></div>
<div><font face="tahoma, sans-serif"><br>
</font>
<div>
<blockquote type="cite">
<div>On May 31, 2017, at 11:44 AM, Thompson, Jeff <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>> wrote:</div>
<br class="m_5295169313353281241Apple-interchange-newline">
<div>
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>In NDN we have to be careful with getting the “greater” name component because a longer component always comes after a shorter component in the ordering, independent of the bytes. And in this case, it looks like the version component has fewer
 bytes than the %C1.FS.file component which would be “greater”. (It doesn’t matter that it starts with the byte %C1 which is “less” than %FD.)</div>
<div><br>
</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="m_5295169313353281241OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Nick Briggs <<a href="mailto:nicholas.h.briggs@gmail.com" target="_blank">nicholas.h.briggs@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, May 31, 2017 at 11:35:00<br>
<span style="font-weight:bold">To: </span>Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>><br>
<span style="font-weight:bold">Cc: </span>Ishita Dasgupta <<a href="mailto:ishita.dasgupta@gmail.com" target="_blank">ishita.dasgupta@gmail.com</a>>, "<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.<wbr>edu</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.<wbr>edu</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] download a file using PyNDN<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap:break-word">
And if he knows he's looking for something of a file flavor then he can ask explicitly for (the highest version of) the name including the %C1.FS.file and proceed from there.
<div><br>
</div>
<div>--- Nick Briggs</div>
<div><br>
<div><br>
<div>
<blockquote type="cite">
<div>On May 31, 2017, at 11:30 AM, Thompson, Jeff <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>> wrote:</div>
<br class="m_5295169313353281241Apple-interchange-newline">
<div>
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>Yes, that will work. But it’s better to keep the name components in their native form as binary Blobs. The string representation is really only for display, or creating the initial name from a known string representation. You can simply save version
 as</div>
<div><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1" style="font-family:tahoma,sans-serif">data.getName().get(-</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s4" style="font-family:tahoma,sans-serif">1</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1" style="font-family:tahoma,sans-serif">)
 . Then, instead of </span></div>
<div><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1" style="font-family:tahoma,sans-serif"><br>
</span></div>
<div><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1" style="font-family:tahoma,sans-serif">   </span>name = Name(url+version)</div>
<div><br>
</div>
<div>use</div>
<div><br>
</div>
<div>    name = Name(url).append(version)</div>
<div><br>
</div>
<div>Something else to watch out for: There are data packets with names with and without the %C1.FS.file component. For example:</div>
<div><span style="font-family:tahoma,sans-serif">/ndn/broadcast/ndnfs/<wbr>BigBuckBunny_4s_simple_2014_<wbr>05_09.mpd/<b>%C1.FS.file</b>/%FDY.%<wbr>DA%3D </span></div>
<div><span style="font-family:tahoma,sans-serif">/ndn/broadcast/ndnfs/<wbr>BigBuckBunny_4s_simple_2014_<wbr>05_09.mpd/%FDY.%DA%3D/%00%01</span></div>
<div><br>
</div>
<div>So far, you’ve been lucky to get the data packet with %C1.FS.file where the version component is at data.getName().get(-1). But this is not guaranteed. It is valid for the NDN server to return one of the “segment” data packets with the second
 type of name, where the version component is at data.getName().get(-2). But you can easily check with data.getName().get(-1).<wbr>isVersion() .</div>
<div><a href="http://named-data.net/doc/ndn-ccl-api/name-component.html#name-component-isversion-method" target="_blank">http://named-data.net/doc/ndn-<wbr>ccl-api/name-component.html#<wbr>name-component-isversion-<wbr>method</a></div>
<div><br>
</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="m_5295169313353281241OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Ishita Dasgupta <<a href="mailto:ishita.dasgupta@gmail.com" target="_blank">ishita.dasgupta@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, May 31, 2017 at 11:13:00<br>
<span style="font-weight:bold">To: </span>Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.<wbr>edu</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.<wbr>edu</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] download a file using PyNDN<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div style="font-family:tahoma,sans-serif">Hi Jeff, </div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">Yes, I had gotten it working by removing the shutdown command. </div>
<div style="font-family:tahoma,sans-serif">Also, this is how I extract the version:</div>
<div style="font-family:tahoma,sans-serif">From the first face expressInterest, I get the version from the _onData method I defined as follows:</div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1"> </span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s2">def</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1"></span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s3">onData</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">(self,
 interest, data):<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">        self._callbackCount +=
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s4">1<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">        dump(</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s4">"Got data packet with name"</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">, data.getName().toUri())<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">        </span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s2">global</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1"> version<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">        version = </span>
<span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s4">'/'</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">+</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s3">str</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">(data.getName().get(-</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s4">1</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">)<wbr>)<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">        dump(</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s4">"Version extracted"</span><span class="m_5295169313353281241gmail-m_-4860798478954399733gmail-s1">,version)</span></blockquote>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">
<div style="font-family:tahoma,sans-serif">which gives me the output:</div>
<div style="font-family:tahoma,sans-serif">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<span class="m_5295169313353281241gmail-s1">Got data packet with name /ndn/broadcast/ndnfs/<wbr>BigBuckBunny_4s_simple_2014_<wbr>05_09.mpd/%C1.FS.file/%FDY.%<wbr>DA%3D <br>
</span><span class="m_5295169313353281241gmail-s1"></span></blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
 </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<span class="m_5295169313353281241gmail-s1">Version extracted /%FDY.%DA%3D </span></blockquote>
</div>
<div style="font-family:tahoma,sans-serif"><span style="font-size:12.8px"><br>
</span></div>
<div style="font-family:tahoma,sans-serif"><span style="font-size:12.8px">Regards,</span></div>
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><font face="tahoma,sans-serif"><span style="font-size:12.8px">Ishita Dasgupta</span><br style="font-size:12.8px">
<i style="font-size:12.8px">Graduate Student<br>
</i><i><font size="2"><span>College</span> of <span>Information</span> and <span>Com<wbr>puter</span> <span>Sciences</span></font></i><i style="font-size:12.8px">,<br>
UMass Amherst</i><br style="font-size:12.8px">
<i style="font-size:12.8px">Email</i><span style="font-size:12.8px">:
<a href="mailto:ishitadg@cs.umass.edu" target="_blank">ishitadg@cs.umass.edu</a></span></font><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, May 31, 2017 at 1:32 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:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>Yes. This is called “name discovery”. </div>
<div><br>
</div>
<div>A question: You have "Name(url+version)”. I don’t see where you get “version”.</div>
<div><br>
</div>
<div>A hint: Maybe you shouldn’t call face.shutdown() the first time. Only call it at the end of your program.</div>
<div><br>
</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Ishita Dasgupta <<a href="mailto:ishita.dasgupta@gmail.com" target="_blank">ishita.dasgupta@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, May 31, 2017 at 8:14:00
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733h5"><br>
<span style="font-weight:bold">To: </span>Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] download a file using PyNDN<br>
</div>
</div>
</div>
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div style="font-family:tahoma,sans-serif">Hi Jeff, </div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">I have got it working! Let me know if my procedure to extract the version number by sending a sample interest packet and receiving a sample data packet is correct or is there a simpler method
 to do it?</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><font face="tahoma,sans-serif"><span style="font-size:12.8px">Regards,</span><br style="font-size:12.8px">
<span style="font-size:12.8px">Ishita Dasgupta</span><br style="font-size:12.8px">
<i style="font-size:12.8px">Graduate Student<br>
</i><i><font size="2"><span>College</span> of <span>Information</span> and <span>Com<wbr>puter</span> <span>Sciences</span></font></i><i style="font-size:12.8px">,<br>
UMass Amherst</i><br style="font-size:12.8px">
<i style="font-size:12.8px">Email</i><span style="font-size:12.8px">:
<a href="mailto:ishitadg@cs.umass.edu" target="_blank">ishitadg@cs.umass.edu</a></span></font><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, May 31, 2017 at 10:46 AM, Ishita Dasgupta <span dir="ltr">
<<a href="mailto:ishita.dasgupta@gmail.com" target="_blank">ishita.dasgupta@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<div dir="ltr">
<div style="font-family:tahoma,sans-serif">Hi Jeff, </div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">To extract the current version, I express an interest on the face and extract the version from the data packet received. Then use this version to extract our data in segments using segment fetcher. </div>
<div style="font-family:tahoma,sans-serif">The main code lines look something like this</div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote" type="cite">
<span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">
<div style="font-family:tahoma,sans-serif;display:inline">​       ​</div>
name = Name(url)</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1"><br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">        face.expressInterest(name, counter.onData, counter.onTimeout)
<div style="font-family:tahoma,sans-serif;display:inline">​ ​</div>
<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">       
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s3">while</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1"> counter._callbackCount <
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s2">1</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">:<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">                face.processEvents()<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">        face.shutdown()<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">        name = Name(url+version)<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">        dump(</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s2">"Express name "</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">,
 name.toUri())<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">        interest = Interest(name)<br>
</span><span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">        interest.setInterestLifetimeMi<wbr>lliseconds(</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s2">1000</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">)<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">        SegmentFetcher.fetch(face, interest,
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s4">None</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">, counter.onComplete, counter.onError)<br>
</span></span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">       
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s3">while</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1"> counter._callbackCount <
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s2">2</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">:<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">                face.processEvents()<br>
</span>
<div style="font-family:tahoma,sans-serif;display:inline">​       ​</div>
face.shutdown()</blockquote>
<div> </div>
<div><span style="font-family:tahoma,sans-serif">But for the first interest, </span>i<span style="font-family:tahoma,sans-serif"> receive a "broken" vers</span>ion number
<div style="font-family:tahoma,sans-serif;display:inline">(</div>
<span style="font-family:tahoma,sans-serif">%FDY.%CF-</span>
<div style="font-family:tahoma,sans-serif;display:inline">)</div>
? which is why the segment fetcher doesn't work (?)</div>
<div><br>
</div>
<div style="font-family:tahoma,sans-serif">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">1496241583.724584 From: 192.1.242.150, To: 192.1.242.151, Tunnel Type: TCP, INTEREST: /ndn/broadcast/ndnfs/BigBuckBu<wbr>nny_4s_simple_2014_05_09.mpd?n<wbr>dn.MustBeFresh=1&ndn.Nonce=150<wbr>0003601<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail-s1">1496241583.734759 From: 192.1.242.151, To: 192.1.242.150, Tunnel Type: TCP, DATA: /ndn/broadcast/ndnfs/BigBuckBu<wbr>nny_4s_simple_2014_05_09.mpd/%<wbr>C1.FS.file/%FDY.%CF-</span></blockquote>
<div><br>
</div>
<div>Is this how I should go about to fetch the version number before expressing the interest or is there a simpler method? </div>
</div>
</div>
<div class="gmail_extra"><span><br clear="all">
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><font face="tahoma,sans-serif"><span style="font-size:12.8px">Regards,</span><br style="font-size:12.8px">
<span style="font-size:12.8px">Ishita Dasgupta</span><br style="font-size:12.8px">
<i style="font-size:12.8px">Graduate Student<br>
</i><i><font size="2"><span>College</span> of <span>Information</span> and <span>Com<wbr>puter</span> <span>Sciences</span></font></i><i style="font-size:12.8px">,<br>
UMass Amherst</i><br style="font-size:12.8px">
<i style="font-size:12.8px">Email</i><span style="font-size:12.8px">:
<a href="mailto:ishitadg@cs.umass.edu" target="_blank">ishitadg@cs.umass.edu</a></span></font><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</span>
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411h5">
<div class="gmail_quote">On Fri, May 26, 2017 at 2:39 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:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>That’s right. The names of the actual segment Data packets should be</div>
<div><br>
</div>
<div>
<div><span style="font-family:Calibri">/ndn/broadcast/ndnfs/</span><span style="font-family:Calibri">BigBuckBu<wbr>nny_4s_simple_2014_</span><span style="font-family:Calibri">05_09.mpd/%<wbr>FDY%</span><span style="font-family:Calibri;font-size:inherit">28Q8/%00%00</span></div>
</div>
<div>
<div>
<div><span style="font-family:Calibri">/ndn/broadcast/ndnfs/</span><span style="font-family:Calibri">BigBuckBu<wbr>nny_4s_simple_2014_</span><span style="font-family:Calibri">05_09.mpd/%<wbr>FDY%</span><span style="font-family:Calibri;font-size:inherit">28Q8/%00%01</span></div>
</div>
</div>
<div>
<div><span style="font-family:Calibri">/ndn/broadcast/ndnfs/</span><span style="font-family:Calibri">BigBuckBu<wbr>nny_4s_simple_2014_</span><span style="font-family:Calibri">05_09.mpd/%<wbr>FDY%</span><span style="font-family:Calibri;font-size:inherit">28Q8/%00%02</span></div>
</div>
<div><span style="font-family:Calibri;font-size:inherit"><br>
</span></div>
<div><span style="font-family:Calibri;font-size:inherit">etc., up to the maximum segment number. You give SegmentFetcher the name without the final segment number component, and it adds the segment number component as it fetches each one.</span></div>
<div><span style="font-family:Calibri;font-size:inherit"><br>
</span></div>
<div><span style="font-family:Calibri;font-size:inherit">- Jeff T</span></div>
<div><span style="font-family:Calibri;font-size:inherit"><br>
</span></div>
<span id="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Ishita Dasgupta <<a href="mailto:ishita.dasgupta@gmail.com" target="_blank">ishita.dasgupta@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Friday, May 26, 2017 at 11:35:00
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385h5">
<br>
<span style="font-weight:bold">To: </span>Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] download a file using PyNDN<br>
</div>
</div>
</div>
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div><font face="tahoma,sans-serif">So, just so that I understand this correctly: " </font><span style="font-family:Calibri;font-size:14px">%FDY%</span><span style="font-family:Calibri;font-size:12.8px">28Q8
 " </span><span style="font-size:12.8px"><font face="arial,helvetica,sans-serif">is the version component of the all data packet segments representing the file. And then the Segment Fetcher program sequentially downloads the segments individually
 (and I don't need to worry about the segment numbers?)</font></span></div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><font face="tahoma,sans-serif"><span style="font-size:12.8px">Regards,</span><br style="font-size:12.8px">
<span style="font-size:12.8px">Ishita Dasgupta</span><br style="font-size:12.8px">
<i style="font-size:12.8px">Graduate Student<br>
</i><i><font size="2"><span>College</span> of <span>Information</span> and <span>Com<wbr>puter</span> <span>Sciences</span></font></i><i style="font-size:12.8px">,<br>
UMass Amherst</i><br style="font-size:12.8px">
<i style="font-size:12.8px">Email</i><span style="font-size:12.8px">:
<a href="mailto:ishitadg@cs.umass.edu" target="_blank">ishitadg@cs.umass.edu</a></span></font><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Fri, May 26, 2017 at 2:31 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:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<div style="word-wrap:break-word">
<div style="font-size:14px"><font face="Calibri">Please try the following: Don’t add the line to set the exclude filter, and change the name to include the version number (without “%C1.FS.file”):</font></div>
<div style="font-size:14px"><font face="Calibri"><br>
</font></div>
<div><font face="Calibri">name3 = Name("<span style="font-size:14px">/ndn/broadcast/ndnfs/</span><span style="font-size:14px">Big<wbr>BuckBunny_4s_simple_2014_</span><span style="font-size:14px">05_09<wbr>.mpd/%FDY%</span>28Q8”)</font></div>
<div><font face="Calibri"><br>
</font></div>
<div style="font-family:Calibri,sans-serif;font-size:14px">The reason is that the segment component comes after the version component “<span style="font-family:Calibri">/%FDY%</span><span style="font-family:Calibri">28Q8</span>”.</div>
<div style="font-family:Calibri,sans-serif;font-size:14px"><br>
</div>
<div style="font-family:Calibri,sans-serif;font-size:14px">- Jeff T</div>
<div style="font-family:Calibri,sans-serif;font-size:14px"><br>
</div>
<span id="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016OLK_SRC_BODY_SECTION" style="font-family:Calibri,sans-serif;font-size:14px">
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Ishita Dasgupta <<a href="mailto:ishita.dasgupta@gmail.com" target="_blank">ishita.dasgupta@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Friday, May 26, 2017 at 11:22:00
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751h5">
<br>
<span style="font-weight:bold">To: </span>Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] download a file using PyNDN<br>
</div>
</div>
</div>
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div style="font-family:tahoma,sans-serif">Hi Jeff, </div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">Now it would not return any Data packet at all.</div>
<div style="font-family:tahoma,sans-serif">At consumer(ndndump):</div>
<div style="font-family:tahoma,sans-serif">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016gmail-s1">1495818158.862071 From: 192.1.242.150, To: 192.1.242.151, Tunnel Type: TCP, INTEREST: /ndn/broadcast/ndnfs/BigBuckBu<wbr>nny_4s_simple_2014_05_09.mpd?n<wbr>dn.ChildSelector=1&ndn.MustBeF<wbr>resh=1&ndn.InterestLifetime=10<wbr>00&ndn.Nonce=1259570516&ndn.Ex<wbr>clude=%C1.FS.file</span> </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<NO DATA PACKET IN RESPONSE> </blockquote>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><font face="tahoma,sans-serif"><span style="font-size:12.8px">Regards,</span><br style="font-size:12.8px">
<span style="font-size:12.8px">Ishita Dasgupta</span><br style="font-size:12.8px">
<i style="font-size:12.8px">Graduate Student<br>
</i><i><font size="2"><span>College</span> of <span>Information</span> and <span>Com<wbr>puter</span> <span>Sciences</span></font></i><i style="font-size:12.8px">,<br>
UMass Amherst</i><br style="font-size:12.8px">
<i style="font-size:12.8px">Email</i><span style="font-size:12.8px">:
<a href="mailto:ishitadg@cs.umass.edu" target="_blank">ishitadg@cs.umass.edu</a></span></font><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Fri, May 26, 2017 at 12:54 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:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>After</div>
<div><br>
</div>
<div>interest = Interest(name3)</div>
<div><br>
</div>
<div>try adding </div>
<div><br>
</div>
<div>interest.getExclude().appendCo<wbr>mponent(Name("%C1.FS.file")[0]<wbr>)</div>
<div><br>
</div>
<div>This is because NDNFS not only serves the Data packet segments of the file, but a “meta info” packet where the name has the component “"%C1.FS.file”. The code above should exclude it.</div>
<div><br>
</div>
<div>Let us know,</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Ishita Dasgupta <<a href="mailto:ishita.dasgupta@gmail.com" target="_blank">ishita.dasgupta@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Friday, May 26, 2017 at 9:38:00<br>
<span style="font-weight:bold">To: </span>Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>>
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016h5">
<br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] download a file using PyNDN<br>
</div>
</div>
</div>
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div style="font-family:tahoma,sans-serif">Hi Jeff, </div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">I have a file test.txt being served on my ndnfs server. Prefix: /ndn/broadcast/ndnfs</div>
<div style="font-family:tahoma,sans-serif">I implement SegmentFetcher in the following way and print content and error message <br>
<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote" type="cite">
 name3 = Name(url)<br>
<span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s1"> dump(</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s2">"Express
 name "</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s1">, name3.toUri())<br>
</span> interest = Interest(name3)<br>
 dump(interest.toUri())<br>
<span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s1"> interest.setInterestLifetimeM<wbr>illiseconds(</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s2">1000</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s1">)<br>
</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s1" style="color:rgb(77,47,45);font-family:Courier;font-size:12px">SegmentFetcher.fetch(face,
 interest, </span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s3" style="font-family:Courier;font-size:12px">None</span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s1" style="color:rgb(77,47,45);font-family:Courier;font-size:12px">,
 counter.onComplete, counter.onError)</span> </blockquote>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">This is what i get: </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<span style="font-family:tahoma,sans-serif">/ndn/broadcast/ndnfs/BigBuckBu<wbr>nny_4s_simple_2014_05_09.mpd?n<wbr>dn.MustBeFresh=true <br>
</span><span style="font-family:tahoma,sans-serif">onError<br>
</span><span style="font-family:tahoma,sans-serif">2<br>
</span><span style="font-family:tahoma,sans-serif">Got an unexpected packet without a segment number: /ndn/broadcast/ndnfs/BigBuckBu<wbr>nny_4s_simple_2014_05_09.mpd/%<wbr>C1.FS.file/%FDY%28Q8</span></blockquote>
<div><br>
</div>
<div style="font-family:tahoma,sans-serif">When I do an ndndump on the consumer, I see: </div>
<div style="font-family:tahoma,sans-serif">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s1">1495816236.074843 From: 192.1.242.150, To: 192.1.242.151, Tunnel Type: TCP, INTEREST: /ndn/broadcast/ndnfs/BigBuckBu<wbr>nny_4s_simple_2014_05_09.mpd?n<wbr>dn.ChildSelector=1&ndn.MustBeF<wbr>resh=1&ndn.InterestLifetime=10<wbr>00&ndn.Nonce=3797640908</span> </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
 </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s1"></span><span class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail-s1">1495816236.085709
 From: 192.1.242.151, To: 192.1.242.150, Tunnel Type: TCP, DATA: /ndn/broadcast/ndnfs/BigBuckBu<wbr>nny_4s_simple_2014_05_09.mpd/%<wbr>C1.FS.file/%FDY%28Q8</span></blockquote>
<div><br>
</div>
<div>I thought fetching segment number was internally done in your Segment Fetcher util. Do I need to implement it some way on my end as well? </div>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><font face="tahoma,sans-serif"><span style="font-size:12.8px">Regards,</span><br style="font-size:12.8px">
<span style="font-size:12.8px">Ishita Dasgupta</span><br style="font-size:12.8px">
<i style="font-size:12.8px">Graduate Student<br>
</i><i><font size="2"><span>College</span> of <span>Information</span> and <span>Com<wbr>puter</span> <span>Sciences</span></font></i><i style="font-size:12.8px">,<br>
UMass Amherst</i><br style="font-size:12.8px">
<i style="font-size:12.8px">Email</i><span style="font-size:12.8px">:
<a href="mailto:ishitadg@cs.umass.edu" target="_blank">ishitadg@cs.umass.edu</a></span></font><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Thu, May 25, 2017 at 2:15 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:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>Hi Ishita,</div>
<div><br>
</div>
<div>We have NDNFS producing sample data at <a href="http://memoria.ndn.ucla.edu/" target="_blank">
memoria.ndn.ucla.edu</a>. The PyNDN code below uses the SegmentFetcher to fetch the segments of a file (a JavaScript file). NDNFS has split the file into 12 segments, which SegmentFetcher retrieves to supply the content to the callback. SegmentFetcher documentation
 is here:</div>
<div><a href="https://github.com/named-data/PyNDN2/blob/master/python/pyndn/util/segment_fetcher.py#L142" target="_blank">https://github.com/named-data/<wbr>PyNDN2/blob/master/python/pynd<wbr>n/util/segment_fetcher.py#L142</a><wbr> </div>
<div><br>
</div>
<div>- Jeff T</div>
<div><br>
</div>
<div>
<div>import time, sys</div>
<div>from pyndn import Name, Interest, Face</div>
<div>from pyndn.util import SegmentFetcher</div>
<div><br>
</div>
<div>face = Face("<a href="http://memoria.ndn.ucla.edu/" target="_blank">memoria.ndn.ucla.edu</a>")</div>
<div>SegmentFetcher.fetch(face, Interest(Name(</div>
<div>  "/ndn/edu/ucla/remap/demo/ndn-<wbr>js-test/<a href="http://named-data.net/wp-includes/js/jquery/jquery.js/%FDX%DC5B" target="_blank">named-data.net/wp-incl<wbr>udes/js/jquery/jquery.js/%FDX%<wbr>DC5B</a>")),</div>
<div>  None, lambda content: sys.stdout.write(content.toRaw<wbr>Str()),</div>
<div>  lambda errorCode, message: sys.stdout.write("Got error " + message))</div>
<div><br>
</div>
<div>while True:</div>
<div>    face.processEvents()</div>
<div>    time.sleep(0.01)</div>
</div>
<div><br>
</div>
<div><br>
</div>
<span id="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119m_-584098919483880819OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Ishita Dasgupta <<a href="mailto:ishita.dasgupta@gmail.com" target="_blank">ishita.dasgupta@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Thursday, May 25, 2017 at 6:00:00<br>
<span style="font-weight:bold">To: </span>Jeff Thompson <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>>, "<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>"
 <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [Ndn-interest] download a file using PyNDN<br>
</div>
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119h5">
<div><br>
</div>
<div>
<div>
<div dir="ltr">
<div>Hi Jeff, </div>
<div><br>
</div>
<div>Yes
<div style="font-family:tahoma,sans-serif;display:inline">​, the producer is responding to Interests with Data packets representing the file. I run NDNFS on the producer.</div>
</div>
<div>
<div style="font-family:tahoma,sans-serif;display:inline">​</div>
<br>
<div class="gmail_quote">
<div>On Wed, May 24, 2017 at 4:35 PM Thompson, Jeff <<a href="mailto:jefft0@remap.ucla.edu" target="_blank">jefft0@remap.ucla.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<div>Hi Ishta,</div>
<div><br>
</div>
<div>In NDN, there is a producer and consumer. The consumer sends an Interest and the producer (or a cache in the network) responds with a Data packet. When you say “an entire file from an NDN server” I assume you mean a producer that is responding
 to Interests with Data packets representing the file. What producer software is running on the server?</div>
<div><br>
</div>
<div>- Jeff T</div>
<div><br>
</div>
<span id="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119m_-584098919483880819m_-8976340295034124263m_7103723139979724157OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri;font-size:11pt;text-align:left;border-width:1pt medium medium;border-style:solid none none;padding:3pt 0in 0in;border-top-color:rgb(181,196,223)">
<span style="font-weight:bold">From: </span>Ndn-interest <<a href="mailto:ndn-interest-bounces@lists.cs.ucla.edu" target="_blank">ndn-interest-bounces@lists.cs<wbr>.ucla.edu</a>> on behalf of Ishita Dasgupta <<a href="mailto:ishita.dasgupta@gmail.com" target="_blank">ishita.dasgupta@gmail.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, May 24, 2017 at 8:29:00<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>" <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.ed<wbr>u</a>><br>
<span style="font-weight:bold">Subject: </span>[Ndn-interest] download a file using PyNDN<br>
</div>
</span></div>
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif">
<span id="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119m_-584098919483880819m_-8976340295034124263m_7103723139979724157OLK_SRC_BODY_SECTION">
<div><br>
</div>
<div>
<div>
<div>
<div style="font-family:tahoma,sans-serif">Hi All, </div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">Has anybody used PyNDN to download an entire file from an ndn server?</div>
<div style="font-family:tahoma,sans-serif">I see or receive jibberish data in form of one data packet but don't seem to copying the exact content of the file(no matter the size, i.e irrespective of the fact that the file gets divided to
 multiple segments or just one segment).</div>
<div style="font-family:tahoma,sans-serif">Any guidance with this would be helpful.</div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">Thanks,</div>
<div style="font-family:tahoma,sans-serif">Ishita</div>
<div>
<div class="m_5295169313353281241gmail-m_-4860798478954399733m_-6299356388320936411m_7220698003351639385m_-9078321456016176751m_-2077943756557895016m_-1835740769646663119m_-584098919483880819m_-8976340295034124263m_7103723139979724157gmail_signature">
<div>
<div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</span></div>
______________________________<wbr>_________________<br>
Ndn-interest mailing list<br>
<a href="mailto:Ndn-interest@lists.cs.ucla.edu" target="_blank">Ndn-interest@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndn-interest</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</span></div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
______________________________<wbr>_________________<br>
Ndn-interest mailing list<br>
<a href="mailto:Ndn-interest@lists.cs.ucla.edu" target="_blank">Ndn-interest@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndn-interest</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div></div></div>

</blockquote></div><br></div></div>