Bugzilla – Bug 653
NetDevice link change callback proposal
Last modified: 2009-09-15 03:06:28 EDT
You need to log in before you can comment on or make changes to this bug.
From Sebastien Vincent: 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. Thread/discussion started on developers list: http://mailman.isi.edu/pipermail/ns-developers/2009-July/006280.html
Created an attachment (id=544) [details] proposed patch from Sebastien Vincent, July 27 2009
Created an attachment (id=560) [details] std::list<Callback> => TracedCallback Update patch : - typedef TracedCallback to ListCallback; - use ListCallback in NetDevice (csma, point-to-point, wifi, emu).
(In reply to comment #2) > Created an attachment (id=560) [details] [details] > std::list<Callback> => TracedCallback > > Update patch : > - typedef TracedCallback to ListCallback; > - use ListCallback in NetDevice (csma, point-to-point, wifi, emu). > For the moment, how about just removing the typedef until requirements for a ListCallback are better sorted out, and just using a TracedCallback (with your other changes)? Plus, we need to patch CHANGES.html.
Created an attachment (id=570) [details] Use TracedCallback object in *-net-device Update patch. It also add code to flush IPv6 neighbor discovery cache (in Icmpv6L4Protocol) and some text in CHANGES.html.
(In reply to comment #4) > Created an attachment (id=570) [details] [details] > Use TracedCallback object in *-net-device > > Update patch. > > It also add code to flush IPv6 neighbor discovery cache (in Icmpv6L4Protocol) > and some text in CHANGES.html. > +1 on this; I suggest to merge it next week and close this if no further comments.
Changeset: e90e1ef585b0