Detecting if I am connected to a ISP

Hi, I have written a small mail pre-viewer in Ruby/FXRuby which allows a
graphic view of incoming mail headers, from
which I can select canditates for deletion before loading,
I an using POP, however I cannot see any way to detect that the user
has actually connected to their ISP before running
the program, natually I recieve a 'system error.

I wrote a Ruby script that connected to my ISP a while ago. To test if I
was connected I would run ifconfig and then parse the first line
returned and look for ‘ppp’ (the name of the connection). This is a bit
hackish and I’m pretty sure there is a better way to do it.

Farrel

···


Data Network Architecture Research Lab mailto:flifson@cs.uct.ac.za
Dept. of Computer Science http://people.cs.uct.ac.za/~flifson
University of Cape Town +27-21-650-3127