From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CSD4.MILW.WISC.EDU::MOOCOW!BRODIE" 19-JUL-1989 02:12
To:	MRGATE::"ARISIA::EVERHART"
Subj:	LAT port reverse-allocation:  temporary fix

Received: from rutgers.edu by DRYCAS.CLUB.CC.CMU.EDU; Wed, 19 Jul 89 01:59 EDT
Received: from uwvax.UUCP by rutgers.edu (5.59/SMI4.0/RU1.1/3.04) with UUCP id
 AA23029; Tue, 18 Jul 89 21:36:24 EDT
Received: from uwm-cs.UUCP by spool.cs.wisc.edu; Tue, 18 Jul 89 17:44:24 -0500
Received: by uwm-cs.milw.wisc.EDU; id AA05738; Fri, 14 Jul 89 15:15:47 CDT
Received: by csd4.milw.wisc.edu; id AA27193; Fri, 14 Jul 89 15:15:25 -0500
Received: by moocow.UUCP (DECUS UUCP w/Smail); Fri, 14 Jul 89 14:55:40 CDT
Date: Fri, 14 Jul 89 14:55:40 CDT
From: "Kent C. Brodie" <moocow!brodie@CSD4.MILW.WISC.EDU>
Subject: LAT port reverse-allocation:  temporary fix
To: vmsnet@DRYCAS.CLUB.CC.CMU.EDU
Message-Id: <8907142015.AA27193@csd4.milw.wisc.edu>
X-Vms-Mail-To: UUCP%"vmsnet@DRYCAS.CLUB.CC.CMU.EDU"

One of the problems with using DIALIN/DIALOUT modems on LAT ports 
(i.e., a DECserver) is that uucico (and most OTHER stuff, including
vms's SET HOST facility) has no idea that the port is REALLY in use,
and when uucico tries to USE that port (which is busy with an incoming
call), uucico hangs.  Bah.  I have given Jamie some example code to
get this rolling, and I'm sure we'd all love to eventually see that
work!  (he, however, is somewhat at a loss to do it easily, as he
has no LAT ports himself..).

ANYWAY.  What I've come up with here is a simple (although somewhat
crude) solution that is meant to be a TEMPORARY fix until such time
that uucico can handle lat ports properly.    What this DCL code
does, is this.

1) Am I a dialup user?   If not, then skip the rest.

2) OK, I'm a dialup user.  Find out what LAT port I'm using.
                           (server name/port number)

3) Now that I know the port name, compare it with a known list
   of "modem" ports, and ALLOCATE the proper "outgoing" LAT device.

This should work just dandy, as when uucico NOW goes through it's
port list (to call out), it will see that "LTA25:" (for example) is ALLOCATED
to a user, so it can go try another port.

Note:  This mechanism ONLY works under VMS V5.0, (and up) because
the f$getdvi(terminalname,"TT_ACCPORNAM") lexical function is new
to V5.0.   Before 5.0, you're SOL.    As I said, it's crude, but it
WORKS.



$! dialup_allocate.com
$! This should go in SYS$MANAGER:SYLOGIN.COM.   Note that for MOST
$! (i.e., in-house) users, the IF statement does NOT get executed.
$!----------------------------------------------------------
$ terminal = f$getjpi("","TERMINAL")
$ portname = f$getdvi("''terminal'","TT_ACCPORNAM")
$ dialup = f$getdvi("''terminal'","TT_DIALUP")
$ if (dialup) 
$  then
$  if (portname .eqs. "AMANDA/PORT_5") then allocate LTA20:
$  if (portname .eqs. "MUDD/PORT_1") then allocate LTA21:
$  if (portname .eqs. "MUDD/PORT_2") then allocate LTA22:
$  if (portname .eqs. "MUDD/PORT_3") then allocate LTA23:
$  if (portname .eqs. "MUDD/PORT_4") then allocate LTA24:
$  if (portname .eqs. "KHAN/PORT_7") then allocate LTA25:
$  endif
$!
$!  end of dialup_allocate.com



Obviously, the section of multiple "IF" statements should properly
reflect the SERVER/PORT names and LTAxx: ports as you have them
configured.

--
Kent C. Brodie	Systems Manager at Large - Medical College of WI
UUCP:		{uunet!marque,csd4.milw.wisc.edu}!moocow!brodie  
MA BELL:	+1 414 778-4056 (or 414-257-8769)    
"......AGAIN?!  but that trick NEVER works...."  -Rocket J. Squirrel
