Article View: comp.sys.amiga.networking
Article #414Re: How do I know if I'm connected?
From: Mike Meyer
Date: Sat, 05 Aug 1995 06:09
Date: Sat, 05 Aug 1995 06:09
31 lines
1888 bytes
1888 bytes
In <19950731.7BAD3D0.135B9@ccubb.com>, devans@ccubb.com (David Evans) wrote: > The problem is determining if the AmiTCP protocol is up and running. Not if a > given IP address exists or is reachable. I haven't been paying carefull attention, so the definition of "connected" may not agree with this, but for the one I normally use, AmiTCP up and running is necessary, but not sufficient. I've never tried to check AmiTCP being up and running. I had 7x24 SLIP (when I had SLIP), and would insure that it was running before leaving it. If you need to do that, possibly you could use the version command on bsdsocket.library, and check the return code. If that's > 0, then the library doesn't exist, so AmiTCP isn't up. (at least, that's the theory; anyone know for sure?). Step two is to see if that network link is configured. You use ifconfig and check the return code (this I've done!). I.e.: 'amitcp:bin/ifconfig cslip0 | grep UP >nil:' if rc = 0 then exit in a Rexx script. rc = 0 means the line is configured and up. You need to set the modem to drop carrier if the other end goes away, and the slip line to shut itself down if carrier vanishes. Once the system is up, if you ever lose connectivity it will appear to be down. I also used a short C program to check the state of CD on a reboot. If it was off, I ran the script to dial my provider, otherwise skip that step. Worked great. <mike
Technical Details
Message-ID:
<19950804.761FED0.13E6C@contessa.phone.net>Path:
arc1-ca.pugleaf.net!news.zeitgeist.net!usenetReferences:
<19950731.7BAD3D0.135B9@ccubb.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.zeitgeist.net!usenet From: mwm@contessa.phone.net (Mike Meyer) Newsgroups: comp.sys.amiga.networking Subject: Re: How do I know if I'm connected? Date: Fri, 4 Aug 95 22:09:35 PST Organization: Missionaria Phonibalonica Distribution: world Message-ID: <19950804.761FED0.13E6C@contessa.phone.net> References: <19950731.7BAD3D0.135B9@ccubb.com> NNTP-Posting-Host: 140.174.197.1 X-NewsReader: Amiga Yarn 3.9, 1995/05/09 10:42:03