TCP for the unix-pc

Scott S. Bertilson sheldon at quest.UUCP
Thu Apr 13 13:29:16 AEST 1989


I made one change which has yielded a significant improvement to the
(crusty?) copy (version.c says 871225.3) I've been playing with.
Here's a patch:

*** orig/slip.c	Mon Jan 11 23:54:26 1988
--- slip.c	Wed Apr 12 22:20:13 1989
***************
*** 234,240
  doslip(interface)
  struct interface *interface;
  {
! 	char c;
  	struct mbuf *bp;
  	int16 dev;
  	int16 asy_recv();

--- 234,242 -----
  doslip(interface)
  struct interface *interface;
  {
! 	char buf[256];
! 	register char *cp;
! 	register int cnt;
  	struct mbuf *bp;
  	int16 dev;
  	int16 asy_recv();
***************
*** 241,249
  
  	dev = interface->dev;
  	/* Process any pending input */
! 	while(asy_recv(dev,&c,1) != 0)
! 		if((bp = slip_decode(dev,c)) != NULLBUF)
! 			(*slip[dev].recv)(interface,bp);
  
  	/* Kick the transmitter if it's idle */
  	if(stxrdy(dev))

--- 243,253 -----
  
  	dev = interface->dev;
  	/* Process any pending input */
! 	while((cnt = asy_recv(dev,cp = &buf[0],sizeof(buf))) != 0) {
! 		while (cnt-- > 0)
! 			if((bp = slip_decode(dev,*cp++)) != NULLBUF)
! 				(*slip[dev].recv)(interface,bp);
! 	}
  
  	/* Kick the transmitter if it's idle */
  	if(stxrdy(dev))
-- 

Scott S. Bertilson   ...uunet!rosevax!rose3!quest!sheldon
			scott at poincare.geom.umn.edu



More information about the Unix-pc.general mailing list