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

How to test for network connection?



[I know I've read this topic on this list before but I can seem to find it 
in the archives.  Sorry.]

How can I test if I have a network connection or not?  I can use ping to 
determine if I am connected to a given server, no problems there.  If I'm 
not connected to *any* server, though, ping just hangs, seemingly 
forever.

I've got a notebook machine with only a single PCCard slot.  Sometimes 
that slot contains a NIC and sometimes a modem card.  This means I can't 
even rely on there being a network interface at boot time, let alone an 
interface that is connected to anything.  I would like to run certain 
programs if a network connection is present at bootup, but so far haven't 
found a reliable way to test for that condition.

So... how can I determine whether or not I have a network connection?

Thanks.





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