[ndnSIM] How to access custom application (extended from ns3::ndn::app) from strategy

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Sun Feb 4 18:28:47 PST 2018


Hi,

> On Jan 31, 2018, at 6:54 PM, 中村真也 <nakamura at c.info.eng.osaka-cu.ac.jp> wrote:
> 
> Thanks a lot.
> I did access to application with dynamic_cast.
> It is shown below.
> ptr_customApp = dynamic_cast<ns3::ndn::customApp*>(&(*ns3::NodeList::GetNode(m_forwarder->m_nodeId)->GetApplication(0)));
> 
> And, I have one more question. How does remove prefix from GlobalRoutingHelper.
> if one app want to advertise prefix “/I/am/here”
> 
> AddOrigin(“/I/am/here”,GetNode());
> FibHelper(“/I/am/here”,GetNode(),m_face,0);
> ndn::GlobalRoutingHelper::CalculateRoutes();
> 
> after that, app want to withdraw prefix “/I/am/here”
> what should I do?

I do not think there is a good way to automatically do that.

You will have to iterate through all the nodes in the node list, access the forwarder instance of each node and remove the prefix from the FIB.

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180204/49b38345/attachment.html>


More information about the ndnSIM mailing list