<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Looks good.</div><div><br></div><div>Your forwarding strategy has full control on how Interests are forwarded, so you're free to ignore the contents suggested faces in the FIB entry.<br><br>---<div>Alex</div></div><div><br>On Mar 30, 2013, at 9:34 PM, yao hu <<a href="mailto:huyao0107@gmail.com">huyao0107@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi Alex,<div><br></div><div style="">Thanks for your reply. That means <span style="font-family:arial,sans-serif;font-size:14px">SetDefaultRoutes(true) does not conflict with my later implementation in </span><font face="arial, sans-serif"><span style="font-size:14px">ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::CustomStrategy")? That is, before </span></font><span style="color:rgb(0,0,0);font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;font-size:12px;line-height:15px;text-align:justify">installing stack on nodes, the following codes is ok?</span></div>
<div style=""><font face="arial, sans-serif"><span style="font-size:14px"><br></span></font></div><div style=""><font face="arial, sans-serif"><span style="font-size:14px"><div>  ndn::StackHelper ccnxHelper;</div><div>  <b>ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::CustomStrategy");</b></div>
<div>  <b>ccnxHelper.SetDefaultRoutes (true);</b></div><div>  ccnxHelper.SetContentStore ("ns3::ndn::cs::Lru",</div><div>                              "MaxSize", "1"); // ! Attention ! If set to 0, then MaxSize is infinite</div>
<div>  ccnxHelper.InstallAll ();</div><div><br></div><div style="">Regards,</div><div style="">huyao</div><div style=""><br></div></span></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/31 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>You still have to have an entry in FIB that corresponds to forwarded interests.  This entry is part of overall logic to forward interests, data, and record data performance stats for the forwarded data.</div>
<div><br></div><div>In your case, you can have an entry that corresponds to "/" prefix.  The easiest way to do it, is to use ndn::StackHelper::SetDefaultRoutes(true), which will create this entry and fill with all available faces (which you can ignore later).<div>
<div><br></div><div>---</div><div>Alex</div><div><div class="h5"><div><br><div><div>On Mar 30, 2013, at 8:33 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>I see. I forgot about it. Thanks for your explanation. I am sorry I have one question about flooding strategy in ndnsim. </div><div><br></div><div>I saw your reply <a href="http://www.lists.cs.ucla.edu/pipermail/ndnsim/2012-December/000030.html" target="_blank">http://www.lists.cs.ucla.edu/pipermail/ndnsim/2012-December/000030.html</a> that mentions how to flood to all available faces not listed in FIB. Now I assume that when ndnsim simulation starts, I do not manually configure FIB routes by AddRoute, that is, FIB on each node is empty, and let each node forward the incoming interest to all available faces and <span style="white-space:pre-wrap">don't want them to add to FIB entries by the following</span></div>

<div><span style="white-space:pre-wrap"><br></span></div><div><font><span style="white-space:pre-wrap">        Ptr<L3Protocol> ndn = this->GetObject<L3Protocol> ();
        for (uint32_t faceNum = 0; faceNum < ndn->GetNFaces (); faceNum++)
        {
           Ptr<Face> outFace = ndn->GetFace (faceNum);
           TrySendOutInterest (inFace, outFace, header, origPacket, pitEntry);
        }</span></font><br></div><div><font><span style="white-space:pre-wrap"><br></span></font></div><div><font><span style="white-space:pre-wrap">However the interest will be not forwarded from any face and it seems no interest packet is produced. What is wrong with it? Thanks a lot. </span></font></div>

<div><font><span style="white-space:pre-wrap"><br></span></font></div><div><font><span style="white-space:pre-wrap">Regards,</span></font></div><div><font><span style="white-space:pre-wrap">huyao</span></font></div>
<div><font><span style="white-space:pre-wrap"><br></span></font></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/31 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>The data structure that stores ordered Face instances in FIB behaves like any other STL container:</div>

<div>begin ()  returns iterator to first element in the container</div><div>end () returns a special iterator, indicating element just after the last valid element</div><div><br></div><div>In other words, end () is never an iterator to a valid element in the container, and situations when begin () == end () means that the container has no elements.  If there is at least one element in the container, begin () will return iterator to a valid first element.</div>

<div><br></div><div>---</div><div>Alex</div><br><div><div><div><div>On Mar 30, 2013, at 8:20 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><div dir="ltr">Hi Alex,<div><br></div><div>Thanks for your reply to the previous question about ndnsim update.</div><div><br></div><div>Now I am looking into the CustomStrategy::DoPropagateInterest. This function is to let <span style="font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;font-size:12px;line-height:15px;text-align:justify">Interest be forwarded to first two best-metric faces specified by FIB. However, in the codes, the faceIterator is first pointed to the beginning of faces ordered by metric and then checked whether it is pointed to the end of the faces. Assume that there is only one face existing in the associated faces for the fib entry. For my understanding, this face is located at the beginning of the faces and also should be located at the end of the faces. Then according to the </span>DoPropagateInterest algorithm, the incoming interest will be not sent out though the fact is not like that for sure. So what is wrong with my understanding for the faceIterator? Or what is the internal structure of FacesByMetric &faces especially faces.begin () or faces.end()?</div>


<div><br></div><div>I am sorry for my confusing expression. Thank you very much!</div><div><br></div><div>Regards,</div><div>huyao</div></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></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></div></div></div></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>ndnSIM mailing list</span><br><span><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a></span><br><span><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></span><br></div></blockquote></body></html>