#define NETDEV_UP 0x0001
#define NETDEV_DOWN 0x0002
#define NETDEV_REBOOT 0x0003
#define NETDEV_CHANGE 0x0004
#define NETDEV_REGISTER 0x0005
#define NETDEV_UNREGISTER 0x0006
#define NETDEV_CHANGEMTU 0x0007
#define NETDEV_CHANGEADDR 0x0008
#define NETDEV_GOING_DOWN 0x0009
#define NETDEV_CHANGENAME 0x000A
#define NETDEV_FEAT_CHANGE 0x000B
#define NETDEV_BONDING_FAILOVER 0x000C
#define NETDEV_PRE_UP 0x000D
#define NETDEV_BONDING_OLDTYPE 0x000E
#define NETDEV_BONDING_NEWTYPE 0x000F
So i receive only NETDEV_UP and NETDEV_DOWN events.
Part of my code:
//event handler
static int ifEventListener(struct notifier_block *nb, unsigned long
event, void *ptr);
//set handler
struct notifier_block nbListener =
{
.notifier_call = ifEventListener
};
//event handler
static int ifEventListener(struct notifier_block *this, unsigned long
event, void *ptr)
{
struct net_device *dev = (struct net_device *) ptr;
printk(KERN_INFO "eventListener() -- %d event from net_device '%s'
(0x%08X)\n", event, dev->name, (unsigned) dev);
return 0;
}
//register handler
register_netdevice_notifier(&nbListener);
So, this is a bug in notifier or something wrong with my code ?
Thank for any help
--
Best regards,
Oleg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
I think you mean IP address? No, NETDEV_CHANGEADDR is for hardware
address, not for IP address.
If you were changing mac address, you will receive NETDEV_CHANGEADDR.
Thank for quick answer.
Yes, i mean IP address. And what about NETDEV_CHANGE ?
Is there possible for monitoring IP address/netmask changing ?
Thank.
--
Best regards,
Oleg
It is for rtnetlink state transition.
>Is there possible for monitoring IP address/netmask changing ?
>
AFAIK, no.
Cc'ing netdev experts...
Oh, I think you are right.
Btw, please don't drop Cc's.
Thanks.