examples/simple-point-to-point.cc
changeset 2230 9f13ac3291e0
parent 1777 0b294c1347f1
child 2231 a5b898c1ee2c
--- a/examples/simple-point-to-point.cc	Sun Dec 30 19:36:44 2007 -0800
+++ b/examples/simple-point-to-point.cc	Wed Jan 02 09:09:24 2008 +0100
@@ -117,10 +117,10 @@
   // Here, we will explicitly create four nodes.  In more sophisticated
   // topologies, we could configure a node factory.
   NS_LOG_INFO ("Create nodes.");
-  Ptr<Node> n0 = Create<InternetNode> ();
-  Ptr<Node> n1 = Create<InternetNode> (); 
-  Ptr<Node> n2 = Create<InternetNode> (); 
-  Ptr<Node> n3 = Create<InternetNode> ();
+  Ptr<Node> n0 = CreateObject<InternetNode> ();
+  Ptr<Node> n1 = CreateObject<InternetNode> (); 
+  Ptr<Node> n2 = CreateObject<InternetNode> (); 
+  Ptr<Node> n3 = CreateObject<InternetNode> ();
 
   // We create the channels first without any IP addressing information
   NS_LOG_INFO ("Create channels.");
@@ -163,7 +163,7 @@
   // 210 bytes at a rate of 448 Kb/s
   NS_LOG_INFO ("Create Applications.");
   uint16_t port = 9;   // Discard port (RFC 863)
-  Ptr<OnOffApplication> ooff = Create<OnOffApplication> (
+  Ptr<OnOffApplication> ooff = CreateObject<OnOffApplication> (
     n0, 
     InetSocketAddress ("10.1.3.2", port), 
     "Udp",
@@ -174,7 +174,7 @@
   ooff->Stop (Seconds(10.0));
 
   // Create an optional packet sink to receive these packets
-  Ptr<PacketSink> sink = Create<PacketSink> (
+  Ptr<PacketSink> sink = CreateObject<PacketSink> (
     n3,
     InetSocketAddress (Ipv4Address::GetAny (), port),
     "Udp");
@@ -183,7 +183,7 @@
   sink->Stop (Seconds (10.0));
 
   // Create a similar flow from n3 to n1, starting at time 1.1 seconds
-  ooff = Create<OnOffApplication> (
+  ooff = CreateObject<OnOffApplication> (
     n3, 
     InetSocketAddress ("10.1.2.1", port), 
     "Udp",
@@ -194,7 +194,7 @@
   ooff->Stop (Seconds(10.0));
 
   // Create a packet sink to receive these packets
-  sink = Create<PacketSink> (
+  sink = CreateObject<PacketSink> (
     n1,
     InetSocketAddress (Ipv4Address::GetAny (), port),
     "Udp");