diff -r bb1eea10412f src/node/node.cc --- a/src/node/node.cc Tue Nov 24 10:45:08 2009 +0100 +++ b/src/node/node.cc Wed Nov 25 20:55:04 2009 +0100 @@ -108,6 +108,8 @@ device->SetNode (this); device->SetIfIndex(index); device->SetReceiveCallback (MakeCallback (&Node::NonPromiscReceiveFromDevice, this)); + Simulator::ScheduleWithContext (GetId (), Seconds (0.0), + &NetDevice::Start, device); NotifyDeviceAdded (device); return index; } @@ -130,6 +132,8 @@ uint32_t index = m_applications.size (); m_applications.push_back (application); application->SetNode (this); + Simulator::ScheduleWithContext (GetId (), Seconds (0.0), + &Application::Start, application); return index; } Ptr @@ -167,24 +171,6 @@ m_applications.clear (); Object::DoDispose (); } -void -Node::DoStart (void) -{ - for (std::vector >::iterator i = m_devices.begin (); - i != m_devices.end (); i++) - { - Ptr device = *i; - device->Start (); - } - for (std::vector >::iterator i = m_applications.begin (); - i != m_applications.end (); i++) - { - Ptr application = *i; - application->Start (); - } - - Object::DoStart (); -} void Node::NotifyDeviceAdded (Ptr device) diff -r bb1eea10412f src/node/node.h --- a/src/node/node.h Tue Nov 24 10:45:08 2009 +0100 +++ b/src/node/node.h Wed Nov 25 20:55:04 2009 +0100 @@ -186,7 +186,6 @@ * end of their own DoDispose method. */ virtual void DoDispose (void); - virtual void DoStart (void); private: /**