[ndnSIM] Add faces dynamically to NetDevice during simulation

thomas.kolonko at students.unibe.ch thomas.kolonko at students.unibe.ch
Mon Oct 24 03:54:11 PDT 2016


Dear all,

I am trying to add more faces to an already existing NetDevice (Wifi and ndnSIM 2.0) during simulation time in order to simulate some kind of multipath. I could add them during set up within the ndn-stack-helper. But I would like to add them dynamically while receiving data packages within the forwarder class.

Now, I saw the face-manager class and the face-table class but I cannot make it work, as far as I understand I can add a face through

a) face-manager

b) l3-protocol-stack

For both I need to create a Face (NetDeviceFace) first and then add it to the face-table or the l3-protocol-stack....

      // TODO: try to add a new face here
      // Problem... you first have to choose a NetDevice to add the face to !!!
      // let's assume for starters that you only have one NetDevice.
      ns3::Ptr<ns3::NetDevice> netDevice = node->GetDevice(0);
      ns3::Ptr<ns3::ndn::L3Protocol> l3 = node->GetObject<ns3::ndn::L3Protocol>();
      ns3::Ptr<ns3::ndn::NetDeviceFace> p_netDeviceFace = ns3::ndn::NetDeviceFace(node, netDevice);
      l3->addFace(p_netDeviceFace);

Leads to:

../src/ndnSIM/NFD/daemon/fw/forwarder.cpp:461:86: error: invalid use of incomplete type ‘class ns3::ndn::NetDeviceFace’
    ns3::Ptr<ns3::ndn::NetDeviceFace> p_netD = ns3::ndn::NetDeviceFace(node, netDevice);

Any help or hint would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161024/3d34743e/attachment.html>


More information about the ndnSIM mailing list