<div dir="ltr">Thank you Spyridon, let me try this solution.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 7, 2016 at 8:00 AM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<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">Hi,<div><br></div><div>to get the last component of a name, you can use the get method of the name class:</div><div><br></div><div>Name myName(“/this/is/a/test”);</div><div>std::cout << “Last component: “ << myName.get(-1) << std::endl;</div><div><br></div><div>The above code should work.</div><div><br></div><div>Hope that this helps!</div><div><br></div><div><span class=""><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~mastorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><span style="float:none;display:inline!important"><br></span></div></div></div><div><br></div><br>
</div>
<br></span><div><div class="h5"><div><blockquote type="cite"><div>On Mar 5, 2016, at 12:23 AM, Shahid Md. Asif Iqbal <<a href="mailto:asifcsep@gmail.com" target="_blank">asifcsep@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Thanks Spyros and Anil, definitely it will work.<div>Can you please specify how the last or any component of an interest name can be read?<br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 5, 2016 at 12:49 PM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<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">Hi,<div><br></div><div>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.</div><div><br></div><div>Hope that this helps!</div><div><span><font color="#888888"><br><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~mastorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><span style="float:none;display:inline!important"><br></span></div></div></div><div><br></div><br>
</div></font></span><div><div>
<br><div><blockquote type="cite"><div>On Mar 4, 2016, at 10:45 PM, Shahid Md. Asif Iqbal <<a href="mailto:asifcsep@gmail.com" target="_blank">asifcsep@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Dear Anil and others,<div>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.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 4, 2016 at 1:46 PM, Anil Jangam <span dir="ltr"><<a href="mailto:anilj.mailing@gmail.com" target="_blank">anilj.mailing@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>You can get the pointer to the node sending the Interest as below. Get the node Id from the node object. <br><br><div style="margin-left:40px"> ns3::Ptr<ns3::Node> thisNode = ns3::NodeList::GetNode(ns3::Simulator::GetContext());<br></div><br></div>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. <br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Sun, Feb 28, 2016 at 5:00 AM, Shahid Md. Asif Iqbal <span dir="ltr"><<a href="mailto:asifcsep@gmail.com" target="_blank">asifcsep@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>Dear all,<br></div>How can I find the id of the node sending an interest in the forwarder.cpp and ndn-producer.cpp files?<br>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.<br></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" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></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></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>