On Wed, Dec 15, 1999 at 02:06:43AM +0200, Muli B.Y. wrote:
> I'm writing a small utility which will discover when I connect/
> disconnect from the net, by watching the net interface (ppp0, eth0,
> etc). Right now I have the source to aprogram called gpppkill which does
> this- however, the sources are inn spanish (not just the (sparse)
> comments... the variable and function names, too).
You can check out the sources of ifconfig to see how it knows about
interfaces that are up. I once did that (for a modem-leds program that
I wrote before I discovered wmppp and later Gnome's applet), and it's
using the SIOCGIFCONF ioctl on a freshly created socket, but check out
the sources anyway for the exact syntax. (I can also send you that
modem leds program.)
--
Alex Shnitman | http://www.debian.org
[EMAIL PROTECTED], [EMAIL PROTECTED] +-----------------------
http://alexsh.hectic.net UIN 188956 PGP key on web page
E1 F2 7B 6C A0 31 80 28 63 B8 02 BA 65 C7 8B BA
The best way to accelerate a Windows NT server is at 9.8 m/s^2.
-- Shaul Rosenzweig
PGP signature