the TypeId for Packet sockets is PacketSocketFactory, not PacketSocket. fix bug introduced by changeset c33b6d2775b7.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 28 May 2008 11:28:06 -0700
changeset 3166 f65af41d30db
parent 3165 14b0ec153421
child 3167 644a220ad981
the TypeId for Packet sockets is PacketSocketFactory, not PacketSocket. fix bug introduced by changeset c33b6d2775b7.
examples/wifi-adhoc.cc
--- a/examples/wifi-adhoc.cc	Wed May 28 10:49:01 2008 -0700
+++ b/examples/wifi-adhoc.cc	Wed May 28 11:28:06 2008 -0700
@@ -102,7 +102,7 @@
 Ptr<Socket>
 Experiment::SetupPacketReceive (Ptr<Node> node)
 {
-  TypeId tid = TypeId::LookupByName ("ns3::PacketSocket");
+  TypeId tid = TypeId::LookupByName ("ns3::PacketSocketFactory");
   Ptr<Socket> sink = Socket::CreateSocket (node, tid);
   sink->Bind ();
   sink->SetRecvCallback (MakeCallback (&Experiment::ReceivePacket, this));
@@ -136,7 +136,7 @@
   socket.SetPhysicalAddress (devices.Get (1)->GetAddress ());
   socket.SetProtocol (1);
 
-  OnOffHelper onoff ("ns3::PacketSocket", Address (socket));
+  OnOffHelper onoff ("ns3::PacketSocketFactory", Address (socket));
   onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (250)));
   onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
   onoff.SetAttribute ("DataRate", DataRateValue (DataRate (60000000)));