<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Alex,</div><div><br></div><div><br></div>in Consumer.cc,  in the function OnContentObject, according to your email, it may also process Nack, right? if hopCount = -1, it means the Packet is a Nack, but it still print that the Data is comming.<div><br></div><div><br><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  uint32_t seq = boost::lexical_cast<uint32_t> (contentObject->GetName ().GetComponents ().back ());</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  NS_LOG_INFO (<span style="color: #3933ff">"< DATA for "</span> << seq);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  <span style="color: #931a68">int</span> hopCount = -1;</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  FwHopCountTag hopCountTag;</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  <span style="color: #931a68">if</span> (payload->RemovePacketTag (hopCountTag))</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">    {</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">      hopCount = hopCountTag.Get ();</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">    }</div><div><br></div><div><br></div><div>That's quit strange.</div><div><br></div><div apple-content-edited="true">
<div><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; position: static; z-index: auto; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" color="#b5c4df" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Dept. of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, P. R. China</font></span></div></font></div></div>
</div>
<br><div><div>On Mar 8, 2013, at 11:37 AM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Alex,<div><span class="Apple-tab-span" style="white-space:pre">   </span>I add an issue here: <a href="https://github.com/NDN-Routing/ndnSIM/issues/26">https://github.com/NDN-Routing/ndnSIM/issues/26</a> , but I am not sure it is what you want.</div><div><br></div><div>P.S, when do you plan to merge new Rtt Estimator?</div><div><br></div><div><br><div><div>
<div><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Dept. of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, P. R. China</font></span></div></font></div></div>
</div>
<br><div><div>On Mar 8, 2013, at 11:31 AM, Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Xiaoke,</div><div><br></div><div>Yes. I haven't yet had chance to make the implementation and -1 will mean that somewhere on the way Interest got "NACKed".  Can you open an issue for this on github?  </div><div><br></div><div>Thanks,</div><div>Alex</div><br><div><div>On Mar 7, 2013, at 7:16 PM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Alex,<div><span class="Apple-tab-span" style="white-space:pre">   </span>I am not sure whether you have improve hop count or not. Now as far as I can understand,  hop count = -1 means Interest got Nack (from provider or middle router). </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Is it accurate?</div><div><br></div><div><br><div>
<div><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Dept. of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, P. R. China</font></span></div></font></div></div>
</div>
<br><div><div>On Jan 23, 2013, at 1:36 AM, Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 21, 2013, at 11:18 PM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thank you Alex. Your email really makes sense.<div><br></div><div>I think for a Interest-Nack there is same problem with Interest-Content, hop count for last transmission and hop count for whole transmission(This is quit important, which can measure hop cost of request), what do you think?</div><div><br></div><div>For our trace, there is trace information for those interest who gets its data, in this case, if hopcount=-1, it means a Nack return but not data, is it suitable to not print trace information, RIGHT?</div><div><br></div><div>FYI,  it's quit strange, because this code is inside OnContent function, but not OnNack.</div></div></blockquote><div><br></div><div>There is another thing with hop counting.  It is implemented using packet tags, which means that packets tags in the Interest should be transferred to the Content Object.  With NACKs, these tags are getting lost when NACK is generated, because I didn't consider tags when I originally implemented them.  As a result, as soon as something get nacked, the tag is lost and can't reappear again in ContentObject.</div><div><br></div><div>The "fix" to preserve hop count in NACKs is trivial.  Less trivial is to count whole transmission and last transmission separately...</div><div><br></div><div>--</div><div>Alex</div></div></div></blockquote></div></div></div></blockquote></div><br></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></body></html>