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

中村真也 nakamura at c.info.eng.osaka-cu.ac.jp
Wed Jan 31 18:54:07 PST 2018


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?

Regards,

---------------------------------------------------
Osaka City University
ACNRA M1
中村 真也(Masaya Nakamura )
nakamura at c.info.eng.osaka-cu.ac.jp
---------------------------------------------------

On 2018年2月1日 at 5:37:31, Spyridon (Spyros) Mastorakis (
mastorakis at cs.ucla.edu) wrote:

Hi,

On Jan 31, 2018, at 4:46 AM, 中村真也 <nakamura at c.info.eng.osaka-cu.ac.jp>
wrote:

Hi all.

I could access to forwarder from Application but...
I want to access to the application from NFD strategy layer.
I create one application (custom App) that inherits from ns3::ndn::app
class.(also, ns3::ndn::application inherits from ns3::application).
>From NFD strategy layer, I want to access to one application method.

By giving forwarder itself nodeID, I tried to access to app. However it is
failed.
ns3::NodeList::GetNode(m_forwarder->m_nodeId)->GetApplication(0);


is there good way to access one application?


What do you mean that this failed?

You may have to use dynamic_cast to cast from an ns3::application to an
ns3::ndn::application.

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: 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/20180131/7cfbccc1/attachment-0001.html>


More information about the ndnSIM mailing list