[Click] ping with ns3click

Jörg Kaiser Kaiser.Joerg at gmx.net
Tue Jul 24 14:40:08 EDT 2012


Hi,

I'm using ns3 with the ns3click integration. When I try to use ns3's 
ping-application, it will noch work with a ClickInternetStack but only 
with a regular one. Other applications like a udp-server/client setup 
work fine with both.

--------------------------------
this DOES NOT work

     V4PingHelper ping (Ipv4Address ("172.16.1.2"));
       ping.SetAttribute ("Verbose", BooleanValue (true));
     ApplicationContainer p = ping.Install (wifiNodes.Get (0));

ERROR:
assert failed. cond="socketFactory != 0", 
file=../src/network/model/socket.cc, line=62



this DOES work

       uint16_t port = 4000;
       UdpServerHelper server (port);
       ApplicationContainer apps = server.Install (wifiNodes.Get(0));
       apps.Start (Seconds (1.0));
       apps.Stop (Seconds (10.0));

------------------------------

I could narrow down the problem a little bit:


in V4ping.cc:

      m_socket = Socket::CreateSocket (GetNode (), TypeId::LookupByName 
("ns3::Ipv4RawSocketFactory"));

this fails as the node seems to be unable to create a IPv4RawSocket.



in udp-server.cc:

     TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
       m_socket = Socket::CreateSocket (GetNode (), tid);


exactly the same, but he can create an UdpSocket.





Did anybody solve this problem? Thanks for helping me!!!


Joerg


More information about the click mailing list