add Application::SetNode and NetDevice::SetNode, use them from Node::AddApplication and Node::AddDevice. kill useless "Node" attributes.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user