On Tue, Dec 21, 1999 at 04:17:17PM +0200, Muli B.Y. wrote:

> Thanks for the suggestions, Nimrod, I have implemented the
> online/offline thing this way. Shame on me for not having read the FAQ
> (where this stuff is mentioned) for quite some time. 

> Nevertheless, it was a good excersize and my original question stands:
> Windows has RasConnectionNotification(). What does linux have except
> constant polling?

Guessing that RasConnectionNotification() somehow lets you know when a new
interface (or such) is available, without busy-looping -

I found this question annoying too, so I went and dug a bit in the kernel,
and I suspect it can be done using the rtnetlink mechanism (check RTNETLINK
in Configure.help). I don't know how recent this is, but it is available
in at least 2.2.12, which I'm currently running here.

Browsing the kernel sources lightly (I found no other documentation on this
locally, and I'm not currently on-line to look harder), it appears that
IFF_UP messages (sent when a device is being activated) are advertised
through the rtnetlink mechanism. I don't have rtnetlink support compiled
into my kernel, and don't have the disk-space (nor the time) to recompile it
right now, so I'm not further investigating. But it looks promising.

If you feel like giving this a try and letting us (or at least me) know - it
would be interesting.

(Note that I find the other approach presented here, that of doing the
notification in the 'connected' hook of pppd, not quite satisfactory. There
are many ways to up a link, and the logic to decide what links should be
used by some application should live in said application, and not in some
external script - at least in my opinion).

                                                   Nimrod

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to