[Ns-developers] NetDevice link change callback
Sébastien Vincent
vincent at clarinet.u-strasbg.fr
Mon Jul 27 08:25:46 PDT 2009
Hi all,
In NetDevice, there is a callback when device change state (UP or DOWN).
It is used mainly by ArpL3Protocol to flush ARP cache.
But for future IPv6 integration, it would be also useful to use it to
purge Neighbor Discovery cache.
So I propose to replace single callback in NetDevice base and sub
classes by a list of link change callback.
The main API change would be :
NetDevice::SetLinkChangeCallback(Callback<void> callback) =>
NetDevice::AddLinkChangeCallback(Callback<void> callback)
In all NetDevice's subclasses, replace all Callback<void>
m_linkChangeCallback by std::list<Callback<void> m_linkChangeCallbacks.
When link change, call every callbacks of the list.
What do you think ?
Regards,
--
Sebastien Vincent
More information about the Ns-developers
mailing list