[ndnSIM] Accessing net device faces

Ayush Agarwal ayush0071 at gmail.com
Sun Feb 21 23:19:40 PST 2016

Hello everyone,

I am trying to access all the net device interfaces associated to a face.
Firstly I am getting the object of ndnNetDeviceFace and then with its help
I am accessing the net devices associated to it.

I am also handling the NULL cases for the ndnNetDeviceFace to avoid
segmentation faults. But due to this I am unable to access the net devices
with id 0.
The code I am using is as follows:

 Ptr<NetDeviceFace> netDeviceFace = DynamicCast<NetDeviceFace> (inFace);
  //std::cout << "device id is" << netDeviceFace->GetTypeId() << "\n";
  if (netDeviceFace == NULL)
  Ptr<NetDevice> nd = netDeviceFace->GetNetDevice ();

Please help me in a solution so that I can access all the net devices
without any segmentation faults.

*Thanks & Regards,*

*Ayush Agarwal*

*Reseach Scholar, Computer Science*

*National Institute of Technology, KarnatakaSurathkal, India*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160222/b0c44c6a/attachment.html>

More information about the ndnSIM mailing list