[comp.sys.encore] tcp support on Umax uucp

wtm@buengc.BU.EDU (W. Thomas Meier) (04/11/89)

 Is there any chance that Encore will support TCP any time soon on 
 its implementation of UUCP?

 Thanks,
 Tom Meier
 Boston University Info. Tech.

loverso@Xylogics.COM (John Robert LoVerso) (04/11/89)

In article <2491@buengc.BU.EDU> wtm@buengc.BU.EDU (W. Thomas Meier) writes:
>  Is there any chance that Encore will support TCP any time soon on 
>  its implementation of UUCP?

You should probably see it in UMAX4.2 R4.0 (although it might be called
UMAX-BSD or UMAX-4.3 by then), which I'm told will be mostly 4.3-Tahoe
on the user level ('cept for sendmail & bind, which are to from original
("classic") 4.3 8-{ ).

But, there's no need to wait for Encore.  4.3 or 4.3-Tahoe UUCP will
work almost directly off the distribution tape.  *And* you get to have
source 8-}.

Here are the changes I needed to get it working:

- Umax4.2 R3_2.1 has a kernel bug that forces the granularity of the select
  timeout to be at least 1 second.  This will result in abysmal input
  performance because UUCP uses select for a sub-second pause to let
  input data buffer up in the tty driver (so that less read syscalls
  get used).  Since the interval timer *does* work, the fix is a simple
  change to the packet driver, as below.  This bug is fixed in R3_3,
  I'm told.

*** pk1.c_orig	Tue Apr  5 14:08:41 1988
--- pk1.c	Wed Mar 22 10:16:48 1989
***************
*** 387,393 ****
--- 387,406 ----
  				tv.tv_usec = r % 1000000L;
  				DEBUG(11, "PKCGET stall for %d", tv.tv_sec);
  				DEBUG(11, ".%06d sec\n", tv.tv_usec);
+ #define BROKEN_SELECT
+ #ifdef BROKEN_SELECT
+ /*
+  * workaround to broken select() in UMAX4.2 R3_2
+  */
+ {
+ 	struct itimerval itv;
+ 	timerclear(&itv.it_value);
+ 	itv.it_interval = tv;
+ 	(void) setitimer(ITIMER_REAL, &itv, (int *)0);
+ }
+ #else
  				(void) select (0, (int *)0, (int *)0, (int *)0, &tv);
+ #endif
  			}
  		}

- Umax4.2 has time_t typedef'd as a "u_int".  This plays havoc with a number
  of things, uusnap especially, since it wants to display the retry timeout
  and does so by subtracking time_t's.  At first I thought that uusnap was
  wrong, but I saw that POSIX has "-1" defined as an error return to a
  function returning "time_t", so I can only assume that time_t should really
  be a "long", ala BSD, et al.  This patch just corrects uusnap so that it
  gives sensible output when compiled on UMAX4.2.

*** uusnap.c_orig	Tue Apr  5 14:26:16 1988
--- uusnap.c	Fri Mar 24 12:24:15 1989
***************
*** 52,54 ****
  	register int i, j, nlen = 0;
! 	time_t	curtime, t;
  
--- 52,55 ----
  	register int i, j, nlen = 0;
! 	time_t	curtime;
! 	long t;
  
***************
*** 63,65 ****
  	for(i=0; i<sndx; ++i) {
! 		t = (sys[i].st_lastime +sys[i].st_retry) - curtime;
  
--- 64,66 ----
  	for(i=0; i<sndx; ++i) {
! 		t = (long)(sys[i].st_lastime +sys[i].st_retry) - (long)curtime;
  
***************
*** 102,104 ****
  		}
! 		t = (sys[i].st_lastime +sys[i].st_retry) - curtime;
  		if (-t < ONEDAY*2 && sys[i].st_type != SS_FAIL)
--- 103,105 ----
  		}
! 		t = (long)(sys[i].st_lastime +sys[i].st_retry) - (long)curtime;
  		if (-t < ONEDAY*2 && sys[i].st_type != SS_FAIL)
***************
*** 109,111 ****
  		else if (-t >= ONEDAY*2)
! 			printf("%ld days ago", (long)-t/ONEDAY);
  		else if (t <= 0)
--- 110,112 ----
  		else if (-t >= ONEDAY*2)
! 			printf("%ld days ago", -t/ONEDAY);
  		else if (t <= 0)

- in tio.c (on 4.3tahoe uucp), <machine/machparam.h> is included.  This isn't
  available under UMAX; nor is it needed (as it turns out).  (comment out
  the line).

- for UUCP/TCP, you can compile uucpd STANDALONE since UMAX R3.2 doesn't
  have inetd.  But, since you've already used 4.3 UUCP, you can just compile
  and install inetd.  I first did this almost two years ago.

BTW, I use this UUCP on our Multimax with two trailblazers, one via rtelnet and
one via RDP.

-- 
John Robert LoVerso			Xylogics, Inc.  617/272-8140
loverso%Xylogics.COM@Encore.COM		Annex Terminal Server Development Group
encore!xylogics!loverso			[formerly of Encore Computer Corp]