InternetStackHelper and GetNDevices()

36 views
Skip to first unread message

nabil torjemen

unread,
Mar 28, 2015, 6:19:40 AM3/28/15
to ns-3-...@googlegroups.com
hi for all,
when I'm using the mesh example, I try to get the number of netdevice in each node.
I write the following code  :
 std::cout << "Mesh_nodes : "<< mesh_nodes.Get(i)->GetId()+1<<" ;Net device number : "<< mesh_nodes.Get(i)->GetNDevices()-1 <<" \n";

however, when I put this line in the last the MeshTest::CreateNodes () method, I get 3 netdevices
but if I put the same line of code in the last of MeshTest::InstallInternetStack (), I get 4 netdevices

the InternetStackHelper is used to install internet stack on node and does not create any new netdevices so why the netdevices number is increased ?
best regards.

Tommaso Pecorella

unread,
Mar 28, 2015, 9:58:01 AM3/28/15
to ns-3-...@googlegroups.com
Hi,


On Saturday, March 28, 2015 at 11:19:40 AM UTC+1, nabil torjemen wrote:
the InternetStackHelper is used to install internet stack on node and does not create any new netdevices

Wrong. It will create the LoopbackNetDevice.

T.
 
Reply all
Reply to author
Forward
0 new messages