add Application::SetNode and NetDevice::SetNode, use them from Node::AddApplication and Node::AddDevice. kill useless "Node" attributes.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 13 Mar 2008 11:10:38 -0700
changeset 26006c389d0c717d
parent 2599 fcc1728eb669
child 2601 4297e8c61615
add Application::SetNode and NetDevice::SetNode, use them from Node::AddApplication and Node::AddDevice. kill useless "Node" attributes.
examples/csma-broadcast.cc
examples/csma-multicast.cc
examples/csma-one-subnet.cc
examples/csma-packet-socket.cc
examples/mixed-global-routing.cc
examples/simple-alternate-routing.cc
examples/simple-error-model.cc
examples/simple-global-routing.cc
examples/simple-point-to-point-olsr.cc
examples/simple-point-to-point.cc
examples/tcp-large-transfer-errors.cc
examples/tcp-large-transfer.cc
examples/tcp-small-transfer-oneloss.cc
examples/tcp-small-transfer.cc
examples/udp-echo.cc
samples/main-adhoc-wifi.cc
samples/main-ap-wifi.cc
src/devices/csma/csma-ipv4-topology.cc
src/devices/csma/csma-net-device.cc
src/devices/csma/csma-net-device.h
src/devices/csma/csma-topology.cc
src/devices/point-to-point/point-to-point-net-device.cc
src/devices/point-to-point/point-to-point-net-device.h
src/devices/point-to-point/point-to-point-topology.cc
src/devices/wifi/wifi-net-device.cc
src/devices/wifi/wifi-net-device.h
src/internet-node/tcp-l4-protocol.cc
src/internet-node/udp-l4-protocol.cc
src/internet-node/udp-socket.cc
src/node/application.cc
src/node/application.h
src/node/net-device.h
src/node/node.cc
tutorial/point-to-point-ipv4-topology.cc
tutorial/tutorial-bus-network.cc
tutorial/tutorial-csma-echo-ascii-trace.cc
tutorial/tutorial-csma-echo-pcap-trace.cc
tutorial/tutorial-csma-echo.cc
tutorial/tutorial-linear-dumbbell.cc
tutorial/tutorial-point-to-point.cc
tutorial/tutorial-star-routing.cc
tutorial/tutorial-star.cc
utils/print-introspected-doxygen.cc
     1.1 --- a/examples/csma-broadcast.cc	Wed Mar 12 11:35:00 2008 -0700
     1.2 +++ b/examples/csma-broadcast.cc	Thu Mar 13 11:10:38 2008 -0700
     1.3 @@ -149,12 +149,10 @@
     1.4    // 512 bytes (default) at a rate of 500 Kb/s (default) from n0
     1.5    NS_LOG_INFO ("Create Applications.");
     1.6    Ptr<OnOffApplication> ooff = 
     1.7 -    CreateObject<OnOffApplication> (
     1.8 -                                        "Node", n0, 
     1.9 -                                        "Remote", Address (InetSocketAddress ("255.255.255.255", port)), 
    1.10 -                                        "Protocol", TypeId::LookupByName ("Udp"),
    1.11 -                                        "OnTime", ConstantVariable(1), 
    1.12 -                                        "OffTime", ConstantVariable(0));
    1.13 +    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("255.255.255.255", port)), 
    1.14 +                                    "Protocol", TypeId::LookupByName ("Udp"),
    1.15 +                                    "OnTime", ConstantVariable(1), 
    1.16 +                                    "OffTime", ConstantVariable(0));
    1.17    n0->AddApplication (ooff);
    1.18    // Start the application
    1.19    ooff->Start(Seconds(1.0));
    1.20 @@ -162,20 +160,16 @@
    1.21    
    1.22    // Create an optional packet sink to receive these packets
    1.23    Ptr<PacketSink> sink = 
    1.24 -    CreateObject<PacketSink> (
    1.25 -                                  "Node", n1,
    1.26 -                                  "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    1.27 -                                  "Protocol", TypeId::LookupByName ("Udp"));
    1.28 +    CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    1.29 +                              "Protocol", TypeId::LookupByName ("Udp"));
    1.30    n1->AddApplication (sink);
    1.31    // Start the sink
    1.32    sink->Start (Seconds (1.0));
    1.33    sink->Stop (Seconds (10.0));
    1.34  
    1.35    // Create an optional packet sink to receive these packets
    1.36 -  sink = CreateObject<PacketSink> (
    1.37 -                                       "Node", n2,
    1.38 -                                       "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    1.39 -                                       "Protocol", TypeId::LookupByName ("Udp"));
    1.40 +  sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    1.41 +                                   "Protocol", TypeId::LookupByName ("Udp"));
    1.42    n2->AddApplication (sink);
    1.43  
    1.44    // Start the sink
     2.1 --- a/examples/csma-multicast.cc	Wed Mar 12 11:35:00 2008 -0700
     2.2 +++ b/examples/csma-multicast.cc	Thu Mar 13 11:10:38 2008 -0700
     2.3 @@ -278,14 +278,12 @@
     2.4    // Configure a multicast packet generator that generates a packet
     2.5    // every few seconds
     2.6    Ptr<OnOffApplication> ooff = 
     2.7 -    CreateObject<OnOffApplication> (
     2.8 -                                        "Node", n0, 
     2.9 -                                        "Remote", Address (InetSocketAddress (multicastGroup, port)), 
    2.10 -                                        "Protocol", TypeId::LookupByName ("Udp"),
    2.11 -                                        "OnTime", ConstantVariable(1), 
    2.12 -                                        "OffTime", ConstantVariable(0),
    2.13 -                                        "DataRate", DataRate ("255b/s"),
    2.14 -                                        "PacketSize", Uinteger (128));
    2.15 +    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress (multicastGroup, port)), 
    2.16 +                                    "Protocol", TypeId::LookupByName ("Udp"),
    2.17 +                                    "OnTime", ConstantVariable(1), 
    2.18 +                                    "OffTime", ConstantVariable(0),
    2.19 +                                    "DataRate", DataRate ("255b/s"),
    2.20 +                                    "PacketSize", Uinteger (128));
    2.21    n0->AddApplication (ooff);
    2.22  //
    2.23  // Tell the application when to start and stop.
    2.24 @@ -297,10 +295,8 @@
    2.25    // If you enable logging on this (above) it will print a log statement
    2.26    // for every packet received
    2.27    Ptr<PacketSink> sink = 
    2.28 -    CreateObject<PacketSink> (
    2.29 -                                  "Node", n4,
    2.30 -                                  "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    2.31 -                                  "Protocol", TypeId::LookupByName ("Udp"));
    2.32 +    CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    2.33 +                              "Protocol", TypeId::LookupByName ("Udp"));
    2.34    n4->AddApplication (sink);
    2.35    // Start the sink
    2.36    sink->Start (Seconds (1.0));
     3.1 --- a/examples/csma-one-subnet.cc	Wed Mar 12 11:35:00 2008 -0700
     3.2 +++ b/examples/csma-one-subnet.cc	Thu Mar 13 11:10:38 2008 -0700
     3.3 @@ -160,12 +160,10 @@
     3.4    NS_LOG_INFO ("Create Applications.");
     3.5    uint16_t port = 9;   // Discard port (RFC 863)
     3.6    Ptr<OnOffApplication> ooff = 
     3.7 -    CreateObject<OnOffApplication> (
     3.8 -                                        "Node", n0, 
     3.9 -                                        "Remote", Address (InetSocketAddress ("10.1.1.2", port)), 
    3.10 -                                        "Protocol", TypeId::LookupByName ("Udp"),
    3.11 -                                        "OnTime", ConstantVariable(1), 
    3.12 -                                        "OffTime", ConstantVariable(0));
    3.13 +    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.1.2", port)), 
    3.14 +                                    "Protocol", TypeId::LookupByName ("Udp"),
    3.15 +                                    "OnTime", ConstantVariable(1), 
    3.16 +                                    "OffTime", ConstantVariable(0));
    3.17    n0->AddApplication (ooff);
    3.18  
    3.19  //
    3.20 @@ -176,12 +174,10 @@
    3.21  // 
    3.22  // Create a similar flow from n3 to n0, starting at time 1.1 seconds
    3.23  //
    3.24 -  ooff = CreateObject<OnOffApplication> (
    3.25 -                                             "Node", n3, 
    3.26 -                                             "Remote", Address (InetSocketAddress ("10.1.1.1", port)), 
    3.27 -                                             "Protocol", TypeId::LookupByName ("Udp"),
    3.28 -                                             "OnTime", ConstantVariable(1), 
    3.29 -                                             "OffTime", ConstantVariable(0));
    3.30 +  ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.1.1", port)), 
    3.31 +                                         "Protocol", TypeId::LookupByName ("Udp"),
    3.32 +                                         "OnTime", ConstantVariable(1), 
    3.33 +                                         "OffTime", ConstantVariable(0));
    3.34    n3->AddApplication (ooff);
    3.35  
    3.36    ooff->Start(Seconds(1.1));
     4.1 --- a/examples/csma-packet-socket.cc	Wed Mar 12 11:35:00 2008 -0700
     4.2 +++ b/examples/csma-packet-socket.cc	Thu Mar 13 11:10:38 2008 -0700
     4.3 @@ -62,8 +62,7 @@
     4.4  static Ptr<CsmaNetDevice>
     4.5  CreateCsmaDevice (Ptr<Node> node, Ptr<CsmaChannel> channel)
     4.6  {
     4.7 -  Ptr<CsmaNetDevice> device = CreateObject<CsmaNetDevice> ("Node", node, 
     4.8 -                                                           "Address", Mac48Address::Allocate (),
     4.9 +  Ptr<CsmaNetDevice> device = CreateObject<CsmaNetDevice> ("Address", Mac48Address::Allocate (),
    4.10                                                             "EncapsulationMode", String ("Llc"));
    4.11    node->AddDevice (device);
    4.12    device->Attach (channel);
    4.13 @@ -141,24 +140,20 @@
    4.14    // from n0 to n1
    4.15    NS_LOG_INFO ("Create Applications.");
    4.16    Ptr<OnOffApplication> ooff = 
    4.17 -    CreateObject<OnOffApplication> (
    4.18 -                                        "Node", n0, 
    4.19 -                                        "Remote", Address (n0ToN1),
    4.20 -                                        "Protocol", TypeId::LookupByName ("Packet"),
    4.21 -                                        "OnTime", ConstantVariable(1), 
    4.22 -                                        "OffTime", ConstantVariable(0));
    4.23 +    CreateObject<OnOffApplication> ("Remote", Address (n0ToN1),
    4.24 +                                    "Protocol", TypeId::LookupByName ("Packet"),
    4.25 +                                    "OnTime", ConstantVariable(1), 
    4.26 +                                    "OffTime", ConstantVariable(0));
    4.27    n0->AddApplication (ooff);
    4.28    // Start the application
    4.29    ooff->Start(Seconds(1.0));
    4.30    ooff->Stop (Seconds(10.0));
    4.31  
    4.32    // Create a similar flow from n3 to n0, starting at time 1.1 seconds
    4.33 -  ooff = CreateObject<OnOffApplication> (
    4.34 -                                             "Node", n3, 
    4.35 -                                             "Remote", Address (n3ToN0),
    4.36 -                                             "Protocol", TypeId::LookupByName ("Packet"),
    4.37 -                                             "OnTime", ConstantVariable(1), 
    4.38 -                                             "OffTime", ConstantVariable(0));
    4.39 +  ooff = CreateObject<OnOffApplication> ("Remote", Address (n3ToN0),
    4.40 +                                         "Protocol", TypeId::LookupByName ("Packet"),
    4.41 +                                         "OnTime", ConstantVariable(1), 
    4.42 +                                         "OffTime", ConstantVariable(0));
    4.43    n3->AddApplication (ooff);
    4.44    // Start the application
    4.45    ooff->Start(Seconds(1.1));
     5.1 --- a/examples/mixed-global-routing.cc	Wed Mar 12 11:35:00 2008 -0700
     5.2 +++ b/examples/mixed-global-routing.cc	Thu Mar 13 11:10:38 2008 -0700
     5.3 @@ -186,14 +186,12 @@
     5.4    NS_LOG_INFO ("Create Applications.");
     5.5    uint16_t port = 9;   // Discard port (RFC 863)
     5.6    Ptr<OnOffApplication> ooff = 
     5.7 -    CreateObject<OnOffApplication> (
     5.8 -                                        "Node", n0, 
     5.9 -                                        "Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
    5.10 -                                        "Protocol", TypeId::LookupByName ("Udp"),
    5.11 -                                        "OnTime", ConstantVariable (1), 
    5.12 -                                        "OffTime", ConstantVariable (0),
    5.13 -                                        "DataRate", DataRate("300bps"),
    5.14 -                                        "PacketSize", Uinteger (50));
    5.15 +    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
    5.16 +                                    "Protocol", TypeId::LookupByName ("Udp"),
    5.17 +                                    "OnTime", ConstantVariable (1), 
    5.18 +                                    "OffTime", ConstantVariable (0),
    5.19 +                                    "DataRate", DataRate("300bps"),
    5.20 +                                    "PacketSize", Uinteger (50));
    5.21    n0->AddApplication (ooff);
    5.22    // Start the application
    5.23    ooff->Start (Seconds (1.0));
     6.1 --- a/examples/simple-alternate-routing.cc	Wed Mar 12 11:35:00 2008 -0700
     6.2 +++ b/examples/simple-alternate-routing.cc	Thu Mar 13 11:10:38 2008 -0700
     6.3 @@ -183,12 +183,10 @@
     6.4  
     6.5    // Create a flow from n3 to n1, starting at time 1.1 seconds
     6.6    Ptr<OnOffApplication> ooff = 
     6.7 -    CreateObject<OnOffApplication> (
     6.8 -                                        "Node", n3, 
     6.9 -                                        "Remote", Address (InetSocketAddress ("10.1.1.1", port)),
    6.10 -                                        "Protocol", TypeId::LookupByName ("Udp"),
    6.11 -                                        "OnTime", ConstantVariable (1), 
    6.12 -                                        "OffTime", ConstantVariable (0));
    6.13 +    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.1.1", port)),
    6.14 +                                    "Protocol", TypeId::LookupByName ("Udp"),
    6.15 +                                    "OnTime", ConstantVariable (1), 
    6.16 +                                    "OffTime", ConstantVariable (0));
    6.17    n3->AddApplication (ooff);
    6.18    // Start the application
    6.19    ooff->Start (Seconds (1.1));
    6.20 @@ -196,10 +194,8 @@
    6.21  
    6.22    // Create a packet sink to receive these packets
    6.23    Ptr<PacketSink> sink = 
    6.24 -    CreateObject<PacketSink> (
    6.25 -                                  "Node", n1, 
    6.26 -                                  "Remote", Address (InetSocketAddress (Ipv4Address::GetAny (), port)), 
    6.27 -                                  "Protocol", TypeId::LookupByName ("Udp"));
    6.28 +    CreateObject<PacketSink> ("Remote", Address (InetSocketAddress (Ipv4Address::GetAny (), port)), 
    6.29 +                              "Protocol", TypeId::LookupByName ("Udp"));
    6.30    n1->AddApplication (sink);
    6.31    // Start the sink
    6.32    sink->Start (Seconds (1.1));
     7.1 --- a/examples/simple-error-model.cc	Wed Mar 12 11:35:00 2008 -0700
     7.2 +++ b/examples/simple-error-model.cc	Thu Mar 13 11:10:38 2008 -0700
     7.3 @@ -143,31 +143,25 @@
     7.4    NS_LOG_INFO ("Create Applications.");
     7.5    uint16_t port = 9;   // Discard port (RFC 863)
     7.6    Ptr<OnOffApplication> ooff = 
     7.7 -    CreateObject<OnOffApplication> (
     7.8 -                                        "Node", n0, 
     7.9 -                                        "Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
    7.10 -                                        "Protocol", TypeId::LookupByName ("Udp"),
    7.11 -                                        "OnTime", ConstantVariable(1), 
    7.12 -                                        "OffTime", ConstantVariable(0));
    7.13 +    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
    7.14 +                                    "Protocol", TypeId::LookupByName ("Udp"),
    7.15 +                                    "OnTime", ConstantVariable(1), 
    7.16 +                                    "OffTime", ConstantVariable(0));
    7.17    n0->AddApplication (ooff);
    7.18    // Start the application
    7.19    ooff->Start(Seconds(1.0));
    7.20    ooff->Stop (Seconds(10.0));
    7.21  
    7.22    // Create an optional packet sink to receive these packets
    7.23 -  Ptr<PacketSink> sink = CreateObject<PacketSink> (
    7.24 -                                                       "Node", n3,
    7.25 -                                                       "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    7.26 -                                                       "Protocol", TypeId::LookupByName ("Udp"));
    7.27 +  Ptr<PacketSink> sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    7.28 +                                                   "Protocol", TypeId::LookupByName ("Udp"));
    7.29    n3->AddApplication (sink);
    7.30    // Start the sink
    7.31    sink->Start (Seconds (1.0));
    7.32    sink->Stop (Seconds (10.0));
    7.33  
    7.34    // Create a similar flow from n3 to n1, starting at time 1.1 seconds
    7.35 -  ooff = CreateObject<OnOffApplication> (
    7.36 -                                         "Node", n3, 
    7.37 -                                         "Remote", Address (InetSocketAddress ("10.1.2.1", port)), 
    7.38 +  ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.2.1", port)), 
    7.39                                           "Protocol", TypeId::LookupByName ("Udp"),
    7.40                                           "OnTime", ConstantVariable(1), 
    7.41                                           "OffTime", ConstantVariable(0));
    7.42 @@ -177,9 +171,7 @@
    7.43    ooff->Stop (Seconds(10.0));
    7.44  
    7.45    // Create a packet sink to receive these packets
    7.46 -  sink = CreateObject<PacketSink> (
    7.47 -                                   "Node", n1,
    7.48 -                                   "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    7.49 +  sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    7.50                                     "Protocol", TypeId::LookupByName ("Udp"));
    7.51    n1->AddApplication (sink);
    7.52    // Start the sink
     8.1 --- a/examples/simple-global-routing.cc	Wed Mar 12 11:35:00 2008 -0700
     8.2 +++ b/examples/simple-global-routing.cc	Thu Mar 13 11:10:38 2008 -0700
     8.3 @@ -160,11 +160,10 @@
     8.4    NS_LOG_INFO ("Create Applications.");
     8.5    uint16_t port = 9;   // Discard port (RFC 863)
     8.6    Ptr<OnOffApplication> ooff = 
     8.7 -    CreateObject<OnOffApplication> ("Node", n0, 
     8.8 -                                        "Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
     8.9 -                                        "Protocol", TypeId::LookupByName ("Udp"),
    8.10 -                                        "OnTime", ConstantVariable (1), 
    8.11 -                                        "OffTime", ConstantVariable (0));
    8.12 +    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
    8.13 +                                    "Protocol", TypeId::LookupByName ("Udp"),
    8.14 +                                    "OnTime", ConstantVariable (1), 
    8.15 +                                    "OffTime", ConstantVariable (0));
    8.16    n0->AddApplication (ooff);
    8.17    // Start the application
    8.18    ooff->Start (Seconds (1.0));
    8.19 @@ -173,30 +172,26 @@
    8.20    // Create a packet sink to receive these packets
    8.21    // The last argument "true" disables output from the Receive callback
    8.22    Ptr<PacketSink> sink = 
    8.23 -    CreateObject<PacketSink> ("Node", n3, 
    8.24 -                                  "Remote", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    8.25 -                                  "Protocol", TypeId::LookupByName ("Udp"));
    8.26 +    CreateObject<PacketSink> ("Remote", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    8.27 +                              "Protocol", TypeId::LookupByName ("Udp"));
    8.28    n3->AddApplication (sink);
    8.29    // Start the sink
    8.30    sink->Start (Seconds (1.0));
    8.31    sink->Stop (Seconds (10.0));
    8.32  
    8.33    // Create a similar flow from n3 to n1, starting at time 1.1 seconds
    8.34 -  ooff = CreateObject<OnOffApplication> (
    8.35 -                                             "Node", n3, 
    8.36 -                                             "Remote", Address (InetSocketAddress ("10.1.2.1", port)),
    8.37 -                                             "Protocol", TypeId::LookupByName ("Udp"),
    8.38 -                                             "OnTime", ConstantVariable (1), 
    8.39 -                                             "OffTime", ConstantVariable (0));
    8.40 +  ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.2.1", port)),
    8.41 +                                         "Protocol", TypeId::LookupByName ("Udp"),
    8.42 +                                         "OnTime", ConstantVariable (1), 
    8.43 +                                         "OffTime", ConstantVariable (0));
    8.44    n3->AddApplication (ooff);
    8.45    // Start the application
    8.46    ooff->Start (Seconds (1.1));
    8.47    ooff->Stop (Seconds (10.0));
    8.48  
    8.49    // Create a packet sink to receive these packets
    8.50 -  sink = CreateObject<PacketSink> ("Node", n1,
    8.51 -                                       "Remote", Address (InetSocketAddress (Ipv4Address::GetAny (), port)), 
    8.52 -                                       "Protocol", TypeId::LookupByName ("Udp"));
    8.53 +  sink = CreateObject<PacketSink> ("Remote", Address (InetSocketAddress (Ipv4Address::GetAny (), port)), 
    8.54 +                                   "Protocol", TypeId::LookupByName ("Udp"));
    8.55    n1->AddApplication (sink);
    8.56    // Start the sink
    8.57    sink->Start (Seconds (1.1));
     9.1 --- a/examples/simple-point-to-point-olsr.cc	Wed Mar 12 11:35:00 2008 -0700
     9.2 +++ b/examples/simple-point-to-point-olsr.cc	Thu Mar 13 11:10:38 2008 -0700
     9.3 @@ -167,42 +167,34 @@
     9.4    NS_LOG_INFO ("Create Applications.");
     9.5    uint16_t port = 9;   // Discard port (RFC 863)
     9.6    Ptr<OnOffApplication> ooff = 
     9.7 -    CreateObject<OnOffApplication> (
     9.8 -                                        "Node", n0, 
     9.9 -                                        "Remote", Address (InetSocketAddress ("10.1.4.2", port)), 
    9.10 -                                        "Protocol", TypeId::LookupByName ("Udp"),
    9.11 -                                        "OnTime", ConstantVariable(1), 
    9.12 -                                        "OffTime", ConstantVariable(0));
    9.13 +    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.4.2", port)), 
    9.14 +                                    "Protocol", TypeId::LookupByName ("Udp"),
    9.15 +                                    "OnTime", ConstantVariable(1), 
    9.16 +                                    "OffTime", ConstantVariable(0));
    9.17    n0->AddApplication (ooff);
    9.18    // Start the application
    9.19    ooff->Start(Seconds(1.0));
    9.20  
    9.21    // Create an optional packet sink to receive these packets
    9.22    Ptr<PacketSink> sink = 
    9.23 -    CreateObject<PacketSink> (
    9.24 -                                  "Node", n4,
    9.25 -                                  "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    9.26 -                                  "Protocol", TypeId::LookupByName ("Udp"));
    9.27 +    CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    9.28 +                              "Protocol", TypeId::LookupByName ("Udp"));
    9.29    n3->AddApplication (sink);
    9.30    // Start the sink
    9.31    sink->Start (Seconds (1.0));
    9.32  
    9.33    // Create a similar flow from n3 to n1, starting at time 1.1 seconds
    9.34 -  ooff = CreateObject<OnOffApplication> (
    9.35 -                                             "Node", n4, 
    9.36 -                                             "Remote", Address (InetSocketAddress ("10.1.2.1", port)), 
    9.37 -                                             "Protocol", TypeId::LookupByName ("Udp"),
    9.38 -                                             "OnTime", ConstantVariable(1), 
    9.39 -                                             "OffTime", ConstantVariable(0));
    9.40 +  ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.2.1", port)), 
    9.41 +                                         "Protocol", TypeId::LookupByName ("Udp"),
    9.42 +                                         "OnTime", ConstantVariable(1), 
    9.43 +                                         "OffTime", ConstantVariable(0));
    9.44    n3->AddApplication (ooff);
    9.45    // Start the application
    9.46    ooff->Start (Seconds(1.1));
    9.47  
    9.48    // Create a packet sink to receive these packets
    9.49 -  sink = CreateObject<PacketSink> (
    9.50 -                                       "Node", n1,
    9.51 -                                       "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    9.52 -                                       "Protocol", TypeId::LookupByName ("Udp"));
    9.53 +  sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
    9.54 +                                   "Protocol", TypeId::LookupByName ("Udp"));
    9.55    n1->AddApplication (sink);
    9.56    // Start the sink
    9.57    sink->Start (Seconds (1.1));
    10.1 --- a/examples/simple-point-to-point.cc	Wed Mar 12 11:35:00 2008 -0700
    10.2 +++ b/examples/simple-point-to-point.cc	Thu Mar 13 11:10:38 2008 -0700
    10.3 @@ -136,42 +136,34 @@
    10.4    NS_LOG_INFO ("Create Applications.");
    10.5    uint16_t port = 9;   // Discard port (RFC 863)
    10.6    Ptr<OnOffApplication> ooff = 
    10.7 -    CreateObject<OnOffApplication> (
    10.8 -                                        "Node", n0, 
    10.9 -                                        "Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
   10.10 -                                        "Protocol", TypeId::LookupByName ("Udp"),
   10.11 -                                        "OnTime", ConstantVariable(1), 
   10.12 -                                        "OffTime", ConstantVariable(0));
   10.13 +    CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.3.2", port)), 
   10.14 +                                    "Protocol", TypeId::LookupByName ("Udp"),
   10.15 +                                    "OnTime", ConstantVariable(1), 
   10.16 +                                    "OffTime", ConstantVariable(0));
   10.17    n0->AddApplication (ooff);
   10.18    // Start the application
   10.19    ooff->Start (Seconds(1.0));
   10.20  
   10.21    // Create an optional packet sink to receive these packets
   10.22    Ptr<PacketSink> sink = 
   10.23 -    CreateObject<PacketSink> (
   10.24 -                                  "Node", n3,
   10.25 -                                  "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
   10.26 -                                  "Protocol", TypeId::LookupByName ("Udp"));
   10.27 +    CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
   10.28 +                              "Protocol", TypeId::LookupByName ("Udp"));
   10.29    n3->AddApplication (sink);
   10.30    // Start the sink
   10.31    sink->Start (Seconds (1.0));
   10.32  
   10.33    // Create a similar flow from n3 to n1, starting at time 1.1 seconds
   10.34 -  ooff = CreateObject<OnOffApplication> (
   10.35 -                                             "Node", n3, 
   10.36 -                                             "Remote", Address (InetSocketAddress ("10.1.2.1", port)), 
   10.37 -                                             "Protocol", TypeId::LookupByName ("Udp"),
   10.38 -                                             "OnTime", ConstantVariable(1), 
   10.39 -                                             "OffTime", ConstantVariable(0));
   10.40 +  ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.2.1", port)), 
   10.41 +                                         "Protocol", TypeId::LookupByName ("Udp"),
   10.42 +                                         "OnTime", ConstantVariable(1), 
   10.43 +                                         "OffTime", ConstantVariable(0));
   10.44    n3->AddApplication (ooff);
   10.45    // Start the application
   10.46    ooff->Start(Seconds(1.1));
   10.47  
   10.48    // Create a packet sink to receive these packets
   10.49 -  sink = CreateObject<PacketSink> (
   10.50 -                                       "Node", n1,
   10.51 -                                       "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
   10.52 -                                       "Protocol", TypeId::LookupByName ("Udp"));
   10.53 +  sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), port)),
   10.54 +                                   "Protocol", TypeId::LookupByName ("Udp"));
   10.55    n1->AddApplication (sink);
   10.56    // Start the sink
   10.57    sink->Start (Seconds (1.1));
   10.58 @@ -180,22 +172,18 @@
   10.59    // Create a file transfer from n0 to n3, starting at time 1.2
   10.60    uint16_t servPort = 500;
   10.61  
   10.62 -  ooff = CreateObject<OnOffApplication> (
   10.63 -                                             "Node", n0, 
   10.64 -                                             "Remote", Address (InetSocketAddress ("10.1.3.2", servPort)), 
   10.65 -                                             "Protocol", TypeId::LookupByName ("Tcp"),
   10.66 -                                             "OnTime", ConstantVariable(1), 
   10.67 -                                             "OffTime", ConstantVariable(0));
   10.68 +  ooff = CreateObject<OnOffApplication> ("Remote", Address (InetSocketAddress ("10.1.3.2", servPort)), 
   10.69 +                                         "Protocol", TypeId::LookupByName ("Tcp"),
   10.70 +                                         "OnTime", ConstantVariable(1), 
   10.71 +                                         "OffTime", ConstantVariable(0));
   10.72    n0->AddApplication (ooff);
   10.73    // Start the application
   10.74    ooff->Start (Seconds(1.2));
   10.75    ooff->Stop (Seconds(1.35));
   10.76  
   10.77    // Create a packet sink to receive these TCP packets
   10.78 -  sink = CreateObject<PacketSink> (
   10.79 -                                       "Node", n3,
   10.80 -                                       "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   10.81 -                                       "Protocol", TypeId::LookupByName ("Tcp"));
   10.82 +  sink = CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   10.83 +                                   "Protocol", TypeId::LookupByName ("Tcp"));
   10.84    n3->AddApplication (sink);
   10.85    sink->Start (Seconds (1.2));
   10.86  
    11.1 --- a/examples/tcp-large-transfer-errors.cc	Wed Mar 12 11:35:00 2008 -0700
    11.2 +++ b/examples/tcp-large-transfer-errors.cc	Thu Mar 13 11:10:38 2008 -0700
    11.3 @@ -198,10 +198,8 @@
    11.4  
    11.5    // Create a packet sink to receive these packets
    11.6    Ptr<PacketSink> sink = 
    11.7 -    CreateObject<PacketSink> (
    11.8 -                                  "Node", n2,
    11.9 -                                  "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   11.10 -                                  "Protocol", TypeId::LookupByName ("Tcp"));
   11.11 +    CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   11.12 +                              "Protocol", TypeId::LookupByName ("Tcp"));
   11.13    n2->AddApplication (sink);
   11.14    sink->Start (Seconds (0.0));
   11.15    sink->Stop (Seconds (10000.0));
    12.1 --- a/examples/tcp-large-transfer.cc	Wed Mar 12 11:35:00 2008 -0700
    12.2 +++ b/examples/tcp-large-transfer.cc	Thu Mar 13 11:10:38 2008 -0700
    12.3 @@ -198,10 +198,8 @@
    12.4  
    12.5    // Create a packet sink to receive these packets
    12.6    Ptr<PacketSink> sink = 
    12.7 -    CreateObject<PacketSink> (
    12.8 -                                  "Node", n2,
    12.9 -                                  "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   12.10 -                                  "Protocol", TypeId::LookupByName ("Tcp"));
   12.11 +    CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   12.12 +                              "Protocol", TypeId::LookupByName ("Tcp"));
   12.13    n2->AddApplication (sink);
   12.14    sink->Start (Seconds (0.0));
   12.15    sink->Stop (Seconds (100.0));
    13.1 --- a/examples/tcp-small-transfer-oneloss.cc	Wed Mar 12 11:35:00 2008 -0700
    13.2 +++ b/examples/tcp-small-transfer-oneloss.cc	Thu Mar 13 11:10:38 2008 -0700
    13.3 @@ -180,10 +180,8 @@
    13.4  
    13.5    // Create a packet sink to receive these packets
    13.6    Ptr<PacketSink> sink = 
    13.7 -    CreateObject<PacketSink> (
    13.8 -                                  "Node", n2,
    13.9 -                                  "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   13.10 -                                  "Protocol", TypeId::LookupByName ("Tcp"));
   13.11 +    CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   13.12 +                              "Protocol", TypeId::LookupByName ("Tcp"));
   13.13    n2->AddApplication (sink);
   13.14    sink->Start (Seconds (0.0));
   13.15    sink->Stop (Seconds (100.0));
    14.1 --- a/examples/tcp-small-transfer.cc	Wed Mar 12 11:35:00 2008 -0700
    14.2 +++ b/examples/tcp-small-transfer.cc	Thu Mar 13 11:10:38 2008 -0700
    14.3 @@ -190,10 +190,8 @@
    14.4  
    14.5    // Create a packet sink to receive these packets
    14.6    Ptr<PacketSink> sink = 
    14.7 -    CreateObject<PacketSink> (
    14.8 -                                  "Node", n2,
    14.9 -                                  "Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   14.10 -                                  "Protocol", TypeId::LookupByName ("Tcp"));
   14.11 +    CreateObject<PacketSink> ("Local", Address (InetSocketAddress (Ipv4Address::GetAny (), servPort)),
   14.12 +                              "Protocol", TypeId::LookupByName ("Tcp"));
   14.13    n2->AddApplication (sink);
   14.14    sink->Start (Seconds (0.0));
   14.15    sink->Stop (Seconds (100.0));
    15.1 --- a/examples/udp-echo.cc	Wed Mar 12 11:35:00 2008 -0700
    15.2 +++ b/examples/udp-echo.cc	Thu Mar 13 11:10:38 2008 -0700
    15.3 @@ -161,8 +161,7 @@
    15.4  //
    15.5    uint16_t port = 9;  // well-known echo port number
    15.6  
    15.7 -  Ptr<UdpEchoServer> server = CreateObject<UdpEchoServer> ("Node", n1, 
    15.8 -                                                               "Port", Uinteger (port));
    15.9 +  Ptr<UdpEchoServer> server = CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   15.10    n1->AddApplication (server);
   15.11  //
   15.12  // Create a UdpEchoClient application to send UDP datagrams from node zero to
   15.13 @@ -173,12 +172,11 @@
   15.14    Time interPacketInterval = Seconds (1.);
   15.15  
   15.16    Ptr<UdpEchoClient> client = 
   15.17 -    CreateObject<UdpEchoClient> ("Node", n0, 
   15.18 -                                     "RemoteIpv4", Ipv4Address ("10.1.1.2"),
   15.19 -                                     "RemotePort", Uinteger (port),
   15.20 -                                     "MaxPackets", Uinteger (maxPacketCount), 
   15.21 -                                     "Interval", interPacketInterval, 
   15.22 -                                     "PacketSize", Uinteger (packetSize));
   15.23 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.1.2"),
   15.24 +                                 "RemotePort", Uinteger (port),
   15.25 +                                 "MaxPackets", Uinteger (maxPacketCount), 
   15.26 +                                 "Interval", interPacketInterval, 
   15.27 +                                 "PacketSize", Uinteger (packetSize));
   15.28    n0->AddApplication (client);
   15.29  //
   15.30  // Tell the applications when to start and stop.
    16.1 --- a/samples/main-adhoc-wifi.cc	Wed Mar 12 11:35:00 2008 -0700
    16.2 +++ b/samples/main-adhoc-wifi.cc	Thu Mar 13 11:10:38 2008 -0700
    16.3 @@ -149,13 +149,12 @@
    16.4    destination.SetSingleDevice (0);
    16.5    destination.SetPhysicalAddress (devices.Get (1)->GetAddress ());
    16.6    Ptr<Application> app = 
    16.7 -    CreateObject<OnOffApplication> ("Node", c.Get (0), 
    16.8 -                                        "Remote", Address (destination),
    16.9 -                                        "Protocol", TypeId::LookupByName ("Packet"),
   16.10 -                                        "OnTime", ConstantVariable (250),
   16.11 -                                        "OffTime", ConstantVariable (0),
   16.12 -                                        "DataRate", DataRate (60000000),
   16.13 -                                        "PacketSize", Uinteger (2000));
   16.14 +    CreateObject<OnOffApplication> ("Remote", Address (destination),
   16.15 +                                    "Protocol", TypeId::LookupByName ("Packet"),
   16.16 +                                    "OnTime", ConstantVariable (250),
   16.17 +                                    "OffTime", ConstantVariable (0),
   16.18 +                                    "DataRate", DataRate (60000000),
   16.19 +                                    "PacketSize", Uinteger (2000));
   16.20    c.Get (0)->AddApplication (app);
   16.21  
   16.22    app->Start (Seconds (0.5));
    17.1 --- a/samples/main-ap-wifi.cc	Wed Mar 12 11:35:00 2008 -0700
    17.2 +++ b/samples/main-ap-wifi.cc	Thu Mar 13 11:10:38 2008 -0700
    17.3 @@ -144,11 +144,10 @@
    17.4    destination.SetSingleDevice (0);
    17.5    destination.SetPhysicalAddress (staDevs.Get(1)->GetAddress ());
    17.6    Ptr<Application> app = 
    17.7 -    CreateObject<OnOffApplication> ("Node", stas.Get (0), 
    17.8 -                                        "Remote", Address (destination), 
    17.9 -                                        "Protocol", TypeId::LookupByName ("Packet"),
   17.10 -                                        "OnTime", ConstantVariable (42),
   17.11 -                                        "OffTime", ConstantVariable (0));
   17.12 +    CreateObject<OnOffApplication> ("Remote", Address (destination), 
   17.13 +                                    "Protocol", TypeId::LookupByName ("Packet"),
   17.14 +                                    "OnTime", ConstantVariable (42),
   17.15 +                                    "OffTime", ConstantVariable (0));
   17.16    stas.Get (0)->AddApplication (app);
   17.17    app->Start (Seconds (0.5));
   17.18    app->Stop (Seconds (43.0));
    18.1 --- a/src/devices/csma/csma-ipv4-topology.cc	Wed Mar 12 11:35:00 2008 -0700
    18.2 +++ b/src/devices/csma/csma-ipv4-topology.cc	Thu Mar 13 11:10:38 2008 -0700
    18.3 @@ -44,9 +44,8 @@
    18.4    Ptr<Queue> q = CreateObject<DropTailQueue> ();
    18.5  
    18.6    // assume full-duplex
    18.7 -  Ptr<CsmaNetDevice> nd = CreateObject<CsmaNetDevice> ("Node", node, 
    18.8 -                                                           "Address", addr, 
    18.9 -                                                           "EncapsulationMode", String ("IpArp"));
   18.10 +  Ptr<CsmaNetDevice> nd = CreateObject<CsmaNetDevice> ("Address", addr, 
   18.11 +                                                       "EncapsulationMode", String ("IpArp"));
   18.12    node->AddDevice (nd);
   18.13  
   18.14    nd->AddQueue(q);
   18.15 @@ -62,18 +61,16 @@
   18.16  {
   18.17    Ptr<Queue> q = CreateObject<DropTailQueue> ();
   18.18  
   18.19 -  Ptr<CsmaNetDevice> nd0 = CreateObject<CsmaNetDevice> ("Node", n1, 
   18.20 -                                                            "Address", addr,
   18.21 -                                                            "EncapsulationMode", String ("Llc"));
   18.22 +  Ptr<CsmaNetDevice> nd0 = CreateObject<CsmaNetDevice> ("Address", addr,
   18.23 +                                                        "EncapsulationMode", String ("Llc"));
   18.24    n1->AddDevice (nd0);
   18.25    nd0->SetSendEnable (true);
   18.26    nd0->SetReceiveEnable (false);
   18.27    nd0->AddQueue(q);
   18.28    nd0->Attach (ch);
   18.29  
   18.30 -  Ptr<CsmaNetDevice> nd1 = CreateObject<CsmaNetDevice> ("Node", n1, 
   18.31 -                                                            "Address", addr,
   18.32 -                                                            "EncapsulationMode", String ("Llc"));
   18.33 +  Ptr<CsmaNetDevice> nd1 = CreateObject<CsmaNetDevice> ("Address", addr,
   18.34 +                                                        "EncapsulationMode", String ("Llc"));
   18.35    n1->AddDevice (nd1);
   18.36    nd1->SetSendEnable (false);
   18.37    nd1->SetReceiveEnable (true);
   18.38 @@ -88,18 +85,16 @@
   18.39  {
   18.40    Ptr<Queue> q = CreateObject<DropTailQueue> ();
   18.41  
   18.42 -  Ptr<CsmaNetDevice> nd0 = CreateObject<CsmaNetDevice> ("Node", n1, 
   18.43 -                                                            "Address", addr,
   18.44 -                                                            "EncapsulationMode", String ("Raw"));
   18.45 +  Ptr<CsmaNetDevice> nd0 = CreateObject<CsmaNetDevice> ("Address", addr,
   18.46 +                                                        "EncapsulationMode", String ("Raw"));
   18.47    n1->AddDevice (nd0);
   18.48    nd0->SetSendEnable (true);
   18.49    nd0->SetReceiveEnable (false);
   18.50    nd0->AddQueue(q);
   18.51    nd0->Attach (ch);
   18.52  
   18.53 -  Ptr<CsmaNetDevice> nd1 = CreateObject<CsmaNetDevice> ("Node", n1, 
   18.54 -                                                            "Address", addr,
   18.55 -                                                            "EncapsulationMode", String ("Raw"));
   18.56 +  Ptr<CsmaNetDevice> nd1 = CreateObject<CsmaNetDevice> ("Address", addr,
   18.57 +                                                        "EncapsulationMode", String ("Raw"));
   18.58    n1->AddDevice (nd1);
   18.59    nd1->SetSendEnable (false);
   18.60    nd1->SetReceiveEnable (true);
    19.1 --- a/src/devices/csma/csma-net-device.cc	Wed Mar 12 11:35:00 2008 -0700
    19.2 +++ b/src/devices/csma/csma-net-device.cc	Thu Mar 13 11:10:38 2008 -0700
    19.3 @@ -45,11 +45,6 @@
    19.4    static TypeId tid = TypeId ("CsmaNetDevice")
    19.5      .SetParent<NetDevice> ()
    19.6      .AddConstructor<CsmaNetDevice> ()
    19.7 -    .AddAttribute ("Node", "The node with which this device is associated",
    19.8 -                   TypeId::ATTR_GET | TypeId::ATTR_CONSTRUCT,
    19.9 -                   Ptr<Node> (0),
   19.10 -                   MakePtrAccessor (&CsmaNetDevice::m_node),
   19.11 -                   MakePtrChecker<Node> ())
   19.12      .AddAttribute ("Address", "The address of this device.",
   19.13                     Mac48Address ("ff:ff:ff:ff:ff:ff"),
   19.14                     MakeMac48AddressAccessor (&CsmaNetDevice::m_address),
   19.15 @@ -702,6 +697,11 @@
   19.16  {
   19.17    return m_node;
   19.18  }
   19.19 +void 
   19.20 +CsmaNetDevice::SetNode (Ptr<Node> node)
   19.21 +{
   19.22 +  m_node = node;
   19.23 +}
   19.24  bool 
   19.25  CsmaNetDevice::NeedsArp (void) const
   19.26  {
    20.1 --- a/src/devices/csma/csma-net-device.h	Wed Mar 12 11:35:00 2008 -0700
    20.2 +++ b/src/devices/csma/csma-net-device.h	Thu Mar 13 11:10:38 2008 -0700
    20.3 @@ -222,6 +222,7 @@
    20.4    virtual bool IsPointToPoint (void) const;
    20.5    virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
    20.6    virtual Ptr<Node> GetNode (void) const;
    20.7 +  virtual void SetNode (Ptr<Node> node);
    20.8    virtual bool NeedsArp (void) const;
    20.9    virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
   20.10  
    21.1 --- a/src/devices/csma/csma-topology.cc	Wed Mar 12 11:35:00 2008 -0700
    21.2 +++ b/src/devices/csma/csma-topology.cc	Thu Mar 13 11:10:38 2008 -0700
    21.3 @@ -48,9 +48,8 @@
    21.4    Ptr<CsmaChannel> ch,
    21.5    Mac48Address addr)
    21.6  {
    21.7 -  Ptr<CsmaNetDevice> nd1 = CreateObject<CsmaNetDevice> ("Node", Ptr<Node> (n1), 
    21.8 -                                                            "Address", addr, 
    21.9 -                                                            "EncapsulationMode", "EthernetV1");
   21.10 +  Ptr<CsmaNetDevice> nd1 = CreateObject<CsmaNetDevice> ("Address", addr, 
   21.11 +                                                        "EncapsulationMode", "EthernetV1");
   21.12  
   21.13    Ptr<Queue> q = Queue::CreateDefault ();
   21.14    nd1->AddQueue(q);
    22.1 --- a/src/devices/point-to-point/point-to-point-net-device.cc	Wed Mar 12 11:35:00 2008 -0700
    22.2 +++ b/src/devices/point-to-point/point-to-point-net-device.cc	Thu Mar 13 11:10:38 2008 -0700
    22.3 @@ -42,11 +42,6 @@
    22.4    static TypeId tid = TypeId ("PointToPointNetDevice")
    22.5      .SetParent<NetDevice> ()
    22.6      .AddConstructor<PointToPointNetDevice> ()
    22.7 -    .AddAttribute ("Node", "The node with which this device is associated",
    22.8 -                   TypeId::ATTR_GET | TypeId::ATTR_CONSTRUCT,
    22.9 -                   Ptr<Node> (0),
   22.10 -                   MakePtrAccessor (&PointToPointNetDevice::m_node),
   22.11 -                   MakePtrChecker<Node> ())
   22.12      .AddAttribute ("Address", "The address of this device.",
   22.13                     Mac48Address ("ff:ff:ff:ff:ff:ff"),
   22.14                     MakeMac48AddressAccessor (&PointToPointNetDevice::m_address),
   22.15 @@ -379,6 +374,11 @@
   22.16  {
   22.17    return m_node;
   22.18  }
   22.19 +void 
   22.20 +PointToPointNetDevice::SetNode (Ptr<Node> node)
   22.21 +{
   22.22 +  m_node = node;
   22.23 +}
   22.24  bool 
   22.25  PointToPointNetDevice::NeedsArp (void) const
   22.26  {
    23.1 --- a/src/devices/point-to-point/point-to-point-net-device.h	Wed Mar 12 11:35:00 2008 -0700
    23.2 +++ b/src/devices/point-to-point/point-to-point-net-device.h	Thu Mar 13 11:10:38 2008 -0700
    23.3 @@ -164,6 +164,7 @@
    23.4    virtual bool IsPointToPoint (void) const;
    23.5    virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
    23.6    virtual Ptr<Node> GetNode (void) const;
    23.7 +  virtual void SetNode (Ptr<Node> node);
    23.8    virtual bool NeedsArp (void) const;
    23.9    virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
   23.10  
    24.1 --- a/src/devices/point-to-point/point-to-point-topology.cc	Wed Mar 12 11:35:00 2008 -0700
    24.2 +++ b/src/devices/point-to-point/point-to-point-topology.cc	Thu Mar 13 11:10:38 2008 -0700
    24.3 @@ -48,16 +48,14 @@
    24.4  {
    24.5    Ptr<PointToPointChannel> channel = CreateObject<PointToPointChannel> ("BitRate", bps, "Delay", delay);
    24.6  
    24.7 -  Ptr<PointToPointNetDevice> net1 = CreateObject<PointToPointNetDevice> ("Node", n1, 
    24.8 -                                                                         "Address", Mac48Address::Allocate ());
    24.9 +  Ptr<PointToPointNetDevice> net1 = CreateObject<PointToPointNetDevice> ("Address", Mac48Address::Allocate ());
   24.10    n1->AddDevice (net1);
   24.11  
   24.12    Ptr<Queue> q = CreateObject<DropTailQueue> ();
   24.13    net1->AddQueue(q);
   24.14    net1->Attach (channel);
   24.15    
   24.16 -  Ptr<PointToPointNetDevice> net2 = CreateObject<PointToPointNetDevice> ("Node", n2, 
   24.17 -                                                                         "Address", Mac48Address::Allocate ());
   24.18 +  Ptr<PointToPointNetDevice> net2 = CreateObject<PointToPointNetDevice> ("Address", Mac48Address::Allocate ());
   24.19    n2->AddDevice (net2);
   24.20  
   24.21    q = CreateObject<DropTailQueue> ();
    25.1 --- a/src/devices/wifi/wifi-net-device.cc	Wed Mar 12 11:35:00 2008 -0700
    25.2 +++ b/src/devices/wifi/wifi-net-device.cc	Thu Mar 13 11:10:38 2008 -0700
    25.3 @@ -228,6 +228,11 @@
    25.4  {
    25.5    return m_node;
    25.6  }
    25.7 +void 
    25.8 +WifiNetDevice::SetNode (Ptr<Node> node)
    25.9 +{
   25.10 +  m_node = node;
   25.11 +}
   25.12  bool 
   25.13  WifiNetDevice::NeedsArp (void) const
   25.14  {
    26.1 --- a/src/devices/wifi/wifi-net-device.h	Wed Mar 12 11:35:00 2008 -0700
    26.2 +++ b/src/devices/wifi/wifi-net-device.h	Thu Mar 13 11:10:38 2008 -0700
    26.3 @@ -74,6 +74,7 @@
    26.4    virtual bool IsPointToPoint (void) const;
    26.5    virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
    26.6    virtual Ptr<Node> GetNode (void) const;
    26.7 +  virtual void SetNode (Ptr<Node> node);
    26.8    virtual bool NeedsArp (void) const;
    26.9    virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
   26.10  
    27.1 --- a/src/internet-node/tcp-l4-protocol.cc	Wed Mar 12 11:35:00 2008 -0700
    27.2 +++ b/src/internet-node/tcp-l4-protocol.cc	Thu Mar 13 11:10:38 2008 -0700
    27.3 @@ -324,11 +324,6 @@
    27.4  {
    27.5    static TypeId tid = TypeId ("TcpL4Protocol")
    27.6      .SetParent<Ipv4L4Protocol> ()
    27.7 -    .AddAttribute ("Node", "The node to which this protocol is associated",
    27.8 -                   TypeId::ATTR_GET | TypeId::ATTR_CONSTRUCT,
    27.9 -                   Ptr<Node> (0),
   27.10 -                   MakePtrAccessor (&TcpL4Protocol::m_node),
   27.11 -                   MakePtrChecker<Node> ())
   27.12      .AddAttribute ("RttEstimatorFactory",
   27.13                     "How RttEstimator objects are created.",
   27.14                     GetDefaultRttEstimatorFactory (),
    28.1 --- a/src/internet-node/udp-l4-protocol.cc	Wed Mar 12 11:35:00 2008 -0700
    28.2 +++ b/src/internet-node/udp-l4-protocol.cc	Thu Mar 13 11:10:38 2008 -0700
    28.3 @@ -46,11 +46,6 @@
    28.4    static TypeId tid = TypeId ("UdpL4Protocol")
    28.5      .SetParent<Ipv4L4Protocol> ()
    28.6      .AddConstructor<UdpL4Protocol> ()
    28.7 -    .AddAttribute ("Node", "The node which contains this protocol.",
    28.8 -                   TypeId::ATTR_GET | TypeId::ATTR_CONSTRUCT,
    28.9 -                   Ptr<Node> (0),
   28.10 -                   MakePtrAccessor (&UdpL4Protocol::m_node),
   28.11 -                   MakePtrChecker<Node> ())
   28.12      ;
   28.13    return tid;
   28.14  }
    29.1 --- a/src/internet-node/udp-socket.cc	Wed Mar 12 11:35:00 2008 -0700
    29.2 +++ b/src/internet-node/udp-socket.cc	Thu Mar 13 11:10:38 2008 -0700
    29.3 @@ -412,7 +412,7 @@
    29.4    Ptr<Node> rxNode = CreateObject<InternetNode> ();
    29.5    Ptr<PointToPointNetDevice> rxDev1, rxDev2;
    29.6    { // first interface
    29.7 -    rxDev1 = CreateObject<PointToPointNetDevice> ("Node", rxNode, "Address", Mac48Address::Allocate ());
    29.8 +    rxDev1 = CreateObject<PointToPointNetDevice> ("Address", Mac48Address::Allocate ());
    29.9      rxNode->AddDevice (rxDev1);
   29.10      rxDev1->AddQueue(CreateObject<DropTailQueue> ());
   29.11      Ptr<Ipv4> ipv4 = rxNode->GetObject<Ipv4> ();
   29.12 @@ -423,7 +423,7 @@
   29.13    }
   29.14  
   29.15    { // second interface
   29.16 -    rxDev2 = CreateObject<PointToPointNetDevice> ("Node", rxNode, "Address", Mac48Address::Allocate ());
   29.17 +    rxDev2 = CreateObject<PointToPointNetDevice> ("Address", Mac48Address::Allocate ());
   29.18      rxNode->AddDevice (rxDev2);
   29.19      rxDev2->AddQueue(CreateObject<DropTailQueue> ());
   29.20      Ptr<Ipv4> ipv4 = rxNode->GetObject<Ipv4> ();
   29.21 @@ -437,7 +437,7 @@
   29.22    Ptr<Node> txNode = CreateObject<InternetNode> ();
   29.23    Ptr<PointToPointNetDevice> txDev;
   29.24    {
   29.25 -    txDev = CreateObject<PointToPointNetDevice> ("Node", txNode, "Address", Mac48Address::Allocate ());
   29.26 +    txDev = CreateObject<PointToPointNetDevice> ("Address", Mac48Address::Allocate ());
   29.27      txNode->AddDevice (txDev);
   29.28      txDev->AddQueue(CreateObject<DropTailQueue> ());
   29.29      Ptr<Ipv4> ipv4 = txNode->GetObject<Ipv4> ();
    30.1 --- a/src/node/application.cc	Wed Mar 12 11:35:00 2008 -0700
    30.2 +++ b/src/node/application.cc	Thu Mar 13 11:10:38 2008 -0700
    30.3 @@ -40,10 +40,6 @@
    30.4  {
    30.5    static TypeId tid = TypeId ("Application")
    30.6      .SetParent<Object> ()
    30.7 -    .AddAttribute ("Node", "The on which this application resides",
    30.8 -                   Ptr<Node> (0),
    30.9 -                   MakePtrAccessor (&Application::m_node),
   30.10 -                   MakePtrChecker<Node> ())
   30.11      ;
   30.12    return tid;
   30.13  }
   30.14 @@ -92,6 +88,12 @@
   30.15    return m_node;
   30.16  }
   30.17  
   30.18 +void 
   30.19 +Application::SetNode (Ptr<Node> node)
   30.20 +{
   30.21 +  m_node = node;
   30.22 +}
   30.23 +
   30.24  // Protected methods
   30.25  // StartApp and StopApp will likely be overridden by application subclasses
   30.26  void Application::StartApplication()
    31.1 --- a/src/node/application.h	Wed Mar 12 11:35:00 2008 -0700
    31.2 +++ b/src/node/application.h	Thu Mar 13 11:10:38 2008 -0700
    31.3 @@ -102,6 +102,8 @@
    31.4     * \returns the Node to which this Application object is attached.
    31.5     */
    31.6    Ptr<Node> GetNode() const;
    31.7 +
    31.8 +  void SetNode (Ptr<Node> node);
    31.9    
   31.10  private:
   31.11    /**
    32.1 --- a/src/node/net-device.h	Wed Mar 12 11:35:00 2008 -0700
    32.2 +++ b/src/node/net-device.h	Thu Mar 13 11:10:38 2008 -0700
    32.3 @@ -221,6 +221,8 @@
    32.4     */
    32.5    virtual Ptr<Node> GetNode (void) const = 0;
    32.6  
    32.7 +  virtual void SetNode (Ptr<Node> node) = 0;
    32.8 +
    32.9    /**
   32.10     * \returns true if ARP is needed, false otherwise.
   32.11     *
    33.1 --- a/src/node/node.cc	Wed Mar 12 11:35:00 2008 -0700
    33.2 +++ b/src/node/node.cc	Thu Mar 13 11:10:38 2008 -0700
    33.3 @@ -96,6 +96,7 @@
    33.4  {
    33.5    uint32_t index = m_devices.size ();
    33.6    m_devices.push_back (device);
    33.7 +  device->SetNode (this);
    33.8    device->SetIfIndex(index);
    33.9    device->SetReceiveCallback (MakeCallback (&Node::ReceiveFromDevice, this));
   33.10    NotifyDeviceAdded (device);
   33.11 @@ -117,6 +118,7 @@
   33.12  {
   33.13    uint32_t index = m_applications.size ();
   33.14    m_applications.push_back (application);
   33.15 +  application->SetNode (this);
   33.16    return index;
   33.17  }
   33.18  Ptr<Application> 
    34.1 --- a/tutorial/point-to-point-ipv4-topology.cc	Wed Mar 12 11:35:00 2008 -0700
    34.2 +++ b/tutorial/point-to-point-ipv4-topology.cc	Thu Mar 13 11:10:38 2008 -0700
    34.3 @@ -45,8 +45,7 @@
    34.4    NS_ASSERT (channel->GetNDevices () <= 1);
    34.5  
    34.6    Ptr<PointToPointNetDevice> nd = 
    34.7 -    CreateObject<PointToPointNetDevice> ("Node", node, 
    34.8 -                                             "Address", Mac48Address::Allocate ());
    34.9 +    CreateObject<PointToPointNetDevice> ("Address", Mac48Address::Allocate ());
   34.10    node->AddDevice (nd);
   34.11    Ptr<Queue> q = CreateObject<DropTailQueue> ();
   34.12    nd->AddQueue(q);
    35.1 --- a/tutorial/tutorial-bus-network.cc	Wed Mar 12 11:35:00 2008 -0700
    35.2 +++ b/tutorial/tutorial-bus-network.cc	Thu Mar 13 11:10:38 2008 -0700
    35.3 @@ -44,17 +44,16 @@
    35.4  
    35.5    Ptr<Node> n0 = bus.GetNode (0);
    35.6    Ptr<UdpEchoClient> client =  
    35.7 -    CreateObject<UdpEchoClient> ("Node", n0, 
    35.8 -				     "RemoteIpv4", Ipv4Address ("10.1.0.1"),
    35.9 -				     "RemotePort", Uinteger (port),
   35.10 -				     "MaxPackets", Uinteger (1), 
   35.11 -				     "Interval", Seconds(1.), 
   35.12 -				     "PacketSize", Uinteger (1024));
   35.13 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.0.1"),
   35.14 +				 "RemotePort", Uinteger (port),
   35.15 +				 "MaxPackets", Uinteger (1), 
   35.16 +				 "Interval", Seconds(1.), 
   35.17 +				 "PacketSize", Uinteger (1024));
   35.18    n0->AddApplication (client);
   35.19  
   35.20    Ptr<Node> n1 = bus.GetNode (1);
   35.21    Ptr<UdpEchoServer> server = 
   35.22 -    CreateObject<UdpEchoServer> ("Node", n1, "Port", Uinteger (port));
   35.23 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   35.24    n1->AddApplication (server);
   35.25  
   35.26    server->Start(Seconds(1.));
    36.1 --- a/tutorial/tutorial-csma-echo-ascii-trace.cc	Wed Mar 12 11:35:00 2008 -0700
    36.2 +++ b/tutorial/tutorial-csma-echo-ascii-trace.cc	Thu Mar 13 11:10:38 2008 -0700
    36.3 @@ -69,17 +69,15 @@
    36.4    uint16_t port = 7;
    36.5  
    36.6    Ptr<UdpEchoClient> client = 
    36.7 -    CreateObject<UdpEchoClient> ("Node", n0, 
    36.8 -                                     "RemoteIpv4", Ipv4Address ("10.1.1.2"),
    36.9 -                                     "RemotePort", Uinteger (port), 
   36.10 -                                     "MaxPackets", Uinteger (1), 
   36.11 -                                     "Interval", Seconds(1.), 
   36.12 -                                     "PacketSize", Uinteger (1024));
   36.13 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.1.2"),
   36.14 +                                 "RemotePort", Uinteger (port), 
   36.15 +                                 "MaxPackets", Uinteger (1), 
   36.16 +                                 "Interval", Seconds(1.), 
   36.17 +                                 "PacketSize", Uinteger (1024));
   36.18    n0->AddApplication (client);
   36.19  
   36.20    Ptr<UdpEchoServer> server = 
   36.21 -    CreateObject<UdpEchoServer> ("Node", n1, 
   36.22 -                                     "Port", Uinteger (port));
   36.23 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   36.24    n1->AddApplication (server);
   36.25  
   36.26    server->Start(Seconds(1.));
    37.1 --- a/tutorial/tutorial-csma-echo-pcap-trace.cc	Wed Mar 12 11:35:00 2008 -0700
    37.2 +++ b/tutorial/tutorial-csma-echo-pcap-trace.cc	Thu Mar 13 11:10:38 2008 -0700
    37.3 @@ -70,17 +70,15 @@
    37.4    uint16_t port = 7;
    37.5  
    37.6    Ptr<UdpEchoClient> client = 
    37.7 -    CreateObject<UdpEchoClient> ("Node", n0, 
    37.8 -                                     "RemoteIpv4", Ipv4Address ("10.1.1.2"),
    37.9 -                                     "RemotePort", Uinteger (port), 
   37.10 -                                     "MaxPackets", Uinteger (1), 
   37.11 -                                     "Interval", Seconds(1.), 
   37.12 -                                     "PacketSize", Uinteger (1024));
   37.13 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.1.2"),
   37.14 +                                 "RemotePort", Uinteger (port), 
   37.15 +                                 "MaxPackets", Uinteger (1), 
   37.16 +                                 "Interval", Seconds(1.), 
   37.17 +                                 "PacketSize", Uinteger (1024));
   37.18    n0->AddApplication (client);
   37.19  
   37.20    Ptr<UdpEchoServer> server = 
   37.21 -    CreateObject<UdpEchoServer> ("Node", n1, 
   37.22 -                                     "Port", Uinteger (port));
   37.23 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   37.24    n1->AddApplication (server);
   37.25  
   37.26    server->Start(Seconds(1.));
    38.1 --- a/tutorial/tutorial-csma-echo.cc	Wed Mar 12 11:35:00 2008 -0700
    38.2 +++ b/tutorial/tutorial-csma-echo.cc	Thu Mar 13 11:10:38 2008 -0700
    38.3 @@ -68,17 +68,15 @@
    38.4    uint16_t port = 7;
    38.5  
    38.6    Ptr<UdpEchoClient> client = 
    38.7 -    CreateObject<UdpEchoClient> ("Node", n0, 
    38.8 -                                     "RemoteIpv4", Ipv4Address ("10.1.1.2"),
    38.9 -                                     "RemotePort", Uinteger (port), 
   38.10 -                                     "MaxPackets", Uinteger (1), 
   38.11 -                                     "Interval", Seconds(1.), 
   38.12 -                                     "PacketSize", Uinteger (1024));
   38.13 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.1.2"),
   38.14 +                                 "RemotePort", Uinteger (port), 
   38.15 +                                 "MaxPackets", Uinteger (1), 
   38.16 +                                 "Interval", Seconds(1.), 
   38.17 +                                 "PacketSize", Uinteger (1024));
   38.18    n0->AddApplication (client);
   38.19  
   38.20    Ptr<UdpEchoServer> server = 
   38.21 -    CreateObject<UdpEchoServer> ("Node", n1, 
   38.22 -                                     "Port", Uinteger (port));
   38.23 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   38.24    n1->AddApplication (server);
   38.25  
   38.26    server->Start(Seconds(1.));
    39.1 --- a/tutorial/tutorial-linear-dumbbell.cc	Wed Mar 12 11:35:00 2008 -0700
    39.2 +++ b/tutorial/tutorial-linear-dumbbell.cc	Thu Mar 13 11:10:38 2008 -0700
    39.3 @@ -127,53 +127,45 @@
    39.4    uint16_t port = 7;
    39.5  
    39.6    Ptr<UdpEchoClient> client0 = 
    39.7 -    CreateObject<UdpEchoClient> (
    39.8 -                                     "Node", n0, 
    39.9 -                                     "RemoteIpv4", Ipv4Address ("10.1.2.1"),
   39.10 -                                     "RemotePort", Uinteger (port),
   39.11 -                                     "MaxPackets", Uinteger (100),
   39.12 -                                     "Interval", Seconds (0.01),
   39.13 -                                     "PacketSize", Uinteger (1024));
   39.14 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.2.1"),
   39.15 +                                 "RemotePort", Uinteger (port),
   39.16 +                                 "MaxPackets", Uinteger (100),
   39.17 +                                 "Interval", Seconds (0.01),
   39.18 +                                 "PacketSize", Uinteger (1024));
   39.19    n0->AddApplication (client0);
   39.20    Ptr<UdpEchoClient> client1 = 
   39.21 -    CreateObject<UdpEchoClient> (
   39.22 -                                     "Node", n1, 
   39.23 -                                     "RemoteIpv4", Ipv4Address ("10.1.2.2"),
   39.24 -                                     "RemotePort", Uinteger (port),
   39.25 -                                     "MaxPackets", Uinteger (100),
   39.26 -                                     "Interval", Seconds (0.01),
   39.27 -                                     "PacketSize", Uinteger (1024));
   39.28 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.2.2"),
   39.29 +                                 "RemotePort", Uinteger (port),
   39.30 +                                 "MaxPackets", Uinteger (100),
   39.31 +                                 "Interval", Seconds (0.01),
   39.32 +                                 "PacketSize", Uinteger (1024));
   39.33    n1->AddApplication (client1);
   39.34    Ptr<UdpEchoClient> client2 = 
   39.35 -    CreateObject<UdpEchoClient> (
   39.36 -                                     "Node", n2, 
   39.37 -                                     "RemoteIpv4", Ipv4Address ("10.1.2.3"),
   39.38 -                                     "RemotePort", Uinteger (port),
   39.39 -                                     "MaxPackets", Uinteger (100),
   39.40 -                                     "Interval", Seconds (0.01),
   39.41 -                                     "PacketSize", Uinteger (1024));
   39.42 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.2.3"),
   39.43 +                                 "RemotePort", Uinteger (port),
   39.44 +                                 "MaxPackets", Uinteger (100),
   39.45 +                                 "Interval", Seconds (0.01),
   39.46 +                                 "PacketSize", Uinteger (1024));
   39.47    n2->AddApplication (client2);
   39.48    Ptr<UdpEchoClient> client3 = 
   39.49 -    CreateObject<UdpEchoClient> (
   39.50 -                                     "Node", n3, 
   39.51 -                                     "RemoteIpv4", Ipv4Address ("10.1.2.4"),
   39.52 -                                     "RemotePort", Uinteger (port),
   39.53 -                                     "MaxPackets", Uinteger (100),
   39.54 -                                     "Interval", Seconds (0.01),
   39.55 -                                     "PacketSize", Uinteger (1024));
   39.56 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.2.4"),
   39.57 +                                 "RemotePort", Uinteger (port),
   39.58 +                                 "MaxPackets", Uinteger (100),
   39.59 +                                 "Interval", Seconds (0.01),
   39.60 +                                 "PacketSize", Uinteger (1024));
   39.61    n3->AddApplication (client3);
   39.62  
   39.63    Ptr<UdpEchoServer> server4 = 
   39.64 -    CreateObject<UdpEchoServer> ("Node", n4, "Port", Uinteger (port));
   39.65 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   39.66    n4->AddApplication (server4);
   39.67    Ptr<UdpEchoServer> server5 = 
   39.68 -    CreateObject<UdpEchoServer> ("Node", n5, "Port", Uinteger (port));
   39.69 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   39.70    n5->AddApplication (server5);
   39.71    Ptr<UdpEchoServer> server6 = 
   39.72 -    CreateObject<UdpEchoServer> ("Node", n6, "Port", Uinteger (port));
   39.73 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   39.74    n6->AddApplication (server6);
   39.75    Ptr<UdpEchoServer> server7 = 
   39.76 -    CreateObject<UdpEchoServer> ("Node", n7, "Port", Uinteger (port));
   39.77 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   39.78    n7->AddApplication (server7);
   39.79  
   39.80    server4->Start(Seconds(1.));
    40.1 --- a/tutorial/tutorial-point-to-point.cc	Wed Mar 12 11:35:00 2008 -0700
    40.2 +++ b/tutorial/tutorial-point-to-point.cc	Thu Mar 13 11:10:38 2008 -0700
    40.3 @@ -61,17 +61,15 @@
    40.4    uint16_t port = 7;
    40.5  
    40.6    Ptr<UdpEchoClient> client = 
    40.7 -    CreateObject<UdpEchoClient> ("Node", n0, 
    40.8 -                                     "RemoteIpv4", Ipv4Address ("10.1.1.2"), 
    40.9 -                                     "RemotePort", Uinteger (port), 
   40.10 -                                     "MaxPackets", Uinteger (1), 
   40.11 -                                     "Interval", Seconds(1.), 
   40.12 -                                     "PacketSize", Uinteger (1024));
   40.13 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.1.2"), 
   40.14 +                                 "RemotePort", Uinteger (port), 
   40.15 +                                 "MaxPackets", Uinteger (1), 
   40.16 +                                 "Interval", Seconds(1.), 
   40.17 +                                 "PacketSize", Uinteger (1024));
   40.18    n0->AddApplication (client);
   40.19  
   40.20    Ptr<UdpEchoServer> server = 
   40.21 -    CreateObject<UdpEchoServer> ("Node", n1, 
   40.22 -                                     "Port", Uinteger (port));
   40.23 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   40.24    n1->AddApplication (server);
   40.25  
   40.26    server->Start(Seconds(1.));
    41.1 --- a/tutorial/tutorial-star-routing.cc	Wed Mar 12 11:35:00 2008 -0700
    41.2 +++ b/tutorial/tutorial-star-routing.cc	Thu Mar 13 11:10:38 2008 -0700
    41.3 @@ -148,8 +148,7 @@
    41.4    uint16_t port = 7;
    41.5  
    41.6    Ptr<UdpEchoClient> client = 
    41.7 -    CreateObject<UdpEchoClient> ("Node", n4, 
    41.8 -                                     "RemoteIpv4", Ipv4Address ("10.1.1.2"),
    41.9 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.1.2"),
   41.10                                       "RemotePort", Uinteger (port), 
   41.11                                       "MaxPackets", Uinteger (1), 
   41.12                                       "Interval", Seconds(1.), 
   41.13 @@ -157,8 +156,7 @@
   41.14    n0->AddApplication (client);
   41.15  
   41.16    Ptr<UdpEchoServer> server = 
   41.17 -    CreateObject<UdpEchoServer> ("Node", n1, 
   41.18 -                                     "Port", Uinteger (port));
   41.19 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   41.20    n1->AddApplication (server);
   41.21  
   41.22    server->Start(Seconds(1.));
    42.1 --- a/tutorial/tutorial-star.cc	Wed Mar 12 11:35:00 2008 -0700
    42.2 +++ b/tutorial/tutorial-star.cc	Thu Mar 13 11:10:38 2008 -0700
    42.3 @@ -148,17 +148,15 @@
    42.4    uint16_t port = 7;
    42.5  
    42.6    Ptr<UdpEchoClient> client = 
    42.7 -    CreateObject<UdpEchoClient> ("Node", n0, 
    42.8 -                                     "RemoteIpv4", Ipv4Address ("10.1.1.2"),
    42.9 -                                     "RemotePort", Uinteger (port), 
   42.10 -                                     "MaxPackets", Uinteger (1), 
   42.11 -                                     "Interval", Seconds(1.), 
   42.12 -                                     "PacketSize", Uinteger (1024));
   42.13 +    CreateObject<UdpEchoClient> ("RemoteIpv4", Ipv4Address ("10.1.1.2"),
   42.14 +                                 "RemotePort", Uinteger (port), 
   42.15 +                                 "MaxPackets", Uinteger (1), 
   42.16 +                                 "Interval", Seconds(1.), 
   42.17 +                                 "PacketSize", Uinteger (1024));
   42.18    n0->AddApplication (client);
   42.19  
   42.20    Ptr<UdpEchoServer> server = 
   42.21 -    CreateObject<UdpEchoServer> ("Node", n1, 
   42.22 -                                     "Port", Uinteger (port));
   42.23 +    CreateObject<UdpEchoServer> ("Port", Uinteger (port));
   42.24    n1->AddApplication (server);
   42.25  
   42.26    server->Start(Seconds(1.));
    43.1 --- a/utils/print-introspected-doxygen.cc	Wed Mar 12 11:35:00 2008 -0700
    43.2 +++ b/utils/print-introspected-doxygen.cc	Thu Mar 13 11:10:38 2008 -0700
    43.3 @@ -17,13 +17,11 @@
    43.4    Ptr<Node> node = CreateObject<InternetNode> ();
    43.5    node->AggregateObject (CreateObject<MobilityModelNotifier> ());
    43.6  
    43.7 -  Ptr<PointToPointNetDevice> p2p = CreateObject<PointToPointNetDevice> ("Node", node, 
    43.8 -									    "Address", Mac48Address::Allocate ());
    43.9 +  Ptr<PointToPointNetDevice> p2p = CreateObject<PointToPointNetDevice> ("Address", Mac48Address::Allocate ());
   43.10    node->AddDevice (p2p);
   43.11    p2p->AddQueue (CreateObject<DropTailQueue> ());
   43.12 -  Ptr<CsmaNetDevice> csma = CreateObject<CsmaNetDevice> ("Node", node, 
   43.13 -							     "Address", Mac48Address::Allocate (),
   43.14 -							     "EncapsulationMode", String ("Llc"));
   43.15 +  Ptr<CsmaNetDevice> csma = CreateObject<CsmaNetDevice> ("Address", Mac48Address::Allocate (),
   43.16 +							 "EncapsulationMode", String ("Llc"));
   43.17    node->AddDevice (csma);
   43.18    csma->AddQueue (CreateObject<DropTailQueue> ());
   43.19