m_linkChangeCallbacks in CsmaNetDevice is not used properly
m_linkChangeCallbacks
should be triggered when a device is attached and detached from a channel. CsmaNetDevice has an attach function CsmaNetDevice::Attach (Ptr<CsmaChannel> channel)
used to attach the device to a channel. This function calls CsmaNetDevice::NotifyLinkUp ()
which triggers m_linkChangeCallbacks
callback and also sets m_LinkUp
to true. But there is no Detach ()
function in CsmaNetDevice. Currently, the device is detached from channel using CsmaChannel::Detach ()
. This function does not trigger m_linkChangeCallbacks
.