diff -ur --new-file old/atm/BUGS new/atm/BUGS
--- old/atm/BUGS	Thu Mar 27 19:29:07 1997
+++ new/atm/BUGS	Fri Apr  4 20:20:54 1997
@@ -1,3 +1,12 @@
+Known bugs and restrictions in version 0.29
+===========================================
+
+ - ENI driver seems to get confused when closing VC with low PCR and data
+   pending (this is a more precise diagnosis of the "ident mismatch" problem)
+ - didn't fix all the 0.27 and 0.28 problems listed below
+ - select is reported to fail miserably when used with atmtcp
+
+
 Known bugs and restrictions in version 0.28
 ===========================================
 
diff -ur --new-file old/atm/CHANGES new/atm/CHANGES
--- old/atm/CHANGES	Thu Mar 27 19:01:15 1997
+++ new/atm/CHANGES	Fri Apr  4 22:35:27 1997
@@ -1,3 +1,54 @@
+Version 0.28 to 0.29 (4-APR-1997)
+====================
+
+Bug fixes
+---------
+
+ - saal/sscop.c: NORMALIZE macro was weird and broken (fix by Ngo Bach Long)
+ - InARP queries didn't contain the target ATM address, even if it is known,
+   which stretches the allowances RFC1577 makes for violating RFC1293 (found
+   by Juha Heinanen)
+ - tcp_conn_request: Arequipa modification to MTU size calculation used wrong
+   socket (fix by Gerald Hanusch)
+ - kernel ATMARP table handling had some obscure races
+ - temporary work-around: added A2T_LOCAL when using A2T_NAME in atmsigd and
+   atmarpd. Before, systems using ANS where the name server is reached via (IP
+   over) ATM exhibited truly bizarre failure patterns when refreshing ATMARP
+   entries. (With a lot of help from Juha Heinanen)
+ - ditto for arequipad, although the effects were less dramatic
+ - atmarpd: if not using -m, incoming connections for which a valid entry
+   already existed (e.g. due to manual configuration) were not entered in the
+   kernel ATMARP table until after the entry timed out for the first time (by
+   Gerald Hanusch)
+ - skb data areas are now aligned using skb_reserve instead of directly
+   tampering with skb->data (and forgetting skb->tail in the process ...)
+   (found by Uwe Dannowski)
+
+New features
+------------
+
+ - atmarpd is now automatically notified of IP over ATM interfaces already
+   existing at startup. This greatly simplifies the atmarpd restart ritual.
+   (All ATMARP table entries and the default QoS are still lost, though.)
+
+Other changes
+-------------
+
+ - cleaned up some weird and partially dead code in arpd/arp.c (found by
+   Gerald Hanusch)
+ - removed superfluous continue in arp.c:atmarp_setentry
+ - device-driver specific declarations now reside in
+   /usr/include/linux/atm_<drv_name>.h, so that disgusting hacks like
+   #include "/usr/src/linux/..." can be avoided (based on proposal by Uwe
+   Dannowski)
+ - updated the list of supported NICs in README and the on-line help
+ - arpd/atmarpd.8: documented that atmarpd -m may violate RFC1577 in subtle
+   ways (pointed out by Gerald Hanusch)
+ - updated MPR usage description to version 1.5 and removed mpr.patch
+ - removed MEM_DEBUG from the build process (MPR 1.5 initializes itself
+   automatically)
+
+
 Version 0.27 to 0.28 (27-MAR-1997)
 ====================
 
diff -ur --new-file old/atm/README new/atm/README
--- old/atm/README	Thu Mar 27 19:01:44 1997
+++ new/atm/README	Fri Apr  4 21:35:31 1997
@@ -1,4 +1,4 @@
-ATM on Linux, release 0.28 (pre-alpha) by Werner Almesberger, EPFL LRC
+ATM on Linux, release 0.98 (pre-alpha) by Werner Almesberger, EPFL LRC
 ====================================== werner.almesberger@lrc.di.epfl.ch
 
 This is experimental software. There are known major bugs and certainly
@@ -12,9 +12,11 @@
 The following network devices are supported:
   ATM over TCP pseudo device for "dry runs"
   Efficient Networks ENI155p-MF/U5 155 Mbps ATM adapter
-  IDT 77201 (NICStAR)
+  SMC ATM Power 155
   Rolf Fiedler's TNETA1570 board / UniNET1570
   Zeitnet ZN1221/ZN1225 155 Mbps ATM adapter
+  IDT 77901/77903 ("NICStAR", 77201/77211 SAR) 155 and 25 Mbps adapters
+  (probably also IDT 77914/77915/77916)
 
 The following connection types are supported:
   constant bit rate (CBR) permanent connections
diff -ur --new-file old/atm/Rules.make new/atm/Rules.make
--- old/atm/Rules.make	Fri Feb  7 18:19:25 1997
+++ new/atm/Rules.make	Fri Apr  4 22:33:55 1997
@@ -55,7 +55,6 @@
 # Enable memory debugging if MPR is installed
 #
 ifeq (/usr/lib/libmpr.a,$(wildcard /usr/lib/libmpr.a))
-CFLAGS += -DMEM_DEBUG
 LDLIBS += -lmpr
 endif
 
diff -ur --new-file old/atm/USAGE new/atm/USAGE
--- old/atm/USAGE	Thu Mar 27 19:32:39 1997
+++ new/atm/USAGE	Fri Apr  4 22:31:12 1997
@@ -1,4 +1,4 @@
-Usage instructions  -  ATM on Linux, release 0.28 (pre-alpha)
+Usage instructions  -  ATM on Linux, release 0.29 (pre-alpha)
 -------------------------------------------------------------
 
 For updates of ATM on Linux, please check the Web page at  
@@ -17,12 +17,12 @@
 In order to install this package, you need 
 
   - the package itself  
-    ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.28.tar.gz  
+    ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.29.tar.gz  
   - the Linux kernel, version 2.0.25, e.g. from  
     ftp://ftp.cs.helsinki.fi/pub/Software/Linux/Kernel/v2.0/linux-2.0.25.tar.gz  
   - Perl, version 4 or 5 
-  - if you want memory debugging: MPR version 1.1, e.g. from  
-    ftp://sunsite.unc.edu/pub/Linux/devel/lang/c/mpr-1.1.tar.gz  
+  - if you want memory debugging: MPR version 1.5, e.g. from  
+    ftp://sunsite.unc.edu/pub/Linux/devel/lang/c/mpr-1.5.tar.gz  
 
 
 The source tree
@@ -33,7 +33,7 @@
 all the files listed above there. Then extract the ATM on Linux 
 distribution:
 
-tar xfz atm-0.28.tar.gz
+tar xfz atm-0.29.tar.gz
 
 and the kernel source:
 
@@ -145,23 +145,23 @@
 ----------------
 
 If you want to enable debugging for options for memory allocations, you 
-need to install MPR before compiling the ATM tools. Extract mpr-1.1.tar.gz 
+need to install MPR before compiling the ATM tools. Extract mpr-1.5.tar.gz 
 into a directory at the same level as linux and atm. Then do:
 
-cd mpr-1.1
-patch -p1 -s <../atm/mpr.patch
+cd mpr-1.5
+./configure x86-linux
 make
 install -c -m 0644 libmpr.a /usr/lib
 install -c -m 0755 mpr mprcc mprhi mprlk mprsz /usr/local/bin
-install -c -m 0755 mprfl mprnm mprpc /usr/local/bin
+install -c -m 0755 mprfl mprnm mprpc mprdem mprmap /usr/local/bin
 
-Detection of some general mis-use of  malloc  and  free  is enabled by 
-setting the environment variable  MCHECK . Tracing of allocations is 
-enabled by setting  MPRPC  and  MPRFI . See mpr.doc in the MPR distribution 
-for details.
+Detection of some general mis-use of  malloc  and  free  is automatically 
+performed if the program was compiled with MPR present. Tracing of 
+allocations is enabled by setting  MPRPC  and  MPRFI . See mpr.doc in the 
+MPR distribution for details.
 
-No run-time overhead is incurred if memory debugging is included, but those 
-environment variables are not set.
+Only little run-time overhead is incurred if memory debugging is included, 
+but those environment variables are not set.
 
 
 ATM tools
diff -ur --new-file old/atm/VERSION new/atm/VERSION
--- old/atm/VERSION	Thu Mar 27 19:31:53 1997
+++ new/atm/VERSION	Fri Apr  4 20:53:48 1997
@@ -1 +1 @@
-0.28
+0.29
diff -ur --new-file old/atm/aqd/arequipad.c new/atm/aqd/arequipad.c
--- old/atm/aqd/arequipad.c	Thu Aug 29 21:36:03 1996
+++ new/atm/aqd/arequipad.c	Fri Apr  4 16:59:27 1997
@@ -1,6 +1,6 @@
 /* arequipad.c - AREQUIPA demon */
  
-/* Written 1996 by Werner Almesberger, EPFL-LRC */
+/* Written 1996,1997 by Werner Almesberger, EPFL-LRC */
  
 
 #include <stdio.h>
@@ -24,7 +24,7 @@
 
 
 int debug;
-int pretty = A2T_PRETTY | A2T_NAME;
+int pretty = A2T_PRETTY | A2T_NAME | A2T_LOCAL;
 
 
 static void usage(const char *name)
diff -ur --new-file old/atm/arpd/arp.c new/atm/arpd/arp.c
--- old/atm/arpd/arp.c	Thu Mar 13 21:34:44 1997
+++ new/atm/arpd/arp.c	Fri Apr  4 11:11:23 1997
@@ -230,11 +230,13 @@
 }
 
 
-static void inarp_for_itf(int fd,ITF *itf)
+static void inarp_for_itf(VCC *vcc,ITF *itf)
 {
     if (itf->local_ip) {
 	diag(COMPONENT,DIAG_DEBUG,"  on itf %d",itf->number);
-	send_arp(fd,ARPOP_InREQUEST,itf->local_ip,NULL,0,NULL);
+	assert(vcc->entry);
+	send_arp(vcc->fd,ARPOP_InREQUEST,itf->local_ip,NULL,0,
+	  vcc->entry->svc ? vcc->entry->addr : NULL);
     }
 }
 
@@ -247,9 +249,8 @@
     diag(COMPONENT,DIAG_DEBUG,"sending InARP request");
     for (vcc = entry->vccs; vcc; vcc = vcc->next)
 	if (!vcc->connecting)
-	    if (entry->itf) inarp_for_itf(vcc->fd,entry->itf);
-	    else for (itf = itfs; itf; itf = itf->next)
-		    inarp_for_itf(vcc->fd,itf);
+	    if (entry->itf) inarp_for_itf(vcc,entry->itf);
+	    else for (itf = itfs; itf; itf = itf->next) inarp_for_itf(vcc,itf);
 }
 
 
@@ -452,7 +453,7 @@
      * If the entry on which we received the update is dangling and we found
      * an entry that already describes that IP address, ...
      */
-    if (vcc && entry && !vcc->entry->itf) {
+    if (entry && vcc && !vcc->entry->itf) {
 	if (!entry->svc) {
 	    diag(COMPONENT,DIAG_ERROR,"attempt to overwrite PVC for IP "
 	      "%d.%d.%d.%d",ipp[0],ipp[1],ipp[2],ipp[3]);
@@ -463,24 +464,23 @@
 	free(vcc->entry);
 	vcc->entry = entry;
 	Q_INSERT_HEAD(entry->vccs,vcc);
-	vcc = NULL;
+	assert(!vcc->connecting);
+	if (set_ip(vcc->fd,ip) < 0)
+	    diag(COMPONENT,DIAG_ERROR,"set_ip: %s",strerror(errno));
     }
     /*
-     * If we either found an entry or if the update was received via InARP
-     * (so we can use the entry that already belongs to the VCC), ...
+     * If we still don't have an entry, we try to use the entry that already
+     * belongs to the VCC (InARP), or we create a new one (ARP).
      */
-    if (entry || vcc) {
-	if (!entry) entry = vcc->entry;
-	if (!entry->itf) Q_REMOVE(unknown_incoming,entry);
-    }
-    else {
-	entry = alloc_entry(1);
-	entry->flags = ATF_PUBL;
+    if (!entry)
 	if (vcc) {
-	    vcc->entry = entry;
-	    Q_INSERT_HEAD(entry->vccs,vcc);
+	    entry = vcc->entry;
+	    if (!entry->itf) Q_REMOVE(unknown_incoming,entry);
+	}
+	else {
+	    entry = alloc_entry(1);
+	    entry->flags = ATF_PUBL;
 	}
-    }
     if (entry->state == as_valid && entry->ip == ip && entry->addr &&
       atm_equal(entry->addr,addr,0,0)) return; /* no news */
     STOP_TIMER(entry);
diff -ur --new-file old/atm/arpd/atmarpd.8 new/atm/arpd/atmarpd.8
--- old/atm/arpd/atmarpd.8	Mon Jan 13 21:12:57 1997
+++ new/atm/arpd/atmarpd.8	Fri Apr  4 20:42:57 1997
@@ -1,4 +1,4 @@
-.TH ATMARPD 8 "Jan 13, 1997" "Linux" "Maintenance Commands"
+.TH ATMARPD 8 "Apr 4, 1997" "Linux" "Maintenance Commands"
 .SH NAME
 atmarpd \- ATMARP demon
 .SH SYNOPSIS
@@ -46,7 +46,9 @@
 exists, is automatically added to that entry. This assumes that there is a
 1:1 mapping between IP addresses and ATMARP addresses. By default, this
 assumption is not made, which frequently results in the setup of duplicate
-connections.
+connections. Note that RFC1577 requires that an ATMARP server sends an InARP
+request on an incoming connection. Merging may therefore violate RFC1577 in
+this case.
 .IP \fB\-n\fP
 Prints addresses in numeric format only, i.e. no address to name translation
 is attempted.
diff -ur --new-file old/atm/arpd/atmarpd.c new/atm/arpd/atmarpd.c
--- old/atm/arpd/atmarpd.c	Mon Jan 13 21:13:10 1997
+++ new/atm/arpd/atmarpd.c	Fri Apr  4 21:53:45 1997
@@ -26,23 +26,17 @@
 #define COMPONENT "ARPD"
 
 
-#ifdef MEM_DEBUG
-extern int mpr(void);
-extern int mcheck (void (*)(int));
-#endif
-
-
 ITF *itfs = NULL;
 ENTRY *unknown_incoming = NULL;
 int debug;
-int pretty = A2T_PRETTY | A2T_NAME;
+int pretty = A2T_PRETTY | A2T_NAME | A2T_LOCAL;
 int merge = 0;
 
 
 static void usage(const char *name)
 {
-    fprintf(stderr,"usage: %s [ -b ] [ -d ] [ -l logfile ] [ -m ] [ -n ]\n",
-      name);
+    fprintf(stderr,"usage: %s [ -b ] [ -d ] [ -l logfile ] [ -m [ -m ] ] "
+      "[ -n ]\n",name);
     exit(1);
 }
 
@@ -52,10 +46,6 @@
     const char *dump_dir;
     int c,background;
 
-#ifdef MEM_DEBUG
-    if (getenv("MCHECK")) mcheck(0);
-    if (mpr() < 0) return 1;
-#endif
     set_application("atmarpd");
     set_verbosity(NULL,DIAG_INFO);
     dump_dir = DUMP_DIR;
diff -ur --new-file old/atm/atm-0.28-1.spec new/atm/atm-0.28-1.spec
--- old/atm/atm-0.28-1.spec	Thu Mar 20 14:49:19 1997
+++ new/atm/atm-0.28-1.spec	Thu Jan  1 01:00:00 1970
@@ -1,138 +0,0 @@
-Summary:	ATM (Asynchronous Transfer Mode)
-Name:		atm
-Version:	0.28
-Release:	1
-Source:		atm-0.28.tar.gz
-Source:		lrcftp.epfl.ch:/pub/linux/atm/dist/atm-0.28.tar.gz
-Copyright:	distributable
-Group:		Networking/ATM
-ExclusiveArch:	i386
-ExclusiveOS:	Linux
-
-%description
-Programs, libraries, and configuration files required for using ATM
-on Linux. Note that you still need to patch your kernel.
-
-%package ans
-Summary:	ANS (ATM Name Server)
-Group:		Networking/ATM
-
-%description ans
-ANS is a version of BIND with extensions for ATM. This package contains
-the complete BIND distribution, including tools like nslookup and dig.
-
-%prep
-
-%setup -n atm
-
-%build
-make
-cd extra
-make tcpdump
-make ans
-
-%install
-INSTPREFIX=/usr make -e
-cd config/redhat-4.0
-make install
-cd ../../extra
-INSTPREFIX=/usr make -e install
-
-%files ans
-/usr/lib/libresolv.a
-/usr/include/arpa/inet.h
-/usr/include/arpa/nameser.h
-/usr/include/netdb.h
-/usr/include/resolv.h
-/usr/include/sys/bitypes.h
-/usr/lib/lib44bsd.a
-/usr/sbin/named
-/usr/sbin/named-xfer
-/usr/sbin/named.restart
-/usr/sbin/named.reload
-/usr/sbin/ndc
-/usr/bin/nslookup
-/usr/lib/nslookup.help
-/usr/bin/host
-/usr/bin/dig
-/usr/bin/dnsquery
-/usr/bin/addr
-/usr/man/man1/dig.1
-/usr/man/man1/host.1
-/usr/man/man1/dnsquery.1
-/usr/man/man8/named.8
-/usr/man/man8/named.reload.8
-/usr/man/man8/named.restart.8
-/usr/man/man8/ndc.8
-/usr/man/man8/named-xfer.8
-/usr/man/man8/nslookup.8
-/usr/man/man3/gethostbyname.3
-/usr/man/man3/resolver.3
-/usr/man/man3/getnetent.3
-/usr/man/man5/resolver.5
-/usr/man/man7/hostname.7
-/usr/man/man7/mailaddr.7
-
-%files
-%doc README
-%doc USAGE
-%config /etc/sysconfig/atm
-%config /etc/atmsigd.conf
-%config /etc/sysconfig/network-scripts/ifcfg-atm0
-%config /etc/sysconfig/network-scripts/ifup-atm
-%config /etc/hosts.atm
-/usr/sbin/tcpdump
-/usr/lib/libatm.a
-/usr/lib/libatmd.a
-/usr/lib/libarequipa.a
-/usr/include/atm.h
-/usr/include/atmd.h
-/usr/include/atmsap.h
-/usr/include/arequipa.h
-/usr/sbin/atmaddr
-/usr/sbin/atmtcp
-/usr/sbin/zntune
-/usr/bin/atmdiag
-/usr/bin/atmdump
-/usr/bin/sonetdiag
-/usr/man/man8/atmaddr.8
-/usr/man/man8/atmdiag.8
-/usr/man/man8/atmdump.8
-/usr/man/man8/atmtcp.8
-/usr/sbin/clip
-/usr/sbin/atmarp
-/usr/man/man8/clip.8
-/usr/man/man8/atmarp.8
-/usr/bin/aping
-/usr/bin/aread
-/usr/bin/awrite
-/usr/bin/br
-/usr/bin/bw
-/usr/bin/ttcp_atm
-/usr/bin/window
-/usr/sbin/delay
-/usr/sbin/aqtest
-/usr/sbin/ed
-/usr/sbin/encopy
-/usr/sbin/endump
-/usr/sbin/zndump
-/usr/sbin/znth
-/usr/sbin/atmsigd
-/usr/man/man4/atmsigd.conf.4
-/usr/man/man8/atmsigd.8
-/usr/sbin/atmarpd
-/usr/man/man8/atmarpd.8
-/usr/sbin/ilmid
-/usr/sbin/zeppelin
-/usr/man/man8/zeppelin.8
-/usr/sbin/les
-/usr/sbin/bus
-/usr/sbin/lecs
-/usr/man/man8/les.8
-/usr/man/man8/lecs.8
-/usr/man/man8/bus.8
-/usr/sbin/arequipad
-/usr/sbin/aqpvc
-/usr/man/man8/arequipad.8
-/usr/man/man8/aqpvc.8
-/usr/man/man7/qos.7
diff -ur --new-file old/atm/atm-0.29-1.spec new/atm/atm-0.29-1.spec
--- old/atm/atm-0.29-1.spec	Thu Jan  1 01:00:00 1970
+++ new/atm/atm-0.29-1.spec	Fri Apr  4 20:55:37 1997
@@ -0,0 +1,138 @@
+Summary:	ATM (Asynchronous Transfer Mode)
+Name:		atm
+Version:	0.29
+Release:	1
+Source:		atm-0.29.tar.gz
+Source:		lrcftp.epfl.ch:/pub/linux/atm/dist/atm-0.29.tar.gz
+Copyright:	distributable
+Group:		Networking/ATM
+ExclusiveArch:	i386
+ExclusiveOS:	Linux
+
+%description
+Programs, libraries, and configuration files required for using ATM
+on Linux. Note that you still need to patch your kernel.
+
+%package ans
+Summary:	ANS (ATM Name Server)
+Group:		Networking/ATM
+
+%description ans
+ANS is a version of BIND with extensions for ATM. This package contains
+the complete BIND distribution, including tools like nslookup and dig.
+
+%prep
+
+%setup -n atm
+
+%build
+make
+cd extra
+make tcpdump
+make ans
+
+%install
+INSTPREFIX=/usr make -e
+cd config/redhat-4.0
+make install
+cd ../../extra
+INSTPREFIX=/usr make -e install
+
+%files ans
+/usr/lib/libresolv.a
+/usr/include/arpa/inet.h
+/usr/include/arpa/nameser.h
+/usr/include/netdb.h
+/usr/include/resolv.h
+/usr/include/sys/bitypes.h
+/usr/lib/lib44bsd.a
+/usr/sbin/named
+/usr/sbin/named-xfer
+/usr/sbin/named.restart
+/usr/sbin/named.reload
+/usr/sbin/ndc
+/usr/bin/nslookup
+/usr/lib/nslookup.help
+/usr/bin/host
+/usr/bin/dig
+/usr/bin/dnsquery
+/usr/bin/addr
+/usr/man/man1/dig.1
+/usr/man/man1/host.1
+/usr/man/man1/dnsquery.1
+/usr/man/man8/named.8
+/usr/man/man8/named.reload.8
+/usr/man/man8/named.restart.8
+/usr/man/man8/ndc.8
+/usr/man/man8/named-xfer.8
+/usr/man/man8/nslookup.8
+/usr/man/man3/gethostbyname.3
+/usr/man/man3/resolver.3
+/usr/man/man3/getnetent.3
+/usr/man/man5/resolver.5
+/usr/man/man7/hostname.7
+/usr/man/man7/mailaddr.7
+
+%files
+%doc README
+%doc USAGE
+%config /etc/sysconfig/atm
+%config /etc/atmsigd.conf
+%config /etc/sysconfig/network-scripts/ifcfg-atm0
+%config /etc/sysconfig/network-scripts/ifup-atm
+%config /etc/hosts.atm
+/usr/sbin/tcpdump
+/usr/lib/libatm.a
+/usr/lib/libatmd.a
+/usr/lib/libarequipa.a
+/usr/include/atm.h
+/usr/include/atmd.h
+/usr/include/atmsap.h
+/usr/include/arequipa.h
+/usr/sbin/atmaddr
+/usr/sbin/atmtcp
+/usr/sbin/zntune
+/usr/bin/atmdiag
+/usr/bin/atmdump
+/usr/bin/sonetdiag
+/usr/man/man8/atmaddr.8
+/usr/man/man8/atmdiag.8
+/usr/man/man8/atmdump.8
+/usr/man/man8/atmtcp.8
+/usr/sbin/clip
+/usr/sbin/atmarp
+/usr/man/man8/clip.8
+/usr/man/man8/atmarp.8
+/usr/bin/aping
+/usr/bin/aread
+/usr/bin/awrite
+/usr/bin/br
+/usr/bin/bw
+/usr/bin/ttcp_atm
+/usr/bin/window
+/usr/sbin/delay
+/usr/sbin/aqtest
+/usr/sbin/ed
+/usr/sbin/encopy
+/usr/sbin/endump
+/usr/sbin/zndump
+/usr/sbin/znth
+/usr/sbin/atmsigd
+/usr/man/man4/atmsigd.conf.4
+/usr/man/man8/atmsigd.8
+/usr/sbin/atmarpd
+/usr/man/man8/atmarpd.8
+/usr/sbin/ilmid
+/usr/sbin/zeppelin
+/usr/man/man8/zeppelin.8
+/usr/sbin/les
+/usr/sbin/bus
+/usr/sbin/lecs
+/usr/man/man8/les.8
+/usr/man/man8/lecs.8
+/usr/man/man8/bus.8
+/usr/sbin/arequipad
+/usr/sbin/aqpvc
+/usr/man/man8/arequipad.8
+/usr/man/man8/aqpvc.8
+/usr/man/man7/qos.7
diff -ur --new-file old/atm/atm.patch new/atm/atm.patch
--- old/atm/atm.patch	Thu Mar 27 19:33:37 1997
+++ new/atm/atm.patch	Fri Apr  4 22:35:42 1997
@@ -20,7 +20,7 @@
  	ls *.o > .allmods; \
  	echo $$MODULES | tr ' ' '\n' | sort | comm -23 .allmods - > .misc; \
 --- ref/Documentation/Configure.help	Sat Oct  5 10:13:56 1996
-+++ work/Documentation/Configure.help	Wed Jan 29 22:06:37 1997
++++ work/Documentation/Configure.help	Fri Apr  4 20:19:34 1997
 @@ -674,6 +674,14 @@
    say "386" or "486" here even if running on a Pentium or PPro
    machine. If you don't know what to do, say "386".
@@ -134,8 +134,8 @@
 +
 +Rolfs TI TNETA1570
 +CONFIG_ATM_TNETA1570
-+  Driver for the TNETA1570 155 Mbps ATM adapter, both developed by Rolf
-+  Fiedler at TU Chemnitz, see also
++  Driver for the TNETA1570 (or UniNET 1570) 155 Mbps ATM adapter, both
++  (driver and adapter) developed by Rolf Fiedler at TU Chemnitz, see also
 +  ftp://ftp.infotech.tu-chemnitz.de/pub/linux-atm
 +
 +Enable extended debugging
@@ -148,8 +148,8 @@
 +
 +IDT 77201 (NICStAR)
 +CONFIG_ATM_NICSTAR
-+  Driver for the IDT 77201 (NICStAR) ATM adapter. Written by Matt Welsh
-+  and Stuart Daniel <stuartd@eecs.umich.edu>.
++  Driver for the IDT 77901/77903 ("NICStAR", 77201/77211 SAR) ATM adapters.
++  Written by Matt Welsh and Stuart Daniel <stuartd@eecs.umich.edu>.
  
  SCSI support?
  CONFIG_SCSI
@@ -752,8 +752,8 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/drivers/atm/eni.c	Thu Mar 27 17:10:17 1997
-@@ -0,0 +1,1952 @@
++++ work/drivers/atm/eni.c	Fri Apr  4 19:58:42 1997
+@@ -0,0 +1,1953 @@
 +/* drivers/atm/eni.c - Efficient Networks ENI155P device driver */
 + 
 +/* Written 1995-1997 by Werner Almesberger, EPFL LRC */
@@ -773,6 +773,7 @@
 +#include <linux/sched.h> /* for xtime */
 +#include <linux/delay.h>
 +#include <linux/uio.h>
++#include <linux/atm_eni.h>
 +#include <asm/system.h>
 +#include <asm/string.h>
 +#include <asm/byteorder.h>
@@ -2707,24 +2708,16 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/drivers/atm/eni.h	Wed Mar 19 20:42:17 1997
-@@ -0,0 +1,114 @@
++++ work/drivers/atm/eni.h	Fri Apr  4 19:58:30 1997
+@@ -0,0 +1,104 @@
 +/* drivers/atm/eni.h - Efficient Networks ENI155P device driver declarations */
 + 
-+/* Written 1995,1996 by Werner Almesberger, EPFL LRC */
++/* Written 1995-1997 by Werner Almesberger, EPFL LRC */
 + 
 + 
 +#ifndef DRIVER_ATM_ENI_H
 +#define DRIVER_ATM_ENI_H
 +
-+#include <linux/atmioc.h>
-+
-+#define ENI_MEMDUMP	_IOW('a',ATMIOC_SARPRV,struct atmif_sioc)
-+						/* printk memory map */
-+
-+
-+#ifdef __KERNEL__
-+
 +#include <linux/atm.h>
 +#include <linux/atmdev.h>
 +#include <linux/sonet.h>
@@ -2820,8 +2813,6 @@
 +#define ENI_DEV(d) ((struct eni_dev *) (d)->dev_data)
 +#define ENI_VCC(d) ((struct eni_vcc *) (d)->dev_data)
 +
-+#endif /* __KERNEL__ */
-+
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
 +++ work/drivers/atm/midway.h	Fri Nov 15 19:06:24 1996
@@ -3393,7 +3384,7 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/drivers/atm/suni.h	Wed Mar 19 20:42:17 1997
++++ work/drivers/atm/suni.h	Wed Apr  2 22:37:11 1997
 @@ -0,0 +1,219 @@
 +/* drivers/atm/suni.h - PMC SUNI (PHY) declarations */
 + 
@@ -4273,8 +4264,8 @@
 + 
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/drivers/atm/zatm.c	Thu Feb  6 19:40:59 1997
-@@ -0,0 +1,1847 @@
++++ work/drivers/atm/zatm.c	Fri Apr  4 19:56:49 1997
+@@ -0,0 +1,1848 @@
 +/* drivers/atm/zatm.c - ZeitNet ZN122x device driver */
 + 
 +/* Written 1995-1997 by Werner Almesberger, EPFL LRC */
@@ -4295,6 +4286,7 @@
 +#include <linux/delay.h>
 +#include <linux/ioport.h> /* for request_region */
 +#include <linux/uio.h>
++#include <linux/atm_zatm.h>
 +#include <asm/byteorder.h>
 +#include <asm/system.h>
 +#include <asm/string.h>
@@ -4483,8 +4475,8 @@
 +		 *   ...
 +		 */
 +		skb->free = 1;
-+		skb->data = (void *) ((((unsigned long) skb->data+align+
-+		    offset-1) & ~(align-1))-offset);
++		skb_reserve(skb,(unsigned char *) ((((unsigned long) skb->data+
++		    align+offset-1) & ~(align-1))-offset)-skb->data);
 +		((void **) skb->data)[0] = skb->data+HEAD_SIZE;
 +		((void **) skb->data)[1] = NULL;
 +		((void **) skb->data)[2] = skb;
@@ -6123,63 +6115,16 @@
 + 
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/drivers/atm/zatm.h	Wed Mar 19 20:42:45 1997
-@@ -0,0 +1,172 @@
++++ work/drivers/atm/zatm.h	Fri Apr  4 19:56:15 1997
+@@ -0,0 +1,124 @@
 +/* drivers/atm/zatm.h - ZeitNet ZN122x device driver declarations */
 +
-+/* Written 1995,1996 by Werner Almesberger, EPFL LRC */
++/* Written 1995-1997 by Werner Almesberger, EPFL LRC */
 +
 +
 +#ifndef DRIVER_ATM_ZATM_H
 +#define DRIVER_ATM_ZATM_H
 +
-+/*
-+ * Note: non-kernel programs including this file must also include
-+ * sys/types.h for struct timeval
-+ */
-+
-+#include <linux/atmioc.h>
-+
-+#define ZATM_GETPOOL	_IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
-+						/* get pool statistics */
-+#define ZATM_GETPOOLZ	_IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
-+						/* get statistics and zero */
-+#define ZATM_SETPOOL	_IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc)
-+						/* set pool parameters */
-+#define ZATM_GETTHIST	_IOW('a',ATMIOC_SARPRV+4,struct atmif_sioc)
-+						/* get a history of timer
-+						   differences */
-+
-+struct zatm_pool_info {
-+	int ref_count;			/* free buffer pool usage counters */
-+	int low_water,high_water;	/* refill parameters */
-+	int rqa_count,rqu_count;	/* queue condition counters */
-+	int offset,next_off;		/* alignment optimizations: offset */
-+	int next_cnt,next_thres;	/* repetition counter and threshold */
-+};
-+
-+struct zatm_pool_req {
-+	int pool_num;			/* pool number */
-+	struct zatm_pool_info info;	/* actual information */
-+};
-+
-+struct zatm_thist {
-+	struct timeval real;		/* real (wall-clock) time */
-+	struct timeval expected;	/* expected real time */
-+};
-+
-+
-+#define ZATM_OAM_POOL		0	/* free buffer pool for OAM cells */
-+#define ZATM_AAL0_POOL		1	/* free buffer pool for AAL0 cells */
-+#define ZATM_AAL5_POOL_BASE	2	/* first AAL5 free buffer pool */
-+#define ZATM_LAST_POOL	ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */
-+
-+#define ZATM_TIMER_HISTORY_SIZE	16	/* number of timer adjustments to
-+					   record; must be 2^n */
-+
-+
-+#ifdef __KERNEL__
-+
 +#include <linux/skbuff.h>
 +#include <linux/atm.h>
 +#include <linux/atmdev.h>
@@ -6295,7 +6240,6 @@
 +#define ZATM_DEV(d) ((struct zatm_dev *) (d)->dev_data)
 +#define ZATM_VCC(d) ((struct zatm_vcc *) (d)->dev_data)
 +
-+#endif __KERNEL__
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
 +++ work/drivers/atm/zeprom.h	Fri Nov 15 19:06:27 1996
@@ -6335,7 +6279,7 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/drivers/atm/tneta1570.h	Wed Mar 19 20:43:08 1997
++++ work/drivers/atm/tneta1570.h	Wed Apr  2 22:38:00 1997
 @@ -0,0 +1,390 @@
 +/* drivers/atm/tneta1570.h - TI TNETA1570 (SAR) declarations */
 + 
@@ -11018,7 +10962,7 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/include/linux/atmclip.h	Wed Mar 19 20:44:11 1997
++++ work/include/linux/atmclip.h	Wed Apr  2 22:38:55 1997
 @@ -0,0 +1,37 @@
 +/* atmclip.h - Classical IP over ATM */
 + 
@@ -11058,8 +11002,8 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/include/linux/atmdev.h	Wed Mar 19 20:41:55 1997
-@@ -0,0 +1,258 @@
++++ work/include/linux/atmdev.h	Wed Apr  2 22:05:19 1997
+@@ -0,0 +1,257 @@
 +/* atmdev.h - ATM device driver declarations */
 + 
 +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */
@@ -11190,7 +11134,6 @@
 +#define ATM_VF_SCRX	ATM_SC_RX /* 1024; allow single-copy in the RX dir. */
 +#define ATM_VF_SCTX	ATM_SC_TX /* 2048; allow single-copy in the TX dir. */
 +
-+
 +struct atm_vcc {
 +	unsigned short	flags;		/* VCC flags (ATM_VF_*) */
 +	unsigned char	family;		/* address family; 0 if unused */
@@ -13138,7 +13081,7 @@
 +		if (atm_vcc[i].family) fn(atm_vcc+i);
 +}
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/static.h	Wed Mar 19 20:44:11 1997
++++ work/net/atm/static.h	Wed Apr  2 22:38:55 1997
 @@ -0,0 +1,29 @@
 +/* net/atm/static.h - Staticly allocated resources */
 +
@@ -13170,7 +13113,7 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/svc.c	Fri Nov 15 19:06:33 1996
++++ work/net/atm/svc.c	Wed Apr  2 22:05:33 1997
 @@ -0,0 +1,604 @@
 +/* net/atm/svc.c - ATM SVC sockets */
 +
@@ -13997,7 +13940,7 @@
 +	return 0;
 +}
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/signaling.h	Wed Mar 19 20:44:11 1997
++++ work/net/atm/signaling.h	Wed Apr  2 22:38:55 1997
 @@ -0,0 +1,25 @@
 +/* net/atm/signaling.h - ATM signaling */
 + 
@@ -14025,8 +13968,8 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/atmarp.c	Tue Mar 11 22:20:59 1997
-@@ -0,0 +1,610 @@
++++ work/net/atm/atmarp.c	Fri Apr  4 19:36:36 1997
+@@ -0,0 +1,624 @@
 +/* atmarp.c - RFC1577 ATM ARP */
 +
 +/* Written 1995-1997 by Werner Almesberger, EPFL LRC */
@@ -14047,17 +13990,11 @@
 +#include <linux/atmarp.h>
 +#include <linux/ip.h> /* for net/route.h */
 +#include <linux/in.h> /* for struct sockaddr_in */
++#include <linux/if.h> /* for IFF_UP */
 +#include <net/route.h> /* for struct rtable and ip_rt_route */
 +#include <asm/param.h> /* for HZ */
 +#include <asm/byteorder.h> /* for htons etc. */
-+
-+
-+/*
-+ * WARNING: This code will eventually become full ATMARP support as defined in
-+ *	    RFC1577 (actually, the plan is to move on quickly to RFC1577+), but
-+ *	    right now it's certainly full of bugs and severe design errors.
-+ *	    Don't use it as a reference for anything.
-+ */
++#include <asm/system.h> /* save/restore_flags */
 +
 +
 +#include "common.h"
@@ -14156,13 +14093,13 @@
 +}
 +
 +
-+static void remove(struct atmarp_entry *entry) /* @@@ ugly ! */
++static void remove(struct atmarp_entry *entry)
 +{
 +	struct atmarp_entry **walk;
 +
 +	for (walk = &PRIV(entry->dev)->table; *walk; walk = &(*walk)->next)
 +		if (*walk == entry) {
-+			*walk = entry->next;
++			*walk = entry->next; /* atomic */
 +			return;
 +		}
 +	printk(KERN_CRIT "ATMARP: remove failed (0x%08lx)\n",
@@ -14199,7 +14136,10 @@
 +	struct device *itf;
 +	struct atmarp_entry **entry;
 +	unsigned long expire;
++	unsigned long flags;
 +
++	save_flags(flags);
++	cli();
 +	idle_timer.expires = UINT_MAX;
 +	for (itf = clip_devs; itf; itf = PRIV(itf)->next) {
 +		entry = &PRIV(itf)->table;
@@ -14220,6 +14160,7 @@
 +		idle_timer.expires = jiffies+CLIP_CHECK_INTERVAL*HZ;
 +	del_timer(&idle_timer);
 +	add_timer(&idle_timer);
++	restore_flags(flags);
 +}
 +
 +
@@ -14333,6 +14274,9 @@
 +		entry->next = PRIV(dev)->table;
 +		PRIV(dev)->table = entry;
 +		idle_timer_check(0);
++		    /* this new entry may have the soonest timeout, so we need
++		       to re-compute the expiration interval. Expired entries
++		       may be timed out as a side-effect. */
 +		return 0;
 +	}
 +	if (!entry->vcc || !(entry->vcc->flags & ATM_VF_READY)) {
@@ -14387,6 +14331,7 @@
 +	struct atmarp_entry **walk,**next,*succ;
 +	struct rtable *route;
 +	struct sk_buff *queued;
++	unsigned long flags;
 +
 +	DPRINTK("SETENTRY 0x%lx\n",ip);
 +	if (vcc->push != atm_push_ip) {
@@ -14414,6 +14359,8 @@
 +		return 0;
 +	}
 +	DPRINTK("setentry: add\n");
++	save_flags(flags);
++	cli();
 +	queued = NULL;
 +	for (walk = &PRIV(AE(vcc)->dev)->table; *walk; walk = next) {
 +		next = &(*walk)->next;
@@ -14426,18 +14373,23 @@
 +					printk(KERN_CRIT "atmarp: bad news - "
 +					    "more than one skb queued\n");
 +				queued = (*walk)->queued;
++				/*
++				 * We don't need to reset ->queued to NULL now,
++				 * because in all cases, where ->queued is used,
++				 * ->vcc is tested first.
++				 */
 +			}
 +			succ = (*walk)->next;
 +			kfree(*walk);
 +			*walk = succ;
 +			next = walk;
-+			continue;
 +		}
 +	}
 +	DPRINTK("(adding)\n");
 +	AE(vcc)->ip = ip;
-+	AE(vcc)->next =  PRIV(AE(vcc)->dev)->table;
++	AE(vcc)->next = PRIV(AE(vcc)->dev)->table;
 +	PRIV(AE(vcc)->dev)->table = AE(vcc);
++	restore_flags(flags);
 +	if (queued) clip_xmit(queued,route->rt_dev);
 +	return 0;
 +}
@@ -14618,6 +14570,8 @@
 +
 +int atm_init_atmarp(struct atm_vcc *vcc)
 +{
++	struct device *dev;
++
 +	if (atmarpd) return -EADDRINUSE;
 +	if (start_timer) {
 +		start_timer = 0;
@@ -14635,10 +14589,13 @@
 +	vcc->pop = NULL; /* crash */
 +	vcc->push_oam = NULL; /* crash */
 +	register_netdevice_notifier(&clip_dev_notifier);
++	for (dev = clip_devs; dev; dev = PRIV(dev)->next)
++		if (dev->flags & IFF_UP)
++			(void) send_demon(act_up,PRIV(dev)->number,0,NULL,0);
 +	return 0;
 +}
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/atmarp.h	Wed Mar 19 20:44:11 1997
++++ work/net/atm/atmarp.h	Wed Apr  2 22:38:55 1997
 @@ -0,0 +1,53 @@
 +/* net/atm/atmarp.h - RFC1577 ATM ARP */
 + 
@@ -14694,7 +14651,7 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/ipcommon.h	Wed Mar 19 20:44:55 1997
++++ work/net/atm/ipcommon.h	Wed Apr  2 22:39:38 1997
 @@ -0,0 +1,73 @@
 +/* net/atm/ipcommon.h - Common items for all ways of doing IP over ATM */
 +
@@ -14770,7 +14727,7 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/ipcommon.c	Thu Feb  6 19:42:25 1997
++++ work/net/atm/ipcommon.c	Fri Apr  4 19:31:40 1997
 @@ -0,0 +1,213 @@
 +/* net/atm/ipcommon.c - Common items for all ways of doing IP over ATM */
 +
@@ -14852,9 +14809,9 @@
 +		    GFP_ATOMIC);
 +		if (skb) {
 +			DPRINTK("data before: 0x%p\n",skb->data);
-+		        skb->data = (unsigned char *) (((unsigned long) skb->
-+			    data+header_size+PAGE_SIZE-1) & ~(PAGE_SIZE-1))-
-+			    header_size;
++			skb_reserve(skb,(unsigned char *) (((unsigned long)
++			    skb->data+header_size+PAGE_SIZE-1) &
++			    ~(PAGE_SIZE-1))-header_size-skb->data);
 +			DPRINTK("data after: 0x%p\n",skb->data);
 +		}
 +	}
@@ -16041,7 +15998,7 @@
 +
 +#endif
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/raw.c	Fri Mar  7 14:25:00 1997
++++ work/net/atm/raw.c	Fri Apr  4 19:32:52 1997
 @@ -0,0 +1,139 @@
 +/* net/atm/raw.c - Raw AAL0 and AAL5 transports */
 +
@@ -16122,9 +16079,9 @@
 +			skb = alloc_skb(((pdu_size+3) & ~3)+PAGE_SIZE-1,
 +			    GFP_ATOMIC);
 +			if (skb) {
-+				skb->data = (unsigned char *)
++				skb_reserve(skb,(unsigned char *)
 +				    (((unsigned long) skb->data+PAGE_SIZE-1) &
-+				    ~(PAGE_SIZE-1));
++				    ~(PAGE_SIZE-1))-skb->data);
 +DPRINTK("PEEK: data at 0x%p\n",skb->data);
 +				return skb;
 +			}
@@ -18040,7 +17997,7 @@
 +        return i;
 +}
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/lec.h	Wed Mar 19 20:44:11 1997
++++ work/net/atm/lec.h	Wed Apr  2 22:38:55 1997
 @@ -0,0 +1,107 @@
 +/*
 + *
@@ -19197,7 +19154,7 @@
 +}
 +
 --- /dev/null	Mon Jul 18 01:46:18 1994
-+++ work/net/atm/lec_arpc.h	Wed Mar 19 20:44:11 1997
++++ work/net/atm/lec_arpc.h	Wed Apr  2 22:38:55 1997
 @@ -0,0 +1,101 @@
 +/*
 + * Lec arp cache
@@ -19467,7 +19424,7 @@
 +
 +#endif
 --- ref/net/ipv4/tcp_input.c	Wed Oct 30 03:13:01 1996
-+++ work/net/ipv4/tcp_input.c	Wed Nov 27 19:57:41 1996
++++ work/net/ipv4/tcp_input.c	Thu Apr  3 13:07:44 1997
 @@ -36,6 +36,11 @@
  #include <linux/random.h>
  #include <net/tcp.h>
@@ -19553,17 +19510,18 @@
  	
  	if(rt!=NULL && (rt->rt_flags&RTF_WINDOW))
  		newsk->window_clamp = rt->rt_window;
-@@ -542,7 +578,8 @@
+@@ -542,7 +578,9 @@
  	if (sk->user_mss)
  		newsk->mtu = sk->user_mss;
  	else if (rt)
 -		newsk->mtu = rt->rt_mtu - sizeof(struct iphdr) - sizeof(struct tcphdr);
-+		newsk->mtu = sk->ip_route_cache->rt_mtu - sizeof(struct iphdr) -
-+		    sizeof(struct tcphdr); /* changed for Arequipa's MSS hack */
++		newsk->mtu = newsk->ip_route_cache->rt_mtu -
++		    sizeof(struct iphdr) - sizeof(struct tcphdr);
++		    /* changed for Arequipa's MSS hack */
  	else 
  		newsk->mtu = 576 - sizeof(struct iphdr) - sizeof(struct tcphdr);
  
-@@ -686,6 +723,9 @@
+@@ -686,6 +724,9 @@
  	 *	Have we discovered a larger window
  	 */
  	window_seq = ntohs(th->window);
@@ -19573,7 +19531,7 @@
  	if (window_seq > sk->max_window) 
  	{
    		sk->max_window = window_seq;
-@@ -1174,6 +1214,10 @@
+@@ -1174,6 +1215,10 @@
  		sk->rtt = 0;
  		sk->rto = TCP_TIMEOUT_INIT;
  		sk->mdev = TCP_TIMEOUT_INIT;
@@ -19584,7 +19542,7 @@
  	}
  	
  	/*
-@@ -1801,6 +1845,13 @@
+@@ -1801,6 +1846,13 @@
  		skb->saddr = daddr;
  		skb->daddr = saddr;
  
@@ -19598,7 +19556,7 @@
  		/*
  		 * We may need to add it to the backlog here. 
  		 */
-@@ -1961,6 +2012,12 @@
+@@ -1961,6 +2013,12 @@
  					return 0;
  				}
  
@@ -19611,7 +19569,7 @@
  				/* process the ACK, get the SYN packet out
  				 * of the send queue, do other initial
  				 * processing stuff. [We know it's good, and
-@@ -1978,7 +2035,6 @@
+@@ -1978,7 +2036,6 @@
  				sk->fin_seq = skb->seq;
  				tcp_send_ack(sk);
  				tcp_set_state(sk, TCP_ESTABLISHED);
@@ -19993,3 +19951,78 @@
 +    bigphysarea_map[i+j] = BIGPHYS_FREE;
 +  }
 +}
+--- /dev/null	Mon Jul 18 01:46:18 1994
++++ work/include/linux/atm_eni.h	Fri Apr  4 19:58:15 1997
+@@ -0,0 +1,15 @@
++/* atm_eni.h - Driver-specific declarations of the ENI driver (for use by
++	       driver-specific utilities) */
++
++/* Written 1995-1997 by Werner Almesberger, EPFL LRC */
++
++
++#ifndef LINUX_ATM_ENI_H
++#define LINUX_ATM_ENI_H
++
++#include <linux/atmioc.h>
++
++#define ENI_MEMDUMP     _IOW('a',ATMIOC_SARPRV,struct atmif_sioc)
++                                                /* printk memory map */
++
++#endif
+--- /dev/null	Mon Jul 18 01:46:18 1994
++++ work/include/linux/atm_zatm.h	Fri Apr  4 19:56:22 1997
+@@ -0,0 +1,54 @@
++/* atm_zatm.h - Driver-specific declarations of the ZATM driver (for use by
++		driver-specific utilities) */
++
++/* Written 1995-1997 by Werner Almesberger, EPFL LRC */
++
++
++#ifndef LINUX_ATM_ZATM_H
++#define LINUX_ATM_ZATM_H
++
++/*
++ * Note: non-kernel programs including this file must also include
++ * sys/types.h for struct timeval
++ */
++
++#include <linux/atmioc.h>
++
++#define ZATM_GETPOOL	_IOW('a',ATMIOC_SARPRV+1,struct atmif_sioc)
++						/* get pool statistics */
++#define ZATM_GETPOOLZ	_IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc)
++						/* get statistics and zero */
++#define ZATM_SETPOOL	_IOW('a',ATMIOC_SARPRV+3,struct atmif_sioc)
++						/* set pool parameters */
++#define ZATM_GETTHIST	_IOW('a',ATMIOC_SARPRV+4,struct atmif_sioc)
++						/* get a history of timer
++						   differences */
++
++struct zatm_pool_info {
++	int ref_count;			/* free buffer pool usage counters */
++	int low_water,high_water;	/* refill parameters */
++	int rqa_count,rqu_count;	/* queue condition counters */
++	int offset,next_off;		/* alignment optimizations: offset */
++	int next_cnt,next_thres;	/* repetition counter and threshold */
++};
++
++struct zatm_pool_req {
++	int pool_num;			/* pool number */
++	struct zatm_pool_info info;	/* actual information */
++};
++
++struct zatm_thist {
++	struct timeval real;		/* real (wall-clock) time */
++	struct timeval expected;	/* expected real time */
++};
++
++
++#define ZATM_OAM_POOL		0	/* free buffer pool for OAM cells */
++#define ZATM_AAL0_POOL		1	/* free buffer pool for AAL0 cells */
++#define ZATM_AAL5_POOL_BASE	2	/* first AAL5 free buffer pool */
++#define ZATM_LAST_POOL	ZATM_AAL5_POOL_BASE+10 /* max. 64 kB */
++
++#define ZATM_TIMER_HISTORY_SIZE	16	/* number of timer adjustments to
++					   record; must be 2^n */
++
++#endif
diff -ur --new-file old/atm/debug/ed.c new/atm/debug/ed.c
--- old/atm/debug/ed.c	Wed Dec 13 19:50:16 1995
+++ new/atm/debug/ed.c	Fri Apr  4 20:05:37 1997
@@ -8,8 +8,7 @@
 #include <linux/atm.h>
 #include <linux/atmdev.h>
 #include <linux/sonet.h>
-
-#include "/usr/src/linux/drivers/atm/eni.h"
+#include <linux/atm_eni.h>
 
 
 static void usage(const char *name)
diff -ur --new-file old/atm/debug/znth.c new/atm/debug/znth.c
--- old/atm/debug/znth.c	Sun Nov 17 15:47:20 1996
+++ new/atm/debug/znth.c	Fri Apr  4 20:07:08 1997
@@ -1,6 +1,6 @@
 /* znth.c - ZN122x timestamp adjustments history */
 
-/* Written 1996 by Werner Almesberger, EPFL-LRC */
+/* Written 1996,1997 by Werner Almesberger, EPFL-LRC */
 
 
 #include <stdlib.h>
@@ -9,8 +9,7 @@
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <linux/atm.h>
-
-#include "/usr/src/linux/drivers/atm/zatm.h"
+#include <linux/atm_zatm.h>
 
 
 int main(int argc,char **argv)
diff -ur --new-file old/atm/doc/usage.tex new/atm/doc/usage.tex
--- old/atm/doc/usage.tex	Thu Mar 27 19:01:31 1997
+++ new/atm/doc/usage.tex	Fri Apr  4 22:22:37 1997
@@ -1,7 +1,7 @@
 %%def%:=
 
 %:\begin{verbatim}
-%:Usage instructions  -  ATM on Linux, release 0.28 (pre-alpha)
+%:Usage instructions  -  ATM on Linux, release 0.29 (pre-alpha)
 %:-------------------------------------------------------------
 %:
 %:\end{verbatim}
@@ -38,14 +38,14 @@
 
 \title{ATM on Linux \\
   User's guide \\
-  Release 0.28 (pre-alpha)}
+  Release 0.29 (pre-alpha)}
 \author{Werner Almesberger \\
   {\tt werner.almesberger@lrc.di.epfl.ch} \\
   \\
   Laboratoire de R\'eseaux de Communication (LRC) \\
   EPFL, CH-1015 Lausanne, Switzerland}
  
-\date{March 27, 1997}
+\date{April 4, 1997}
 
 \begin{document}
 \maketitle
@@ -81,12 +81,12 @@
 In order to install this package, you need
 \begin{itemize}
   \item the package itself
-    \url{ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.28.tar.gz}
+    \url{ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.29.tar.gz}
   \item the Linux kernel, version 2.0.25, e.g. from
 \url{ftp://ftp.cs.helsinki.fi/pub/Software/Linux/Kernel/v2.0/linux-2.0.25.tar.gz}
   \item Perl, version 4 or 5
-  \item if you want memory debugging: MPR version 1.1, e.g. from
-    \url{ftp://sunsite.unc.edu/pub/Linux/devel/lang/c/mpr-1.1.tar.gz}
+  \item if you want memory debugging: MPR version 1.5, e.g. from
+    \url{ftp://sunsite.unc.edu/pub/Linux/devel/lang/c/mpr-1.5.tar.gz}
 \end{itemize}
 
 
@@ -98,7 +98,7 @@
 distribution:
 
 \begin{verbatim}
-tar xfz atm-0.28.tar.gz
+tar xfz atm-0.29.tar.gz
 \end{verbatim}
 
 and the kernel source:
@@ -227,25 +227,25 @@
 
 If you want to enable debugging for options for memory allocations, you
 need to install MPR before compiling the ATM tools. Extract
-\path{mpr-1.1.tar.gz} into a directory at the same level as \path{linux}
+\path{mpr-1.5.tar.gz} into a directory at the same level as \path{linux}
 and \path{atm}. Then do:
 
 \begin{verbatim}
-cd mpr-1.1
-patch -p1 -s <../atm/mpr.patch
+cd mpr-1.5
+./configure x86-linux
 make
 install -c -m 0644 libmpr.a /usr/lib
 install -c -m 0755 mpr mprcc mprhi mprlk mprsz /usr/local/bin
-install -c -m 0755 mprfl mprnm mprpc /usr/local/bin
+install -c -m 0755 mprfl mprnm mprpc mprdem mprmap /usr/local/bin
 \end{verbatim}
 
-Detection of some general mis-use of \raw{malloc} and \raw{free} is enabled
-by setting the environment variable \raw{MCHECK}. Tracing of allocations
-is enabled by setting \raw{MPRPC} and \raw{MPRFI}. See \path{mpr.doc} in
-the MPR distribution for details.
+Detection of some general mis-use of \raw{malloc} and \raw{free} is
+automatically performed if the program was compiled with MPR present.
+Tracing of allocations is enabled by setting \raw{MPRPC} and \raw{MPRFI}.
+See \path{mpr.doc} in the MPR distribution for details.
 
-No run-time overhead is incurred if memory debugging is included, but those
-environment variables are not set.
+Only little run-time overhead is incurred if memory debugging is included,
+but those environment variables are not set.
 
 
 \subsection{ATM tools}
diff -ur --new-file old/atm/doc/usage.txt new/atm/doc/usage.txt
--- old/atm/doc/usage.txt	Thu Mar 27 19:32:39 1997
+++ new/atm/doc/usage.txt	Fri Apr  4 22:31:12 1997
@@ -1,4 +1,4 @@
-Usage instructions  -  ATM on Linux, release 0.28 (pre-alpha)
+Usage instructions  -  ATM on Linux, release 0.29 (pre-alpha)
 -------------------------------------------------------------
 
 For updates of ATM on Linux, please check the Web page at  
@@ -17,12 +17,12 @@
 In order to install this package, you need 
 
   - the package itself  
-    ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.28.tar.gz  
+    ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.29.tar.gz  
   - the Linux kernel, version 2.0.25, e.g. from  
     ftp://ftp.cs.helsinki.fi/pub/Software/Linux/Kernel/v2.0/linux-2.0.25.tar.gz  
   - Perl, version 4 or 5 
-  - if you want memory debugging: MPR version 1.1, e.g. from  
-    ftp://sunsite.unc.edu/pub/Linux/devel/lang/c/mpr-1.1.tar.gz  
+  - if you want memory debugging: MPR version 1.5, e.g. from  
+    ftp://sunsite.unc.edu/pub/Linux/devel/lang/c/mpr-1.5.tar.gz  
 
 
 The source tree
@@ -33,7 +33,7 @@
 all the files listed above there. Then extract the ATM on Linux 
 distribution:
 
-tar xfz atm-0.28.tar.gz
+tar xfz atm-0.29.tar.gz
 
 and the kernel source:
 
@@ -145,23 +145,23 @@
 ----------------
 
 If you want to enable debugging for options for memory allocations, you 
-need to install MPR before compiling the ATM tools. Extract mpr-1.1.tar.gz 
+need to install MPR before compiling the ATM tools. Extract mpr-1.5.tar.gz 
 into a directory at the same level as linux and atm. Then do:
 
-cd mpr-1.1
-patch -p1 -s <../atm/mpr.patch
+cd mpr-1.5
+./configure x86-linux
 make
 install -c -m 0644 libmpr.a /usr/lib
 install -c -m 0755 mpr mprcc mprhi mprlk mprsz /usr/local/bin
-install -c -m 0755 mprfl mprnm mprpc /usr/local/bin
+install -c -m 0755 mprfl mprnm mprpc mprdem mprmap /usr/local/bin
 
-Detection of some general mis-use of  malloc  and  free  is enabled by 
-setting the environment variable  MCHECK . Tracing of allocations is 
-enabled by setting  MPRPC  and  MPRFI . See mpr.doc in the MPR distribution 
-for details.
+Detection of some general mis-use of  malloc  and  free  is automatically 
+performed if the program was compiled with MPR present. Tracing of 
+allocations is enabled by setting  MPRPC  and  MPRFI . See mpr.doc in the 
+MPR distribution for details.
 
-No run-time overhead is incurred if memory debugging is included, but those 
-environment variables are not set.
+Only little run-time overhead is incurred if memory debugging is included, 
+but those environment variables are not set.
 
 
 ATM tools
diff -ur --new-file old/atm/maint/zntune.c new/atm/maint/zntune.c
--- old/atm/maint/zntune.c	Thu Sep 26 20:43:30 1996
+++ new/atm/maint/zntune.c	Fri Apr  4 20:04:47 1997
@@ -1,6 +1,6 @@
 /* zntune.c - ZN122x free buffer pool tuning */
  
-/* Written 1995,1996 by Werner Almesberger, EPFL-LRC */
+/* Written 1995-1997 by Werner Almesberger, EPFL-LRC */
  
 
 #include <stdlib.h>
@@ -10,9 +10,8 @@
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <linux/atm.h>
-
 #include <sys/time.h> /* for struct timeval, although it's not used */
-#include "/usr/src/linux/drivers/atm/zatm.h"
+#include <linux/atm_zatm.h>
 
 
 static void usage(const char *name)
diff -ur --new-file old/atm/mkdist new/atm/mkdist
--- old/atm/mkdist	Thu Mar 20 13:38:38 1997
+++ new/atm/mkdist	Fri Apr  4 21:10:17 1997
@@ -110,6 +110,6 @@
     atm/config/redhat-4.0/atm atm/config/redhat-4.0/atm.init \
     atm/config/redhat-4.0/atmsigd.conf atm/config/redhat-4.0/ifcfg-atm0 \
     atm/config/redhat-4.0/ifup-atm \
-  atm/atm.patch atm/mpr.patch atm/atm-$VERSION-1.spec |
+  atm/atm.patch atm/atm-$VERSION-1.spec |
   gzip -9 >$ARCHDIR/atm-$VERSION.tar.gz
 #atm/bind-4.9.4.T4B.ATM.patch
diff -ur --new-file old/atm/mpr.patch new/atm/mpr.patch
--- old/atm/mpr.patch	Mon Sep  2 15:51:39 1996
+++ new/atm/mpr.patch	Thu Jan  1 01:00:00 1970
@@ -1,60 +0,0 @@
-diff -ur mpr-1.1/config/mprnm.linux mpr-1.1-elf/config/mprnm.linux
---- mpr-1.1/config/mprnm.linux	Tue May  7 02:45:49 1996
-+++ mpr-1.1-elf/config/mprnm.linux	Mon Sep  2 13:12:56 1996
-@@ -1,10 +1,16 @@
- #!/bin/sh
- 
- if test $# -ne 1; then
--	echo "usage: mprnm a.out" >&2
-+	echo "usage: mprnm a.out_or_elf" >&2
- 	exit 1
- fi
- 
-+if file $1 | grep ELF >/dev/null 2>&1; then
-+    offset=1
-+else
-+    offset=2
-+fi
-+
- nm -n $1 |
- 
- awk '
-@@ -21,7 +27,7 @@
- 	}
- 
- 	NF==3 && $2 ~ /T|t/ && $3 !~ /(\.o$)|(g(nu|cc).*compiled)/ {
--		print hex($1), substr($3, 2)
-+		print hex($1), substr($3, '$offset')
- 	}'
- 
- exit 0
-diff -ur mpr-1.1/config/mprpc.linux mpr-1.1-elf/config/mprpc.linux
---- mpr-1.1/config/mprpc.linux	Tue May  7 02:46:11 1996
-+++ mpr-1.1-elf/config/mprpc.linux	Mon Sep  2 13:11:34 1996
-@@ -1,10 +1,16 @@
- #!/bin/sh
- 
- if test $# -ne 1; then
--	echo "usage: mprpc a.out" >&2
-+	echo "usage: mprpc a.out_or_elf" >&2
- 	exit 1
- fi
- 
-+if file $1 | grep ELF >/dev/null 2>&1; then
-+    start=_start
-+else
-+    start=__entry
-+fi
-+
- nm -n $1 |
- 
- awk '
-@@ -20,7 +26,7 @@
- 		return d
- 	}
- 
--	NF==3 && $2 ~ /T|t/ && $3 ~ /^__entry$/ {
-+	NF==3 && $2 ~ /T|t/ && $3 ~ /^'$start'$/ {
- 		a=$1
- 		getline
- 		printf "%d:%d", hex(a), hex($1)-1
diff -ur --new-file old/atm/saal/sscop.c new/atm/saal/sscop.c
--- old/atm/saal/sscop.c	Wed Mar 26 17:38:43 1997
+++ new/atm/saal/sscop.c	Wed Apr  2 19:51:20 1997
@@ -116,10 +116,7 @@
 #define MOD24(x) ((x) & ((1 << 24)-1))
 #define INC24(v) (v = MOD24(v+1))
 #define INC8(v) (v = (v+1) & 255)
-#define NORMALIZE(x,b) ( \
-    (b) < (1 << 23) ? \
-      (x) < (b)+(1 << 23) ? (x)+(1 << 24) : x : \
-      (x) < (b)-(1 << 23) ? (x)+(1 << 24) : x)
+#define NORMALIZE(x,b) (((x)-(b)) & 0xffffff)
 #define NORM_RX(v) NORMALIZE((v),dsc->vr_r)
 #define NORM_TX(v) NORMALIZE((v),dsc->vt_a)
 
diff -ur --new-file old/atm/sigd/atmsigd.c new/atm/sigd/atmsigd.c
--- old/atm/sigd/atmsigd.c	Wed Mar 26 17:40:00 1997
+++ new/atm/sigd/atmsigd.c	Fri Apr  4 21:54:03 1997
@@ -27,17 +27,12 @@
 #define CONFIG_FILE "/etc/atmsigd.conf"
 
 
-#ifdef MEM_DEBUG
-extern int mpr(void);
-extern int mcheck (void (*)(int));
-#endif
-
 extern int yyparse(void);
 extern FILE *yyin;
 
 int net = 0;
 int debug = 0;
-int pretty = A2T_PRETTY | A2T_NAME;
+int pretty = A2T_PRETTY | A2T_NAME | A2T_LOCAL;
 int sig_pcr = -1; /* obsolete */
 const char *sig_qos = NULL;
 const char *dump_dir = NULL;
@@ -340,10 +335,6 @@
     char *end;
     int c,background;
 
-#ifdef MEM_DEBUG
-    if (getenv("MCHECK")) mcheck(0);
-    if (mpr() < 0) return 1;
-#endif
     set_application("atmsigd");
     config_file = CONFIG_FILE;
     dump_dir = NULL;
diff -ur --new-file old/atm/sigd/trace.c new/atm/sigd/trace.c
--- old/atm/sigd/trace.c	Tue Mar 11 20:17:50 1997
+++ new/atm/sigd/trace.c	Fri Apr  4 16:57:20 1997
@@ -111,7 +111,7 @@
     char buffer[MAX_ATM_ADDR_LEN+1];
 
     if (atm2text(buffer,MAX_ATM_ADDR_LEN+1,(struct sockaddr *) svc,
-      A2T_NAME | A2T_PRETTY) < 0) strcpy(buffer,"<invalid>");
+      A2T_NAME | A2T_LOCAL | A2T_PRETTY) < 0) strcpy(buffer,"<invalid>");
     append("%s\n",buffer);
 }