[ndnSIM] question about faceIterator in CustomStrategy
alexander.afanasyev at ucla.edu
Sat Mar 30 21:47:39 PDT 2013
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.
On Mar 30, 2013, at 9:34 PM, yao hu <huyao0107 at gmail.com> wrote:
> Hi Alex,
> Thanks for your reply. That means SetDefaultRoutes(true) does not conflict with my later implementation in ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::CustomStrategy")? That is, before installing stack on nodes, the following codes is ok?
> ndn::StackHelper ccnxHelper;
> ccnxHelper.SetForwardingStrategy ("ns3::ndn::fw::CustomStrategy");
> ccnxHelper.SetDefaultRoutes (true);
> ccnxHelper.SetContentStore ("ns3::ndn::cs::Lru",
> "MaxSize", "1"); // ! Attention ! If set to 0, then MaxSize is infinite
> ccnxHelper.InstallAll ();
> 2013/3/31 Alex Afanasyev <alexander.afanasyev at ucla.edu>
>> Hi huyao,
>> 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.
>> 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).
>> On Mar 30, 2013, at 8:33 PM, yao hu <huyao0107 at gmail.com> wrote:
>>> Hi Alex,
>>> I see. I forgot about it. Thanks for your explanation. I am sorry I have one question about flooding strategy in ndnsim.
>>> I saw your reply http://www.lists.cs.ucla.edu/pipermail/ndnsim/2012-December/000030.html 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 don't want them to add to FIB entries by the following
>>> 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);
>>> 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.
>>> 2013/3/31 Alex Afanasyev <alexander.afanasyev at ucla.edu>
>>>> Hi huyao,
>>>> The data structure that stores ordered Face instances in FIB behaves like any other STL container:
>>>> begin () returns iterator to first element in the container
>>>> end () returns a special iterator, indicating element just after the last valid element
>>>> 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.
>>>> On Mar 30, 2013, at 8:20 AM, yao hu <huyao0107 at gmail.com> wrote:
>>>>> Hi Alex,
>>>>> Thanks for your reply to the previous question about ndnsim update.
>>>>> Now I am looking into the CustomStrategy::DoPropagateInterest. This function is to let 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 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()?
>>>>> I am sorry for my confusing expression. Thank you very much!
>>>>> ndnSIM mailing list
>>>>> ndnSIM at lists.cs.ucla.edu
>>> ndnSIM mailing list
>>> ndnSIM at lists.cs.ucla.edu
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM