public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Network link detection
@ 2011-03-03 19:30 Nico Schümann
  2011-03-03 20:03 ` Jesper Juhl
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nico Schümann @ 2011-03-03 19:30 UTC (permalink / raw)
  To: linux-kernel

Dear kernel developers,

currently I'm looking for a way to find out whether a network link went 
down or up. Of course there is mii-tool, which can watch devices, too.

So for now, I created a small program that polls the MII_LINK_OK
flag with the SIOCGMIIREG ioctl - the same thing that mii-tools does. 
But polling that often for a link change that occurs maybe once in a 
month sounds like waste of energy.

Unfortunately, I was not able to find out a way to be notified about 
link status changes asynchronously. Is there a way? I'm looking for 
something like "inotify for link states".

There are some debug outputs as in drivers/net/natsemi.c:1672
                        printk(KERN_NOTICE "%s: link up.\n", dev->name);
so it would be quite easy to insert a notification.

If there is no way yet to get these notifications asynchronosly, would 
there be real use for it or am I just missing something?

Thanks,

Nico

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-07 19:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-03 19:30 Network link detection Nico Schümann
2011-03-03 20:03 ` Jesper Juhl
2011-03-03 20:45   ` richard -rw- weinberger
2011-03-03 21:38 ` Chris Friesen
2011-03-03 22:01   ` David Miller
2011-03-03 22:29     ` Nico Schümann
2011-03-07 19:49       ` Dan Williams
2011-03-03 23:54     ` Chris Friesen
2011-03-03 22:07 ` Stephen Hemminger
2011-03-04  6:35   ` Nico Schümann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox