
		Installation and Release Notes for NET-2

		     Version: 0.99.14t NET-2 Rev.E

				BETA===4

		     Sun, 22 Jan 23:30:00 1994 MET


	    Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
	      Johannes Stille, <johannes@titan.os.open.de>
	      Matthew Dillon, <dillon@apollo.west.oic.com>
	  Fred Baumgarten, <dc6iq@insu1.etec.uni-kalrsruhe.de>
		Alan Cox, <iiitac@pyramid.swansea.ac.uk>
		  Terry Dawson, <terry@vk2ktj.ampr.org>


PREFACE
This document describes what yet has to be done in NET-2, how to install
it, and more of that stuff.  The current NET-2e distribution is a joint
effort mainly by the people mentioned in the header.  A lot of good stuff
also comes from (in no particular order) Fred Baumgarten, Alan Cox and
Florian La Roche.  The distribution is mastered by me (Fred.)


COPYRIGHTS and POLICIES

Although this code can be distributed as per GNU Public License, version
2, some notes still do apply:

- The original NET(-1) code for Linux was written by Ross Biro. Al-
  though far from perfect, we should thank him for donating the code
  to the public, as it took Linux out of the "toy" era.

- Many of the internal definitions and such were borrowed from the
  Berkeley UNIX 4.3BSD operating system header files.  This was *NOT*
  done to rip them off, but a way to ensure compatibility with that
  operating system, as it has become the defacto standard for network
  interfaces to UNIX-like kernels.

- Some of the definitions found in and used by the AX.25 layer (which
  is not yet distributed with the mainline of NET-2e code) were taken
  from the "KA9Q NOS Internet Package", written and copyrighted by
  Phil Karn KA9Q and a lot of others.  I did this for the same reason
  as above, and was careful *NOT* to use any *code* or data structures
  from the KA9Q package - just value definitions.

- The "Van Jacobsen" SLIP header compression code was taken from the
  "reference implementation" as found in the Berkeley UNIX 4.3BSD
  operating system sources.  From there it was ported to the KA9Q
  package, which implementation was again ported and enhanced by
  Chuck Hedrick of Rutgers University.  See the COPYRIGHT file in
  the net/drv/slip directory for details.

- The "BECKER" series of ethernet device drivers were written by
  Donald J. Becker from the Supercomputing Research Center (SRC);
  this code is copyrighted by and licensed from SRC. See the
  COPYRIGHT file in the net/drv/becker directory for details.

- The remainder of the code was mostly written by me, with a lot
  of other people contributing fixes, additions and moral support.
  Most of us are gathered together (well, sometimes that is :-) on
  the NET Channel of the Linux-Activists mailing list.  Their names
  can be found in the 'PREFACE' section above, and in the headers
  of the various source files.  Thanks, All!!!



INSTALLATION NOTES - Ten Steps To Happiness

You'd better read these instructions before installing the NET-2e
software on your machine.  I will basically ignore you if you come
up with complaints caused by not reading this...


Step 1	Unpacking.
	Create a source directory called /usr/src/linux, and unpack
	the standard kernel source there.  The NET-2e patches are
	now based on the 0.99.14 ALPHA-t kernel source.

Step 2	Preparing.
	Remove the complete "net" and "drivers/net" subtrees of the
	kernel sources, plus the "net" entry from "drivers/Makefile".
	Yes, really.  Trust me, I know what I am doing... <GRIN>
	Remove the /usr/include/linux/{net.h, icmp.h, tcp.h and
	udp.h} include files, as they are unused now...

Step 3	Patching.
	If you are using a patch file (only the main NET-2 developers
	get complete kernels), apply it with:
	
		cd /usr/src
		patch -p0 <patch_file

	and check the results.  Remove any '.orig' files.  Beware of
	any ".rej" files!!!!!!

Step 4	Configuration of Features.
	Check the "net/inet/inet.h" file for the "NET feature selection"
	section, and select the desired options.  Usually, this means:

		IP_HAVE_GW	1	/* enable IP gatewaying		*/
		IP_GW_SAME	1	/* see comment in ip_forward()	*/
		IP_HAVE_OPTS	0	/* enable IP option processing	*/
		SK_BSD_BUG	0	/* emulate BSD 'ftp' bug	*/
		ICMP_PINGBC     0	/* reply to broadcast ECHO rq's */
		TCP_DELAY_ACK	0	/* default TCP "ack" beheviour	*/

	Also: always *use* a kernel that had NETDBG (see below) #undef'ed,
	as it takes a lot of CPU time to process all them debugging calls.
	Make sure you have an identically configured kernel around, which
	has this option enabled.  Software authors like to get a nice set
	of "trace output" dumps when bug reports come in...

	If you want ICMP to respond to broadcast addresses (which I
	personally don't think is wise, so I disabled it by default)
	set the ICMP_PINGBC macro to `1' rather than the default '0'.

	The TCP "ack" behaviour is a weird thing.  Some systems like
	to delay sending ACK packets for a while, so if the sender is
	sending data reasonably fast, it can "piggyback" the ACK info
	on it.  However, this *can* cause slowness too (which I do
	expercience on my network), so I left it a compile-time option.
	Note that many MS-DOS based TCP/IP stacks need this feature to
	prevent randon TCP lockups from happening.

Step 5	Configuring The Drivers.
	Check the definitions in "net/Space.c", which set up the
	various TCP/IP networking device drivers.  Note that this only
	concerns I/O values and such, not the actual selection of the
	drivers.  That is done at the top level "make config".

Step 6	Sex !
	Check the contents of your /usr/include/endian.h file.  If it
	is one of the older versions (a very small file), you have to
	add a line reading:
	--------
	#define __BYTE_ORDER 1234
	--------
	to it, otherwise the kernel will not work.  Better is to upgrade
	your library and header files to a newer one (I use 4.4.4) first.

Step 7	Making The Kernel.
	Make config && depend:

		# cd /usr/src/linux
		# make mrproper
		# make config
		# make depend
		# make 

	This should leave you with a NET-2e Linux kernel.  Before
	rebooting, you will also have to unpack, compile and install the
	NET-2e base utilities (ifconfig and such) on your system first.

Step 8	The Utilities.
	Unpack the "net-0.32.tar.gz" file in some directory, and
	type "make install".  This will check your NET-2e setup (and, if
	needed, create some dummy header files which are not yet part of
	the LIBC release right now), and then compile the commands.

	After the compile, it will copy the commands to the correct
	directories, and (NOTE THIS !!!) INSTALL THE DEVICE ENTRIES
	IN /DEV !!!!

	I get many messages a week, telling me that "ifconfig" says
	it cannot open some file called /dev/net/socket.  This is
	correct, but you should have typed "make install". So, it
	is your own fault :-)

Step 9	Check...
	Make sure your new configuration files are changed for the
	new syntax of the NET-2e system.  This only applies if you
	are upgrading from a standard kernel.

Step 10	BOOM!
	Hit the button.


EXPECTED

The next release (BETA-5) will have even more of the new drivers by
Don Becker, and probably the expercimental PPP driver as well.  Also,
it is expected that Alan Cox' IPX layer will be ported by then.


QUESTIONS, BUG REPORTS

If you experience problems, first take a *GOOD* look at your setup,
and make sure it is correct.  If that seems OK, check out the NET-2
HOWTO, which should be included with the net-0.30 sources.  If the
answer is not there (which is possible, since the HOWTO does not
fully describe the NET-2e system), send a message to the NET channel
of the Linux-Activists mailing list:

	linux-activists@niksula.hut.fi

with the line 'X-Mn-Key: NET' as the first line of your message.
Make sure you include the kernel version info, NET-2 and base utils
version info, and (if available) output from the "ifconfig -a",
"arp -a" and "route -n" commands.

Contact Terry Dawson (vk2ktj@vk2ktj.ampr.org) if you found or got
an answer to your question, so he can update the HOWTO with your
info.



FAN MAIL

If after using this software you still feel the need to contact me,
please do so.  However, note that:

- bomb letters and flames give me headaches, so I hired a Personal
  GhostWriter to handle those.  He is known for his very agressive
  replies, so be warned in advance...

- the Dutch PTT is not one of the cheapest ones around (actually, it
  is the only one around here, so we don't have a choice...), and it
  it the only way for me to keep in touch with The World.  All this
  means that I have to pay a damn lot of money to get my mail, answer
  it and even for testing out the new software and uploading it to
  the various sites.  If you want to help me pay my phone bills, I
  would appreciate it.  But *PLEASE* do *NOT* send me dollar bills
  or other cash money, as I cannot guarantee their safe arrival. The
  best thing to do is to either contact me first, or (if you live
  in the United States of America) contact Russ Nelson of Crynwr
  Software (nelson@crynwr.com) or Dr. Michael Stokes of the Miss.
  State University (stokes@erc.msstate.edu) on a HOWTO.  Sending
  your dollarbill to their US mail address is safer than sending it
  to my home address, really....

  I might consider making the next release of NET-2 "shareware" :-)

- if you have any ideas for making the NET-2e code better, or want
  to write a piece of code for it: great!  Email, call or visit me!



KNOWN BUGS

Several known bugs remain:

- No IP Option Processing yet.

- No packets larger than approx. 3900 bytes.  This mostly concerns NFS
  operation using the UDP protocol.

  Work is underways to get this (and the "Option Processing") problem
  out of the way, so do not despair...

- TCP Urgent Data (rlogin !) still seems to be broken.  It works for me,
  but that doesn't mean it will always work for everyone...  Alan just
  sent me a note telling that he might have found what causes this..


TODO according to NET-2Debugged:

-	destroy_sock can still destroy a wait queue before processes remove
	themselves from it causing memory corruption or crashes in the
	scheduler. You can't just wake_up() and free the wait queue or risk
	the wait queue being freed until empty because processes remove 
	themselves from it when they next run! (semi *)
-	sock_destroy can be called by a timer. If this happens as getsock()
	scans the list - or as the socket is returned by getsock() then you
	lose messily. sock_destroy can only be done by a timer if inet_bh
	(sorry net_bh) is not currently running. I lock all things out for
	this which is OTT but works.
-	The memcpy_to/fromfs paging races with MSG_PEEK are still present
	(but Fred knows about this)

MODIFICATIONS LOG

- This release of the NET-2 software has been totally re-organized as a
  set of layers and services, to be better prepared for multiple proto-
  col modules in the kernel, and to allow for easy addition and instal-
  lation of new device drivers.

- DDI has been implemented on the "standard" device drivers, and most of
  them can now be configured at boot time.

- Added Chuck Hedrick's modifications to the INET layer, and added his
  SLHC additions to the SLIP driver.

- Added the patches for TraceRoute, and added this program to the
  NET-EXTRA distribution in patched form.

- Moved the general stuff from the routing table to an upper level,
  allowing the DEV module to flush any routes for a particular device.

- PLIP has been merged with the other versions, and should work now.
  I got reports from test sites that PLIP worked on their systems,
  giving throughputs of about 22Kbyte/sec.  Not bad...

- Added Florian La Roche's new timer code, and added Linus Torvalds'
  additions as well.  The old-style timer code (static timers) is gone
  completely now.

- Added lots of changes by Johannes Stille, including the memory-counter
  fixes, fixes for the ARP race conditions, and changes allowing the
  LOOPBACK driver to *not* have to copy its packets anymore.

- Added Erik Schoen's ICMP fixes.  This means that TraceRoute requests
  work again, and we now support TimeStamp requests.

- Added many of Alan Cox' changes which fixed the misusage of the
  verify_area() call, a lot of FREE_READ->FREE_WRITE calls and some
  `volatile' keywords in linked-list management (skbuff and sock.)

- Added Fred Baumgarten's work on TCP/IP retransmits, the PLIP driver
  (added statistics!) and more of that.

- Added even more of Alan's work, pertaining to TCP and UDP socket
  handling.  ICMP-probs should be fixed now!

- Fixed a problem in ARP /proc output (wrong-order HW type).

- Changed the lower-level module interfaces to use 'struct sockaddr'
  rather than 'unsigned char *' for passing hardware addresses, and
  changed <linux/if.h> accordingly.

- Added a KISS driver for AX.25 users.  Not completely done yet, but
  it already works fine.  Thanks to Terry for the specs!

- Added a very basic AX.25 socket layer for AX.25/NETROM users. This
  is not finished by long, but it's a start.  Again, thanks to Terry
  for sending me the specs.

- Changed the "base utils" to reflect the changes above, and started
  on a "modularity support library" lib there.

- Changed the *VALUES* of the socket I/O controls.  This means that
  you have to recompile all binaries that use these calls- Sorry :-(

- Applied some more patches from Johannes Stille, fixing typos, a very
  nasty bug in the ARP cache handler (thanks to Anthony Rumble too!!!),
  some patches for the PLIP driver, and patches that hopefully fix the
  "netmask" problem people were having with non-8-bit netmasks.

- Applied two patches from Matt Dillon that fix problems with multi-
  homes hosts which get connected using "wrong" addresses, and a patch
  that re-fixes the "route xxx gw xxx" problem.  I must have screwed
  this patch earlier...

- More patches from Johannes, fixing PLIP (again), DDI-ing D-Link,
  and adding cli/sti protection around the (now-volatile) "inuse"
  fields of the ARP cache and queue structures.

- Received the DEPCA driver, will port it to NET-2.

- Nuked Matt's 'gw' patch - this is already checked for in the lower
  protocol levels, which is why I scrapped it originally I think.

- Fixed the call to arp_find() in inet/ip.c to first set up the desired
  hardware type - otherwise ARP barfs about unsupported HW types, causing
  huge ping times.  Thanks Matt, Ted && Me !

- Added Matt Dillon's SLIP6 encapsulation for SLIP, and added the lost
  "AF_UNIX" ioctl fix.

- Fixed small bug in inet/route.c (rt_mask()) which caused the netmask
  of the "default" route to be 0x0000.  This forces the router to put
  this route in front of all routes, making it match always.

- Also fixed small bug (caused by my new "route" command) that caused
  the default route to be a "host" route, rather than a network route.
  I now force the NETWORK status of this route in the kernel.

- Added support for the "metric" argument of the "route" command. This
  means that all NET binaries that rely on the size of the "rtentry"
  structure be recompiled.

- Added the BSD 4.4 "rt_genmask" field, which allows faster routing
  on subnets.  Still in testing phase...

- Added some small fixes from Johannes.  Fixed the kfree_s(sk, sizeof(sk))
  bug.

- Added a patch from Matt Dillon that (should) fix the problem we were
  having with the "much output" locks on TCP sockets.  It appeared that
  the generic packet pool handler could muck up the "output queue" of
  an interface in some circumstances (heavy traffic.)

- Added patches from Rick Sladkey that should fix the various RPC and/or
  NFS problems with Linux NET-2 from other platforms.  This patch changes
  the implementation of the inet/sock.c, get_sock() function - the weird
  UDP check is now cleaned up.  Also, the UNIX domain sockets now return
  the proper value when writing to sockets with no readers - this used
  to be EINTR, but is EPIPE now.  Also, little fix to TCP that corrects
  the sending of the SIGPIPE signal with writing to sockets.

- Added fix from Johannes to remove the "sk->mtu" field from the TCP
  layer, and to use an "sk->mss" field instead.  We are working towards
  a data structure that will allow the use of runtime-settable TCP and
  IP parameters, mostly for sloowww networks (AMPR !) and SNMP agents.

- Added a small fix for the SLIP driver, which should hopefully clean
  up the remaining bad packet bugs there.  Thanks Jim!

- Added patches from Michael Riepe <riepe@ifwsn4.ifw.uni-hannover.de>
  that fix the checksum problems we were having with lossy lines like
  SLIP.

- Collected the required RFC documents for all protocols supported in
  the NET-2 layer.  This should make protocol conformance checking a
  damned lot easier...

- Added Matt Dillon's "skb copy" patches.  This fixes a potential
  problem in the packet handling routines, and it adds the skb_duplicate()
  function.

- Upgraded to Linux 0.99.13p, as Linus called this one "allright"
  over dinner last night.  Haha, we'll see about that...

- Upgraded to Linux 0.99.13q.  Release "p" wasn't as good as I hoped
  it would be :-)

- Added Alan Cox' "TCP Short Write" fix.

- Ahhh... finally fixed the TCP freezing bug that kept me from releasing
  the BETA-2 code to The World.  Added a lot of other stuff from Matt
  Dillon, including his Skb Tracking code.  Good work, Matt!

- Added in-use field to the IP fragment queue, so we can lock such a
  queue as soon as we're going to mess with it.

- Several patches from Matt to post-kick ARP if a packet is queued
  just after an ARP REPLY for that address came in.  Some TCP race
  conditions fixed by adding a new field to the "sock" structure.

- Several patches from Johannes that dealt with typos, minor problems
  and a massive changes that make IP routing a lot faster by elimina-
  ting the dual routing table loop.

- More typo fixes from Alan and Johannes, and added Alan's fix so a
  socket gets decently released if the system has no free pages left.
  Also, added Alan's "IP forwarding fragments" fixes, to make sure
  that if we have to fragment incoming datagrams that are in itself
  fragments (aii, what a sentence this is!) we preserve the "MF" of
  the original final fragment.  Yikes!

- Upgraded to Linux 0.99.13r.
  Complete rewrite of the Release Notes.

  ================================ BETA-3 ==================================

- Fixed the IP forwarding bugs, as per message from Alan Cox. I indeed
  something funny was going on there, and I was correct...

- Added Alan's SO_LINGER stuff.

- Fixes from Matt applied to the TCP layer.

- OKOK, so Alan didn't do the "IP forwarding fragments" code. Gerhard
  Koerting did :-( sorry, Gerhard...

- Changes to the Installation Notes - the B2 distribution was a mess.

- Added Pauline Middelink's (hey, don't I know this woman? :-) support
  for the pidentd stuff.

- Used various NET-2Debugged fixes as per Alan Cox' bug list.

- Fixed the tcp_options option names.

- Moved the NETDBG macro to the configuration section, so changed all
  files accordingly.  Note that this makes recompilation of the kernel
  slower, as all NET files will be recompiled...

- Changed the ICMP error handler interface a bit to clean up things
  even more.  Pity though that it still doesn't seem to work :-(

- Ported to 0.99.14, which has the <linux/major.h> include file. Added
  an entry for Alan's IPX module to the Space.c file.  Added all PL14
  "config.in" network device entries, and started the device driver
  port to NET-2e, with help from Donald.

- Added comment in net/inet/sock.c:sys_bind() about one check in there
  causing certain kinds of BSD-ish server programs to fail on the
  bind(2) call.  I found this with the syslogd 5.27 :-(

- Added the NET-2Debugged "IP check forward network" patch as a new
  configurable option in "inet.h."  See installation notes above.

- Added Matt's TCP "diff" and "window subtraction" fixes.

- Added Johannes' patches for IP, TCP and RAW.  This should fix the
  "delayed ACK" syndrome, amongst others.

- Upgraded to Linux 0.99.14 ALPHA-c.

- Added more patches from Matt to check out the TCP-over-loopback
  problems.  With the latest ones installed, it seems to work OK
  again.

- Changed the "loopback" driver to copy its packets again- see item
  above.

- Some timing constants changed in the INET modules, as per Matt. Also,
  added a oneliner to prevent SLIP packets from corrupting an "skb->len"
  field.

- Added RARP capabilities to the ARP protocol module, based on patches
  sent to me by Ross Martin, <martin@trcsun3.eas.asu.edu> .

- Fixed and tested RARP.  Works great now.  Time to release the current
  code as BETA-3....

- Many small fixes, changes etc all over.

  ================================ BETA-4 ==================================

- Fixed the "CONFIG_DE600" vs. "CONFIG_DLINK" problem in net/Space.c.

- Added <linux/if_ether.h> additions for ETH_P_AX25 - the use of a
  "dummy" packet value (0x0002, in this case) is better than choosing
  a completely random value.

- Restyled the NET-2 "Makefile"s into auto-config mode.  You don't
  need to change the Makefile if you add a device driver or protocol
  module anymore now: Makefile checks it out on its own... :-)

- Added NET-2Debugged [1.27] "icmp" fix for sending replies to ICMP
  messages.

- Added NET-2Debugged [1.27] "inet/proc" fix for prevent kernel
  panics while dereferencing dead sockets.

- Added NET-2Debugged [1.27] "inet/sock" cleanups.

- Fixed up all those MAJOR_DEV confusions in the DRIVERS directories.

- Added KISS to the set of standard drivers.  *YEAH* !

- Cleanup of the source files (addresses, names etc.)

- Added Johannes' 4 batches with changes to the B3 system.

- OOps- fixed a lost patch from Johannes.

- Upgraded to PL14 ALPHA-g.  Which, BTW, doesn't work right.

- Lotsa cleanups.

- Fixed some "source address" problems in IP and the INET protocols.

- As said before, PL14g didn't work.  Upgraded to 14h, which works.

- DEPCA driver port.  Bwahh, C++ in a device driver.  What a mess..

- Finally continued porting Donald's drivers.  WD works now (I use
  it), and NE and HP compile, too.  SMC Ultra is reported to work.

- Upgraded Donald's stuff to the most recent (14j) code, and upgraded
  the kernel too.  Need to wait with the iow.h->asm/io.h stuff.

- Fixed the ARP "PERM" deletion bug.

- Added PROXY ARP capabilities.  Yeah!

- Upgraded to Linux 0.99.14 ALPHA-o.  Does anyone know why we had
  to skip ALPHA-n ??

- Fixed small bug in <inet/raw.c> : we filled in the wrong IP source
  address for RAW (i.e. Traceroute) packets.

- Upgraded to 0.99.14 ALPHA-p.  A lot of 2-Debugged stuff here, so I'll
  have to start merging again:

	+ Used the sk->tos and sk->ttl code
	+ Used the sk->rcvbuf and sk->sndbuf code
	+ Used the new socket options code
	+ Zapped out some old code

  NOT used:

	+ Callback code

- Hurray, applied Matt's fix for the irritating CONNREFUSED bug.

- ... and Johannes' fix for the "ICMP redirect" problem.

- ... and FINALLY fixed the damn "ICMP fatal error" not working
  problem.  TCP and UDP now abort the connection in progress if
  they get an ICMP fatal error.

- Added Fred Baumgarten's new PROC stuff which fixes the <OOPS>
  problems related to the /proc reading.  Also, it fixes one small
  problem in TCP calculating wrong MSS'es.

- Upgraded to Linux 0.99.14q.

- Upgraded to Linux 0.99.14s.

- Fixed lotsa small things, guided by Johannes' comments and several
  crashes of my home machine, 'metallica.'

- Whaaahh.  Quickly fixed up the damn TTL f*ckup, and introduced the
  new "ip_parms" structure to go with it.   This will, soon, allow
  operators to set the IP operating values for the system from runtime,
  without the need to recompile the kernel.  I will make this a system-
  wide feature.

- Added Fred Baumgarten's new KISS driver, which includes RMNC and SMACK
  CRC modes.

- Moved all KISS and AX.25 code into a new, separately available package
  to allow more frequent updates of that layer.  Send a message to

	net-ax25-request@aris.com

  for more info on this package.

  ================================ BETA-5 ==================================
