Re: asynchronous notifications for route and interface changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi Stephen,

Thanks for the info. The registration functions for getting notificatioins worked only for interfaces changes. When an interface is brought up or down, the registered notifier function was called. But I would also like to get notifications for any route additions or deletions and when ARP table gets modified. How do you suggest me in achieving so ..

I searched through the kernel source to find how netlink gets nofifications whenever there is a change in KRT or ARP table. I could not find the full flow of it. Can you give your inputs regarding this. Is there any seperate route table manager (RTM) for linux who is maintaining the KRT. I was looking in the lines of not changing the native linux stack if its possible. In that case the native stack should have the facility to register callback functions that other modules can make use of.

Waiting for your inputs,

Regards,
Rajeev





Stephen Hemminger wrote:

On Wed, 23 Jun 2004 10:11:20 +0530
Rajeevalochan <rajeevalochan.ramaswamy@wipro.com> wrote:



hi,

I am not sure that this query can be asked in this group. If not, please route me to the respective group.

I am developing a linux kernel module, which needs to get asynchronous notifications whenever there is a change in routing table or interface table or ARP table. At userspace this can be achieved by using netlink sockets. Can anyone suggest me how to achieve the same in kernel modules.



For network devices: register_netdevice_notifier(&mynotifier)

For only IP devices:
	register_inetaddr_notifier(&notifier)

You could also have a kernel thread handling a netlink socket.



-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux