add Application::SetNode and NetDevice::SetNode, use them from Node::AddApplication and Node::AddDevice. kill useless "Node" attributes.

This commit is contained in:
Mathieu Lacage
2008-03-13 11:10:38 -07:00
parent aa3db11715
commit fb452286e6
43 changed files with 232 additions and 328 deletions

View File

@@ -96,6 +96,7 @@ Node::AddDevice (Ptr<NetDevice> device)
{
uint32_t index = m_devices.size ();
m_devices.push_back (device);
device->SetNode (this);
device->SetIfIndex(index);
device->SetReceiveCallback (MakeCallback (&Node::ReceiveFromDevice, this));
NotifyDeviceAdded (device);
@@ -117,6 +118,7 @@ Node::AddApplication (Ptr<Application> application)
{
uint32_t index = m_applications.size ();
m_applications.push_back (application);
application->SetNode (this);
return index;
}
Ptr<Application>