[Ns-developers] NetDevice link change callback

Sébastien Vincent vincent at clarinet.u-strasbg.fr
Mon Jul 27 08:57:42 PDT 2009


Here the patch.

Regards,
--
Sebastien

Sébastien Vincent a écrit :
> 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
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: net-device-AddLinkChangeCallback.diff
Type: text/x-diff
Size: 14446 bytes
Desc: not available
Url : http://mailman.isi.edu/pipermail/ns-developers/attachments/20090727/8ce98c41/net-device-AddLinkChangeCallback-0001.bin


More information about the Ns-developers mailing list