<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi huyao,<div><br></div><div>Not really. An application has basically no control on how exactly and to where its interests are getting forwarded.</div><div>Moreover, an application does not know (and should not know) anything about other faces of an NDN router.</div><div><br></div><div>Actually, there is already some code (this is part of the forwarding strategy) that attempts to use different faces if interest is retransmitted. If an NDN router receives an interests for which there is an outstanding PIT entry, and this interest is coming from the face from which the router has already received an interest (with different nonce), such an interest is considered a retransmission and there is an attempt to forward the interest somewhere else.</div><div><br></div><div>ndn::ForwardingStrategy::DetectRetransmittedInterest method defines the retransmission detection logic.</div><div>ndn::ForwardingStrategy::CanSendOutInterest performing some checking to determine whether an interest should be forwarded on the face or not, considering possible retransmission (this call is used in DoPropagateInterst by the implemented forwarding strategies).</div><div><br></div><div>---</div><div>Alex</div><div><br><div><div>On May 1, 2013, at 8:22 AM, yao hu <<a href="mailto:huyao0107@gmail.com">huyao0107@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi Alex,<div><br></div><div style="">Thanks for your answer. I am sorry there is one more question after this. </div><div style="">How to re-send timed out interest to all faces, not retransmit it to the same face again? Do I have to write my own "customConsumer", and do the following </div>
<div style="">ndn::AppHelper consumerHelper ("customConsumer");</div><div>ApplicationContainer consumer = consumerHelper.Install (node);</div><div><br></div><div style="">Am I right? Thanks a lot~</div><div style=""><br>
</div><div style="">Regards,</div><div style="">huyao</div><div style=""><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/29 Alex Afanasyev <span dir="ltr"><<a href="mailto:alexander.afanasyev@ucla.edu" target="_blank">alexander.afanasyev@ucla.edu</a>></span><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"><div>Hi huyao,</div><div><br></div><div>Actually, each retransmitted Interest by ndn::Consumer* application gets its own "unique" (random) nonce.</div>
<div><br></div><div>Consumer::CheckRetxTimeout method (<a href="https://github.com/NDN-Routing/ndnSIM/blob/master/apps/ndn-consumer.cc#L122" target="_blank">https://github.com/NDN-Routing/ndnSIM/blob/master/apps/ndn-consumer.cc#L122</a>) is responsible for detecting and scheduling retransmission of Interest.</div>
<div><br></div><div>---</div><div>Alex</div><div><div class="h5"><br><div><div>On Apr 28, 2013, at 7:12 PM, yao hu <<a href="mailto:huyao0107@gmail.com" target="_blank">huyao0107@gmail.com</a>> wrote:</div><br><blockquote type="cite">
<div dir="ltr">Hi Alex,<div><br></div><div>Thanks for your reply. I see. </div><div><br></div><div>One more question is about interest time out or retransmission. Is there a method or function to deal with Interest retransmission or retransmission queue in ndnsim? How about adding a new value to the nonce field in retransmission Interest packet to differentiate it from the orginal one?</div>
<div><br></div><div>I assume that by default the original Interest and the retransmission Interest if timeout happens should be the same format, right?</div><div><br></div><div>Thanks a lot ~</div>
<div><br></div><div>Regards,</div><div>huyao</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/29 Alex Afanasyev <span dir="ltr"><<a href="mailto:alexander.afanasyev@ucla.edu" target="_blank">alexander.afanasyev@ucla.edu</a>></span><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"><div>Hi huyao,</div><div><br></div><div>(1) The application is fully responsible to put the nonce into the interests. ndn::Consumer-based applications put nonce from uniform distribution (<a href="https://github.com/NDN-Routing/ndnSIM/blob/master/apps/ndn-consumer.cc#L206" target="_blank">https://github.com/NDN-Routing/ndnSIM/blob/master/apps/ndn-consumer.cc#L206</a>)</div>
<div><br></div><div>(2) There is GetNonce() method for ndn::Interest class</div><div><br></div><div>(3) If you write your own app, you just set nonce using SetNonce method. If you want to reuse existing consumers, then you probably need to change their implementation to some extent.</div>
<div><br></div><div>---</div><div>Alex</div><br><div><div><div><div>On Apr 28, 2013, at 7:06 AM, yao hu <<a href="mailto:huyao0107@gmail.com" target="_blank">huyao0107@gmail.com</a>> wrote:</div><br></div>
</div><blockquote type="cite"><div><div dir="ltr">Hi Alex,<div><br></div><div>ndnsim documents says nonce field is filled with a value of <span style="font-size:12px;line-height:14px">uint32_t type. Could you please tell </span></div>
<div><span style="font-size:12px;line-height:14px"><br></span></div><div><span style="font-size:12px;line-height:14px">(1) what value is filled in nonce field in the current Interest packet implementation. </span></div>
<div><span style="font-size:12px;line-height:14px"><br></span></div><div><span style="font-size:12px;line-height:14px">(2) how to get the nonce value when receiving Interest packet?</span></div>
<div><span style="font-size:12px;line-height:14px"><br></span></div><div><span style="font-size:12px;line-height:14px">(3) is it possible to fill a self-defined value into nonce field?</span></div>
<div><span style="font-size:12px;line-height:14px"><br></span></div><div><span style="font-size:12px;line-height:14px">Thanks very much!</span></div><div><span style="font-size:12px;line-height:14px"><br>
</span></div><div><span style="font-size:12px;line-height:14px">Regards,</span></div><div><span style="font-size:12px;line-height:14px">huyao</span></div></div></div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</blockquote></div><br></div></blockquote></div><br></div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</blockquote></div><br></div></div></div></blockquote></div><br></div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br></blockquote></div><br></div></body></html>