home *** CD-ROM | disk | FTP | other *** search
- /* SLIPStop.rexx ver 1.3 Feb. 3, 1995 by Travis Pascoe */
- /* pasc8891@raven.csrv.uidaho.edu */
- /* */
- /* SLIPStop is an ARexx script used to disconnect from a slip */
- /* session and shutdown AmiTCP. */
- /* This script will disconnect the modem in nearly all cases, but */
- /* it can fail to shutdown AmiTCP if any libraries remain open. */
- /* To avoid this problem, try to manually shutdown as many TCP */
- /* applications as possible before running this script. */
- /* */
- /* Requirements: ARexx (obviously) */
- /* rexxserdev.library ver 5.02+ (see Aminet) */
- /* by Joseph M. Stivaletta */
- /* AmiTCP ver 3.0b+ */
- /* */
- /* Usage: From a cli, type: rx slipstop */
- /* */
- /* Warning: You MAY need to modify the script in several */
- /* places to suit your host dialup settings. */
- /* Follow the comments below for assistance. */
-
- if ~show('L',"rexxsupport.library") then
- if ~addlib('rexxsupport.library', 0, -30, 0) then exit 41
- if ~show('L', "rexxserdev.library") then
- if ~addlib( 'rexxserdev.library', 0, -30, 0) then exit 42
-
- cr = '0d'x
- attenstr = '+++' /* modem attention string */
- hangupstr = 'ATH0'||cr /* hayes modem hangup command */
-
- /* I use cslip, change as desired */
- address command 'offline rhcslip.device 0'
- delay(100)
-
- dh = SerOpen('serial.device', 0)
- check = SerClear(dh)
- /* I use 38400 modem-computer speed, change as desired */
- check = SerSetParms(dh, 38400, 8, N, 1)
-
- say 'SLIP shutdown... '
- delay(100)
- SerWrite(dh, attenstr, length( attenstr))
- delay(100)
- SerWrite(dh, hangupstr, length(hangupstr))
- SerClose(dh)
- address command 'stopnet'
-
- exit 0
-