<div dir="ltr"><div><div><div><div><div>Hello everyone,<br><br></div>I am trying to access all the net device interfaces associated to a face.<br></div>Firstly I am getting the object of ndnNetDeviceFace and then with its help I am accessing the net devices associated to it.<br><br></div>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. <br></div>The code I am using is as follows:<br><br> Ptr<NetDeviceFace> netDeviceFace = DynamicCast<NetDeviceFace> (inFace);<br>  //std::cout << "device id is" << netDeviceFace->GetTypeId() << "\n";<br>  if (netDeviceFace == NULL)<br>  {<br>      std::cout<<"null\n"<br>  }<br>  if(netDeviceFace!=NULL)<br>  {<br>  Ptr<NetDevice> nd = netDeviceFace->GetNetDevice ();<br>  ------------<br>  ------------<br>  }<br><br></div>Please help me in a solution so that I can access all the net devices without any segmentation faults.<br><br><b>Thanks & Regards,</b><br><b style="font-size:12.8px">Ayush Agarwal<br></b><div style="font-size:12.8px"><b>Reseach Scholar, Computer Science<br></b></div><b style="font-size:12.8px">National Institute of Technology, Karnataka<br>Surathkal, India</b><br></div>