netdevice notifier

Dec 08, 2012 0 Replies

Hello,



I'm adding a netdevice notifier in my module:



int os_netdevice_notifier_cb (struct notifier_block *, unsigned long, void



*); ... static struct notifier_block os_netdevice_notifier = { os_netdevice_notifier_cb, NULL, 0 }; register_netdevice_notifier(&os_netdevice_notifier);What I want to be able to see is what devices have been registered/unregistered, i.e. I have tomonitor event NETDEV_UNREGISTER. Upon receiving this event, is it guaranteed that the device hasbeen removed form the system or this only indicates that it's been scheduled for removing and actualwork will be done later? Looking at the code in net/core/dev.c looks like the event is sent rightafter the device is cleaned up, but may be I'm missing something?And the second question -- where is the code that deletes IP/hw addresses assigned to the interfaceas it's unregistered from the system?Thanks.

Mark


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required