Re: Way to monitor IP address change?...

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

 



On Sun, Apr 13, 2008 at 6:14 PM, Kris van Rens
<krisvanrens.list@xxxxxxxxx> wrote:
> Hi there,
>
>  Is there a way to monitor IP-address changes without using polling? In
>  other words; is there some kind of event mechanism in the Linux kernel
>  with which I could implement this more elegantly?
>
>  From user space I can use all kinds of scripting methods to monitor
>  the IP-address of a certain interface or build a program that
>  constantly polls for IP-addresses.
>
>  I have a network device driver that provides a network interface, and
>  a test application that sends packets to this network interface. But
>  suppose I change the IP-address of this interface; what would be the
>  best way for the test application to monitor/get hold of this change?
>
>  Thanks in advance!
>

Whenever network interface status changes some notifier chain will be
called, you can hook your handler into the proper chain and broadcast
a netlink message to the userspace in the handler. Well, maybe kernel
have already do those stuff for you but I'm not sure, you may double
check the code.

Keywords: "notifier chain", "netlink message".

-Ender

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux