Re: InternetCheckConnection

2000-07-27 Thread Francois Gouget
On Wed, 26 Jul 2000, Marcus Meissner wrote: > On Tue, Jul 25, 2000 at 10:14:25AM -0500, Aric Stewart wrote: [...] > How to check network connections: > > Parse output of: > /sbin/ifconfig - for occurences of ppp*, eth* or similar. > - for occurences of non 127.* addr

Re: InternetCheckConnection

2000-07-26 Thread David Elliott
Alexandre Julliard wrote: > Aric Stewart <[EMAIL PROTECTED]> writes: > > > However the API seems to lend itself to not only checking a generic > > internet connection but also checking conductivity to a specific host. > > For this a ping sort of approach seems appropriate. I will work at > > taki

Re: InternetCheckConnection

2000-07-26 Thread Alexandre Julliard
Aric Stewart <[EMAIL PROTECTED]> writes: > However the API seems to lend itself to not only checking a generic > internet connection but also checking conductivity to a specific host. > For this a ping sort of approach seems appropriate. I will work at > taking out the www.ibm.net for a null para

Re: InternetCheckConnection

2000-07-26 Thread Aric Stewart
This sounds like a great idea for generic checking for a network connection. However the API seems to lend itself to not only checking a generic internet connection but also checking conductivity to a specific host. For this a ping sort of approach seems appropriate. I will work at taking out the

Re: InternetCheckConnection

2000-07-26 Thread Andreas Mohr
On Wed, Jul 26, 2000 at 04:31:38PM +0200, Bertho Stultiens wrote: > Try: > $ netstat -r -n > > This should give the routing tables as well. Netstat can be used on > solaris too afaik. Only to complete the picture: rshx11:~> uname -a HP-UX rshx11 B.10.20 A 9000/715 2013100679 two-user license rsh

Re: InternetCheckConnection

2000-07-26 Thread Marcus Meissner
On Wed, Jul 26, 2000 at 04:16:32PM +0200, Gerald Pfeifer wrote: > On Wed, 26 Jul 2000, David Elliott wrote: > >> gomeisa[53]:~% /sbin/route -n ; uname -rs > >> /sbin/route: Command not found. > >> SunOS 5.6 > > Okay, that's odd. Where do they hide the route command > > In /usr/sbin. However

Re: InternetCheckConnection

2000-07-26 Thread Gerald Pfeifer
On Wed, 26 Jul 2000, Bertho Stultiens wrote: > Try: > $ netstat -r -n > > This should give the routing tables as well. Netstat can be used on > solaris too afaik. Looks good! Solaris: Routing Table: Destination Gateway Flags Ref Use Interface --

RE: InternetCheckConnection

2000-07-26 Thread Patrik Stridvall
> Try: > $ netstat -r -n > > This should give the routing tables as well. Netstat can be used on > solaris too afaik. Yes, works for me (even as normal user).

RE: InternetCheckConnection

2000-07-26 Thread Patrik Stridvall
> > > Can I assume that the grep part should work on any self > > > respecting UNIX ? > > > > Only if the user have sufficent permissions which, > > as I said, is not the case on Solaris. > > Well, there is an easy solution to that problem. > > First, try to use route because it will tell you if

Re: InternetCheckConnection

2000-07-26 Thread Bertho Stultiens
Gerald Pfeifer wrote: [snip] > Sorry, not all the world is Linux: > > gomeisa[53]:~% /sbin/route -n ; uname -rs > /sbin/route: Command not found. > SunOS 5.6 > > taygeta[44]:~% /sbin/route -n ; uname -rs > usage: route [-dnqtv] command [[modifiers] args] > FreeBSD 4.0-RELEASE Try: $

Re: InternetCheckConnection

2000-07-26 Thread David Elliott
Patrik Stridvall wrote: > > > gomeisa[53]:~% /sbin/route -n ; uname -rs > > > /sbin/route: Command not found. > > > SunOS 5.6 > > > > > > > Okay, that's odd. Where do they hide the route command > > In /usr/sbin/route. However route fails, since only root > the sufficent permission to do th

Re: InternetCheckConnection

2000-07-26 Thread Gerald Pfeifer
On Wed, 26 Jul 2000, David Elliott wrote: >> gomeisa[53]:~% /sbin/route -n ; uname -rs >> /sbin/route: Command not found. >> SunOS 5.6 > Okay, that's odd. Where do they hide the route command In /usr/sbin. However, it has to be executed by root, due to security precautions: gomeisa[61]:~

RE: InternetCheckConnection

2000-07-26 Thread Patrik Stridvall
> > gomeisa[53]:~% /sbin/route -n ; uname -rs > > /sbin/route: Command not found. > > SunOS 5.6 > > > > Okay, that's odd. Where do they hide the route command In /usr/sbin/route. However route fails, since only root the sufficent permission to do this on Solaris. > A configure test of the

Re: InternetCheckConnection

2000-07-26 Thread David Elliott
Gerald Pfeifer wrote: > On Wed, 26 Jul 2000, David Elliott wrote: > > Easy in bash: > > if /sbin/route -n | grep "^0.0.0.0" > > then > > echo "Nothin' but 'net" > > else > > echo "Please connect to the 'net" > > fi > > Sorry, not all the world is Linux: > Yes, that is correct > > gome

Re: InternetCheckConnection

2000-07-26 Thread Gerald Pfeifer
On Wed, 26 Jul 2000, David Elliott wrote: > Easy in bash: > if /sbin/route -n | grep "^0.0.0.0" > then > echo "Nothin' but 'net" > else > echo "Please connect to the 'net" > fi Sorry, not all the world is Linux: gomeisa[53]:~% /sbin/route -n ; uname -rs /sbin/route: Command not found

Re: InternetCheckConnection

2000-07-26 Thread David Elliott
Marcus Meissner wrote: > On Tue, Jul 25, 2000 at 10:14:25AM -0500, Aric Stewart wrote: > > This implements InternetCheckConnection. Because i cannot do it properly > > i had to use a kludge where i call ping via a system call. Explanation > > as well as the way i wanted to to the ping are in the

RE: InternetCheckConnection

2000-07-26 Thread Stephane Lussier
> -Original Message- > From: Marcus Meissner [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 26, 2000 6:01 AM > To: Aric Stewart > Cc: [EMAIL PROTECTED] > Subject: Re: InternetCheckConnection > > > On Tue, Jul 25, 2000 at 10:14:25AM -0500, Aric Stewart

Re: InternetCheckConnection

2000-07-26 Thread Andreas Mohr
On Wed, Jul 26, 2000 at 12:00:43PM +0200, Marcus Meissner wrote: > On Tue, Jul 25, 2000 at 10:14:25AM -0500, Aric Stewart wrote: > > This implements InternetCheckConnection. Because i cannot do it properly > > i had to use a kludge where i call ping via a system call. Explanation > > as well as th