[ndnSIM] Finding Id of interest sending node

Shahid Md. Asif Iqbal asifcsep at gmail.com
Sun Mar 6 21:32:11 PST 2016


Thank you Spyridon, let me try this solution.

On Mon, Mar 7, 2016 at 8:00 AM, Spyridon (Spyros) Mastorakis <
mastorakis at cs.ucla.edu> wrote:

> Hi,
>
> to get the last component of a name, you can use the get method of the
> name class:
>
> Name myName(“/this/is/a/test”);
> std::cout << “Last component: “ << myName.get(-1) << std::endl;
>
> The above code should work.
>
> Hope that this helps!
>
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> Computer Science Department
> UCLA
>
>
>
>
> On Mar 5, 2016, at 12:23 AM, Shahid Md. Asif Iqbal <asifcsep at gmail.com>
> wrote:
>
> Thanks Spyros and Anil, definitely it will work.
> Can you please specify how the last or any component of an interest name
> can be read?
>
>
> On Sat, Mar 5, 2016 at 12:49 PM, Spyridon (Spyros) Mastorakis <
> mastorakis at cs.ucla.edu> wrote:
>
>> Hi,
>>
>> you could just attach it as the last component of the Interest name and
>> send it out. In this way, intermediate nodes can extract the last component
>> of the Interest name and figure out the id of the node that generated this
>> Interest.
>>
>> Hope that this helps!
>>
>> Spyridon (Spyros) Mastorakis
>> Personal Website: http://cs.ucla.edu/~mastorakis/
>> Internet Research Laboratory
>> Computer Science Department
>> UCLA
>>
>>
>>
>>
>> On Mar 4, 2016, at 10:45 PM, Shahid Md. Asif Iqbal <asifcsep at gmail.com>
>> wrote:
>>
>> Dear Anil and others,
>> I might not have made my question clear, actually I want to know when  an
>> intermediate node receives an interest, the id of the node who has
>> generated the interest.Not the node which is currently receiving or
>> forwarding that interest.
>>
>> On Fri, Mar 4, 2016 at 1:46 PM, Anil Jangam <anilj.mailing at gmail.com>
>> wrote:
>>
>>> You can get the pointer to the node sending the Interest as below. Get
>>> the node Id from the node object.
>>>
>>>  ns3::Ptr<ns3::Node> thisNode =
>>> ns3::NodeList::GetNode(ns3::Simulator::GetContext());
>>>
>>> To answer your other question, I think it depends how you write your
>>> producer application logic. I think you should be able to filter out
>>> certain Interest, based on where you want to remain silent or not.
>>>
>>>
>>> On Sun, Feb 28, 2016 at 5:00 AM, Shahid Md. Asif Iqbal <
>>> asifcsep at gmail.com> wrote:
>>>
>>>> Dear all,
>>>> How can I find the id of the node sending an interest in the
>>>> forwarder.cpp and ndn-producer.cpp files?
>>>> And, is it reasonable a producer replying for some segments and remain
>>>> silent for some segments of the same interest? And if it is please give
>>>> some hints how to do that.
>>>>
>>>> _______________________________________________
>>>> 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/20160307/035595ff/attachment.html>


More information about the ndnSIM mailing list