ftp.nice.ch/peanuts/GeneralData/Documents/communication/UofO_SLIP_configuration.tar.gz#/UofO_SLIP_configuration/config/DEFAULT-SAMPLES/login-annex.tcl

This is login-annex.tcl in view mode; [Download] [Up]

#  TCL script for use with tcldiald.  
#
#  Used to put a Xylogics Annex terminal server into SLIP mode.  This version
#  does not expect any login or password prompts.  If these are present with
#  you terminal server, you can pick up additional arguments from the $args
#  array and use them to specify user name and password.
#
#  $Id: login-annex.tcl,v 4.7 1992/09/05 01:59:47 louie Rel $
#
log "Begin annex login"
#
# set parity of transmitted data
#
parity ZERO
#
#  For auto-baud nonsense.. sometimes its necessary to poke at it a couple of
#  times before it figures out what speed the modem is at.
#
set timeout 2
xmit {\r}
sleep 1
foreach i {once} {
	xmit {\r}
	#
	#  look for annex command prompt
	#
	expect "*annex:*" {break} timeout {}
	xmit {\r}
	expect "*annex:*" {break} timeout {}
	xmit {\r}
	expect "*annex:*" {break} timeout {}
	xmit {\r}
	expect "*annex:*" {break} timeout {}
	error "Couldn't autobaud annex: prompt from annex terminal server"
}
set timeout 10
#
#  send command to put terminal server into SLIP mode
#
xmit "slip\r"
log "Entering SLIP mode"
#
#  Use regular-expression based expect command to match addresses in message
#  that the annex server emits.
#
rexpect {Annex address is ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).+Your address is ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)[^0-9]}
#
#  Rather than just printing this message, you could ifconfig the interface,
#  for example, by using the exec TCL command:
#
#    exec /etc/ifconfig $interface $2 $1
#
log "Annex address is $1, my address should be $2"
#
# wait a bit for server to switch to SLIP mode
#
sleep 1
#
# that's all
return "Connected"

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.