[ndnSIM] Adding route manually

Shahid Md. Asif Iqbal asifcsep at gmail.com
Wed Apr 20 01:04:47 PDT 2016


Dear Sryridon,
I sorted out that the problem occurs due to the add of the following code
segment in the onIncomingData() function of forwarder.cpp:

 Name dataName("/");
 dataName.append(data.getName().get(0));
 dataName.append("D");

Thanks
Asif

On Tue, Apr 19, 2016 at 11:25 AM, Shahid Md. Asif Iqbal <asifcsep at gmail.com>
wrote:

> Dear Spyridon,
> I have used the following steps to add route while operating in the
> forwarder.cpp, but unfortunately the problem of timeout exists.
>
> ns3::Ptr<ns3::Node> thisNode;
>   thisNode = ns3::NodeList::GetNode(ns3::Simulator::GetContext());
>
>   shared_ptr<Face> face =
> const_pointer_cast<Face>(inFace.shared_from_this());
>
>   ns3::ndn::FibHelper::AddRoute(thisNode, dataName, inFace.getId(), 0);
>
> Thanks
> Asif
>
> On Mon, Apr 18, 2016 at 11:48 PM, Spyridon (Spyros) Mastorakis <
> mastorakis at cs.ucla.edu> wrote:
>
>> You could use the global node id assigned by NS3:
>>
>> Simulator::GetContext()
>>
>> Take a look here:
>>
>> http://www.lists.cs.ucla.edu/pipermail/ndnsim/2015-December/002285.html
>>
>> The thing you are doing right now could lead to some privilege conflicts
>> with the managers of NFD. That might be the reason you get this timeout.
>>
>> Spyridon (Spyros) Mastorakis
>> Personal Website: http://cs.ucla.edu/~mastorakis/
>> Internet Research Laboratory
>> Computer Science Department
>> UCLA
>>
>>
>>
>>
>> On Apr 18, 2016, at 9:33 AM, Shahid Md. Asif Iqbal <asifcsep at gmail.com>
>> wrote:
>>
>> Thanks Spyridon,
>> But, I need to add route from the forwarder.cpp, is there any way to find
>> who (which node) is currently operating the forwarder?
>>
>> Thanks
>> Asif
>>
>> On Mon, Apr 18, 2016 at 10:27 PM, Spyridon (Spyros) Mastorakis <
>> mastorakis at cs.ucla.edu> wrote:
>>
>>> Hi Asif,
>>>
>>> please use the FIB helper instead of trying to modify the FIB directly.
>>> Let me know if that works:
>>>
>>>
>>> https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/examples/ndn-congestion-alt-topo-plugin.cpp#L118-L132
>>>
>>> Spyridon (Spyros) Mastorakis
>>> Personal Website: http://cs.ucla.edu/~mastorakis/
>>> Internet Research Laboratory
>>> Computer Science Department
>>> UCLA
>>>
>>>
>>>
>>>
>>> On Apr 18, 2016, at 3:23 AM, Shahid Md. Asif Iqbal <asifcsep at gmail.com>
>>> wrote:
>>>
>>> Dear All,
>>> Experiencing the following error after adding route manually, and more
>>> importantly the error occurs after 10 seconds of simulation for each
>>> scenario  and for every prefix.
>>>
>>> terminate called after throwing an instance of
>>> 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<nfd::rib::RibManager::Error>
>>> >'
>>>   what():  Error in setting interest filter (/localhost/nfd/rib):
>>> request timed out
>>>
>>> I use the following code segment to add route manually
>>>
>>> shared_ptr<Face> face =
>>> const_pointer_cast<Face>(inFace.shared_from_this());
>>>
>>>   shared_ptr<fib::Entry> fibEntry = m_fib.insert(dataName).first;//
>>> insert prefix
>>>   fibEntry->addNextHop(face, 0);
>>>
>>> Any clue would be really helpful.
>>>
>>> Thanks
>>> Asif
>>>
>>> On Sun, Apr 17, 2016 at 11:50 PM, Shahid Md. Asif Iqbal <
>>> asifcsep at gmail.com> wrote:
>>>
>>>> Hi Natalya,
>>>> Though it worked, but for a different scenario it is creating the
>>>> following problem
>>>>
>>>> "Error in setting interest filter (/localhost/nfd/rib): request timed
>>>> out "............
>>>>
>>>> I have interest sending rate of 10/s.
>>>> It is mainly appearing after 10 seconds of simulation run.
>>>>
>>>> Regards
>>>> Asif
>>>>
>>>> On Sun, Apr 17, 2016 at 7:34 PM, Shahid Md. Asif Iqbal <
>>>> asifcsep at gmail.com> wrote:
>>>>
>>>>> Thanks Natalya,
>>>>> Got your point and it worked for me.
>>>>>
>>>>> Regards
>>>>> Asif
>>>>>
>>>>> On Sat, Apr 16, 2016 at 5:46 PM, Natalya Rozhnova <
>>>>> rozhnova.natalya at gmail.com> wrote:
>>>>>
>>>>>> Hi Asif,
>>>>>>
>>>>>> Why do you want to use the FibHelper while in the forwarder you can
>>>>>> directly operate with FIB.
>>>>>> Just add the desired output face to the FIB entry for the desired
>>>>>> prefix…
>>>>>>
>>>>>> Best,
>>>>>> Natalya
>>>>>>
>>>>>>
>>>>>> > Le 16 avr. 2016 à 13:27, Shahid Md. Asif Iqbal <asifcsep at gmail.com>
>>>>>> a écrit :
>>>>>> >
>>>>>> > Dear All,
>>>>>> > How can i add a route manually from the forwarder.cpp file? My
>>>>>> scenario is, after receiving data(onReceiveData()) with name "/data/R/00"
>>>>>> from face i, I want to add a route manually (using fibhelper) for prefix
>>>>>> "data/D/00" with face i as the faceid to reach the nexthop. I can use the
>>>>>> Addroute() function but it is not possible to get the node(GetNode()) who
>>>>>> is currently accessing the forwarder.
>>>>>> >
>>>>>> > Thanks
>>>>>> > Asif
>>>>>> > _______________________________________________
>>>>>> > ndnSIM mailing list
>>>>>> > ndnSIM at lists.cs.ucla.edu
>>>>>> > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>>>>>
>>>>>>
>>>>>
>>>>
>>> _______________________________________________
>>> ndnSIM mailing list
>>> ndnSIM at lists.cs.ucla.edu
>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>>
>>>
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160420/b8e7b12d/attachment.html>


More information about the ndnSIM mailing list