Installing this code in your kernel
-----------------------------------

These are some (sketchy) notes on installation.  They apply to 4.xBSD
and Sun OS 3.x but *not* Sun OS 4.

(0) Preliminaries:

    (a) If you don't have the network code from the 4.3-tahoe bsd release,
        get and install it -- Earlier TCP's are almost unusable over serial
	lines because of problems with timeouts and buffer overflow.
	(The code is available for anonymous ftp from ucbarpa.berkeley.edu,
	files pub/4.3/tcp.tar and inet.tar.)

     (b) On the dialup client side (i.e., your machine at home), you will
	 find that interactive response will be much better and there
	 will be far fewer timeouts if you *reduce* the default TCP
	 buffer sizes:  In tcp_usrreq.c, change tcp_sendspace and
	 tcp_recvspace from 4*1024 to 4*256 (or you can adb your
	 kernel later and change these from 4096 to 1024).  *DON'T*
	 do this on your gateway machine though -- performance would
	 suddenly get very, very poor.

     (c) On all machines, it's a good idea to make the retransmit timer
	 more conservative.  In netinet/tcp_input.c, change all the
	 lines:
		TCPT_RANGESET(tp->t_rxtcur,
                              ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1,
                              ...
	 to:
		TCPT_RANGESET(tp->t_rxtcur,
			      (tp->t_srtt >> 3) + tp->t_rttvar,
			      ...
	
(1) copy if_sl.c, if_slvar.h, slcompress.[ch] from this directory to
    /sys/net.

(2) edit /sys/conf/files and add the lines:
	net/if_sl.c             optional sl
	net/slcompress.c        optional sl
    (If you're running slip already, or running 4.3bsd, the net/if_sl...
    line should already be there).

(3) If you're running Sun OS 3.x or 4.2bsd and haven't installed slip
    before, add the slip line discipline to /sys/sys/tty_conf.c.  (See
    the patch at the end of this file.)

(4) Add a 
	pseudo-device 	slN
    line to your kernel config file.  'N' should be the number of
    slip lines your plan to run.  E.g., "sl2" lets you run slip on
    two serial lines simultaneously.  For Sun OS 3, use the line:
	pseudo-device 	slN init slattach

(5) There are four config file options that set defaults for the slip driver:
	SL_DOCOMPRESS		Lines will compress tcp packets by default.
				(If this option is not set, compression
				won't be done and all packets will be
				compatible with RFC-1055.)  Normally, this
				option is set on your machine at home.
	SL_ALLOWCOMPRESS	Lines will default to "auto-enable compression"
				(see appendix B.2 in the RFC).  Typically
				you set this on the server that's you're
				gateway to the Internet.
	SL_NO_STATS		Disables various statistics in the driver
				(not a good idea).
	SL_NIT			On a Sun under Sun OS 3, will pass incoming
				and outgoing packets to NIT so you can
				look at them with etherfind or tcpdump.
    You shouldn't need to use any of these -- it's probably a better
    idea to set the options explicitly when you "slattach" the line.

(6) Config and build a new kernel.

(7) Built and install slattach (it usually goes in /etc) and slstats
    (debugging a broken kernel might be easier if it's in /etc but
    it can go anywhere).

(8) Boot up the new kernel, slattach a slip line and see if it works.

----------------------------

diff -c -r1.1 tty_conf.c
*** /tmp/,RCSt1a14865   Sun Dec 31 10:04:53 1989
--- tty_conf.c  Fri Oct 20 23:40:18 1989
***************
*** 32,37 ****
--- 32,42 ----
  int   kbdopen(), kbdclose(), kbdread(), kbdioctl(), kbdinput();
  #endif
  
+ #include "sl.h"
+ #if NSL > 0
+ int   slopen(), slinput(), sltioctl(), slclose(), slstart();
+ #endif
+ 
  struct        linesw linesw[] =
  {
        ttyopen, nodev, ttread, ttwrite, nullioctl,
***************
*** 69,74 ****
--- 74,86 ----
  #if NKB > 0
        kbdopen, kbdclose, kbdread, ttwrite, kbdioctl,
        kbdinput, nodev, nulldev, ttstart, nulldev,             /* 6 */
+ #else
+       nodev, nodev, nodev, nodev, nodev,
+       nodev, nodev, nodev, nodev, nodev,
+ #endif
+ #if NSL > 0
+       slopen, slclose, nodev, nodev, sltioctl,
+       slinput, nodev, nulldev, slstart, nulldev,              /* 7 */
  #else
        nodev, nodev, nodev, nodev, nodev,
        nodev, nodev, nodev, nodev, nodev,
