<html><head><meta http-equiv="Content-Type" content="text/html charset=GB2312"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi huyao,</div><div><br></div><div>First of all, if you have a pointer to Face object, you don't need to get ID for AddRoute, as supplying Ptr<Face> is the most efficient way.</div><div><br></div><div>As for ids, they are the same for both used by AddRoute and returned by GetId.  There could be some inconsistencies in documentation that should be corrected, but I couldn't find where you read about "based on device id on the node"?  Can you point to the documentation page/source code?</div><div><br></div><div>Thanks,</div><div>Alex</div><br><div><div>On Apr 1, 2013, at 8:59 AM, Smallcat <<a href="mailto:huyao0107@gmail.com">huyao0107@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div bgcolor="#FFFFFF"><div>Hi Alex,</div><div><br></div><div>I see. Thanks.</div><div><br></div><div>Just now I read your past reply to face Id. I am a little confused by the difference between the one in AddRoute() and method Face::GetId(). The former face Id is specified by face number which is based on device id on the Node (0, 1£¬2...). The latter face Id is just a unique numerical ID of the face on the specific node and doesn't imply anything else (e.g., face with ID 2 doesn't mean there are 3 faces on the node) as you said before. Then they are the same one or different? Which one should I use to identify the unique one face for a ndn router?<br></div><div><br></div><div>Thanks a lot!<br></div><div><br></div><div>Regards,</div><div>huyao</div><div><i><br></i></div><div><br>ÔÚ 2013-4-1£¬3:20£¬Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>> Ð´µÀ£º<br><br></div><div></div><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div>Hi huyao,</div><div><br></div><div>Yes, "/" represents a name with 0 components, so you're right that ...m_prefix->size() will return 0 for such an entry.</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Mar 31, 2013, at 8:36 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>I understand what you mean. In ndnsim, setting forwarding strategy is meaningless if routes are not configured. Now I have made some progress. I am sorry for bothering you to check the following..</div>
<div><br></div><div><div style="text-align:start"><span style="text-align:justify">When</span><span style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 12px; line-height: 15px; text-align: justify; "> setting up </span><em style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 12px; line-height: 15px; text-align: justify; ">default</em><span style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 12px; line-height: 15px; text-align: justify; "> FIB entries using </span><a class="" href="http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_stack_helper.html#a12b1c8f16bad953ac3b9bb4a6ab1fcab" style="color:rgb(145,165,1);text-decoration:none;font-weight:bold;border-bottom-width:1px;border-bottom-style:dashed;border-bottom-color:rgb(145,165,1);font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;font-size:12px;line-height:15px;text-align:justify">StackHelper::SetDefaultRoutes()</a><span style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 12px; line-height: 15px; text-align: justify; "> call that is to let each node/router have a FIB entry to </span><tt class="" style="background-color: rgb(236, 240, 243); padding: 0px 1px; font-size: 0.95em; line-height: 15px; text-align: justify; "><span class="">/</span></tt><span style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 12px; line-height: 15px; text-align: justify; "> prefix, containing all available faces. So for the prefix "/"(class Name), its size() == 0? (</span><font face="Lucida Grande, Verdana, Geneva, Arial, sans-serif"><span style="font-size:12px;line-height:15px">pitEntry->GetFibEntry ()->m_prefix->size() == 0?</span></font><span style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 12px; line-height: 15px; text-align: justify; ">)</span></div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Thanks a lot!</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra">huyao</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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div 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><div class="h5"><div><br>On Mar 30, 2013, at 9:34 PM, yao hu <<a href="mailto:huyao0107@gmail.com" target="_blank">huyao0107@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr">
Hi Alex,<div><br></div><div>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="line-height:15px;text-align:justify;font-size:12px;font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif">installing stack on nodes, the following codes is ok?</span></div>

<div><font face="arial, sans-serif"><span style="font-size:14px"><br></span></font></div><div><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>Regards,</div><div>huyao</div><div><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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style: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><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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style: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 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>
_______________________________________________<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></blockquote></div><br></div>
</blockquote><blockquote type="cite"><span>_______________________________________________</span><br><span>ndnSIM mailing list</span><br><span><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a></span><br>
<span><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></span><br></blockquote></div></div></div></blockquote></div><br></div></div>
</div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br></blockquote></div><br></blockquote></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></body></html>