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 committed 2008-03-13 11:10:38 -07:00
1 parent 82ea02b8ec
commit 0601ecd105
43 files changed
+232 -328

No files matched your search

+2
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>