diff -ur --new-file old/atm/CHANGES new/atm/CHANGES --- old/atm/CHANGES Mon Sep 2 19:01:44 1996 +++ new/atm/CHANGES Mon Sep 9 19:42:24 1996 @@ -1,3 +1,42 @@ +Version 0.17 to 0.18 (9-SEP-1996) +==================== + +Bug fixes +--------- + + - atmsigd didn't respond to SETUP followed by RELEASE with a RELEASE COMPLETE + - atmsigd now implements incoming call rejection (as_indicate -> as_close) + - kernel now opens the VC before sending the as_accept. This a) allows to + check if the parameters are acceptable, and b) avoids a race condition + between the sender and the local VC open procedure, which frequently led to + loss of the beginning of the first PDU sent on a new connection. + - qdump: _q_parse used the wrong length when dumping variable-length fields, + yielding a fatal internal error + - clip didn't set rxtp.max_sdu + - svc_accept didn't set ATM_VF_HASQOS, so getsockopt SO_ATMQOS didn't work + (by Marko Kiiskila) + - ttcp_atm calculated Mbps as 2^20 bits/sec instead of 10^6, thereby making + all results come out approximately 5% too low (by Fraz Ahmad) + - added $(LDLIBS) to linking of lane/lecs (by Lawrence MacIntyre) + - interface number allocation in clip and atmarp did not check for collision + with the respective other name space + - atmarp's -c option didn't work when omitting the "atm" in the interface name + +New features +------------ + + - new man page: arequipad.8 + +Other changes +------------- + + - simplified the internal signaling protocol by adding the as_reject message + (sent by kernel in response to as_indicate; not acknowledged by demon) + - packets received from Arequipa are no longer forwarded to other hosts + - further ilmid improvements to use RSTADDR less frequently (by Gerald + Hanusch; with a slight modification) + + Version 0.16 to 0.17 (2-SEP-1996) ==================== diff -ur --new-file old/atm/README new/atm/README --- old/atm/README Mon Sep 2 17:44:17 1996 +++ new/atm/README Mon Sep 9 20:17:30 1996 @@ -1,4 +1,4 @@ -ATM on Linux, release 0.17 (pre-alpha) by Werner Almesberger, EPFL LRC +ATM on Linux, release 0.18 (pre-alpha) by Werner Almesberger, EPFL LRC ====================================== werner.almesberger@lrc.di.epfl.ch This is experimental software. There are known major bugs and certainly @@ -41,7 +41,9 @@ Performance (version 0.1) ----------- -THIS SECTION IS OBSOLETE AND BADLY NEEDS TO BE UPDATED. +THIS SECTION IS OBSOLETE AND BADLY NEEDS TO BE UPDATED. ALSO NOTE THAT MOST +OF THE THROUGHPUT MEASUREMENTS ARE TOO LOW BY 5% BECAUSE OF A BUG IN TTCP +THAT WAS ONLY RECENTLY DISCOVERED. Note that version 0.10 has some debugging code enabled in the ENI driver. It is therefore about 10% slower than indicated below. diff -ur --new-file old/atm/USAGE new/atm/USAGE --- old/atm/USAGE Mon Sep 2 18:39:11 1996 +++ new/atm/USAGE Mon Sep 9 20:19:42 1996 @@ -1,4 +1,4 @@ -Usage instructions - ATM on Linux, release 0.17 (pre-alpha) +Usage instructions - ATM on Linux, release 0.18 (pre-alpha) ------------------------------------------------------------- For updates of ATM on Linux, please check the Web page at @@ -17,7 +17,7 @@ In order to install this package, you need - the package itself - ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.17.tar.gz + ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.18.tar.gz - the Linux kernel, version 2.0.14, e.g. from ftp://ftp.cs.helsinki.fi/pub/Software/Linux/Kernel/v2.0/linux-2.0.14.tar.gz - Perl, version 4 or 5 @@ -33,7 +33,7 @@ all the files listed above there. Then extract the ATM on Linux distribution: -tar xfz atm-0.17.tar.gz +tar xfz atm-0.18.tar.gz and the kernel source: diff -ur --new-file old/atm/VERSION new/atm/VERSION --- old/atm/VERSION Fri Aug 30 20:13:25 1996 +++ new/atm/VERSION Wed Sep 4 19:58:57 1996 @@ -1 +1 @@ -0.17 +0.18 diff -ur --new-file old/atm/aqd/Makefile new/atm/aqd/Makefile --- old/atm/aqd/Makefile Mon Sep 2 19:41:05 1996 +++ new/atm/aqd/Makefile Wed Sep 4 19:58:26 1996 @@ -3,7 +3,7 @@ #INCLUDES= OBJS=arequipad.o io.o BOOTPGMS=arequipad -MAN8= +MAN8=arequipad.8 include ../Rules.make diff -ur --new-file old/atm/aqd/arequipad.8 new/atm/aqd/arequipad.8 --- old/atm/aqd/arequipad.8 Thu Jan 1 01:00:00 1970 +++ new/atm/aqd/arequipad.8 Wed Sep 4 19:58:01 1996 @@ -0,0 +1,36 @@ +.TH AREQUIPAD 8 "Sep 4, 1996" "Linux" "Maintenance Commands" +.SH NAME +arequipad \- Arequipa demon +.SH SYNOPSIS +.B atmsigd +.RB [ \-b ] +.RB [ \-d ] +.RB [ \-l\ \fIlogfile\fP ] +.RB [ \-n ] +.SH DESCRIPTION +\fBarequipad\fP assists the kernel in managing Arequipa connections. It +is required for any use of Arequipa. \fBarequipad\fP expects signaling +to be available (i.e. \fBatmsigd\fP to run) at start time. +.P +\fBarequipad\fP establishes a service access point (SAP) for incoming Arequipa +connections, accepts them, and registers them with the Arequipa entity in the +kernel. It also performs delayed close operations when Arequipa connections +are detached from within an interrupt. +.SH OPTIONS +.IP \fB\-b\fP +Run in background (i.e. in a forked child process) after initializing. +.IP \fB\-d\fP +Enables (lots of) debugging output. By default, \fBarequipad\fP is very +quiet. +.IP \fB\-l\ \fIlogfile\fP +Write diagnostic messages to the specified file instead of to standard +error. The special name \fBsyslog\fP is used to send diagnostics to the +system logger. +.IP \fB\-n\fP +Prints addresses in numeric format only, i.e. no address to name translation +is attempted. +.SH AUTHOR +Werner Almesberger, EPFL LRC +.SH "SEE ALSO" +atmsigd(8) +.\"{{{}}} diff -ur --new-file old/atm/atm.patch new/atm/atm.patch --- old/atm/atm.patch Mon Sep 2 20:21:43 1996 +++ new/atm/atm.patch Mon Sep 9 20:37:01 1996 @@ -215,7 +215,7 @@ endif ifeq ($(CONFIG_AP1000),y) ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/Config.in Wed Aug 21 10:55:36 1996 @@ -0,0 +1,21 @@ +# @@ -259,7 +259,7 @@ + bool ' LANE support' CONFIG_ATM_LANE y +fi endmenu ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/Makefile Thu Aug 29 13:50:20 1996 @@ -0,0 +1,47 @@ +# File: drivers/atm/Makefile @@ -309,7 +309,7 @@ +EXTRA_CFLAGS=-g + +include $(TOPDIR)/Rules.make ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/atmdev_init.c Wed Aug 21 10:55:36 1996 @@ -0,0 +1,47 @@ +/* drivers/atm/atmdev_init.c - ATM device driver initialization */ @@ -359,7 +359,7 @@ +#endif + return devs; +} ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/atmtcp.c Wed Aug 21 10:55:37 1996 @@ -0,0 +1,316 @@ +/* drivers/atm/atmtcp.c - ATM over TCP "device" driver */ @@ -678,7 +678,7 @@ +} + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/eni.c Thu Aug 29 13:41:36 1996 @@ -0,0 +1,1954 @@ +/* drivers/atm/eni.c - Efficient Networks ENI155P device driver */ @@ -2635,8 +2635,8 @@ +} + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/drivers/atm/eni.h Mon Sep 2 19:21:23 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/drivers/atm/eni.h Mon Sep 9 18:53:03 1996 @@ -0,0 +1,113 @@ +/* drivers/atm/eni.h - Efficient Networks ENI155P device driver declarations */ + @@ -2751,7 +2751,7 @@ +#endif /* __KERNEL__ */ + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/midway.h Wed Aug 21 10:55:38 1996 @@ -0,0 +1,265 @@ +/* drivers/atm/midway.h - Efficient Networks Midway (SAR) description */ @@ -3019,7 +3019,7 @@ +#define MID_DT_HWORD 0x2 + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/suni.c Thu Aug 29 15:21:02 1996 @@ -0,0 +1,298 @@ +/* drivers/atm/suni.c - PMC SUNI (PHY) driver */ @@ -3320,8 +3320,8 @@ +} + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/drivers/atm/suni.h Mon Sep 2 19:21:23 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/drivers/atm/suni.h Mon Sep 9 18:53:03 1996 @@ -0,0 +1,219 @@ +/* drivers/atm/suni.h - PMC SUNI (PHY) declarations */ + @@ -3542,7 +3542,7 @@ +#endif + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/tonga.h Wed Aug 21 10:55:39 1996 @@ -0,0 +1,20 @@ +/* drivers/atm/tonga.h - Efficient Networks Tonga (PCI bridge) declarations */ @@ -3565,7 +3565,7 @@ +#define SEPROM_ESI_BASE 64 /* start of ESI in serial EEPROM */ + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/uPD98401.h Wed Aug 21 10:55:39 1996 @@ -0,0 +1,292 @@ +/* drivers/atm/uPD98401.h - NEC uPD98401 (SAR) declarations */ @@ -3860,7 +3860,7 @@ +#define uPD98401_RXLT_ENBL 0x8000 /* Enable */ + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/uPD98402.h Wed Aug 21 10:55:39 1996 @@ -0,0 +1,106 @@ +/* drivers/atm/uPD98402.h - NEC uPD98402 (PHY) declarations */ @@ -3969,7 +3969,7 @@ +int uPD98402_init(struct atm_dev *dev); + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/uPD98402.c Thu Aug 29 15:19:33 1996 @@ -0,0 +1,228 @@ +/* drivers/atm/uPD98402.c - NEC uPD98402 (PHY) declarations */ @@ -4200,7 +4200,7 @@ +} + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/zatm.c Thu Aug 29 13:41:42 1996 @@ -0,0 +1,1659 @@ +/* drivers/atm/zatm.c - ZeitNet ZN122x device driver */ @@ -5862,8 +5862,8 @@ +} + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/drivers/atm/zatm.h Mon Sep 2 19:21:23 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/drivers/atm/zatm.h Mon Sep 9 18:53:32 1996 @@ -0,0 +1,128 @@ +/* drivers/atm/zatm.h - ZeitNet ZN122x device driver declarations */ + @@ -5993,7 +5993,7 @@ + +#endif __KERNEL__ +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/zeprom.h Wed Aug 21 10:55:41 1996 @@ -0,0 +1,34 @@ +/* drivers/atm/zeprom.h - ZeitNet ZN122x EEPROM (NM93C46) declarations */ @@ -6030,7 +6030,7 @@ +/* No other commands are needed. */ + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/tneta1570.h Wed Aug 21 10:55:41 1996 @@ -0,0 +1,310 @@ +/* drivers/atm/tneta1570.h - TI TNETA1570 (SAR) declarations */ @@ -6343,7 +6343,7 @@ + +#endif __KERNEL__ +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/tneta1570.c Wed Aug 21 10:55:42 1996 @@ -0,0 +1,1479 @@ +/* drivers/atm/tneta1570.c - ti tneta1570 atm driver */ @@ -7825,7 +7825,7 @@ + } + return index; +} ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/drivers/atm/fore200.c Wed Aug 21 10:55:43 1996 @@ -0,0 +1,26 @@ +/* drivers/atm/fore200.c - This is just a test, not a real driver */ @@ -7854,7 +7854,7 @@ + } + return 0; +} ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/include/linux/atm.h Mon Sep 2 11:44:50 1996 @@ -0,0 +1,217 @@ +/* atm.h - general ATM declarations */ @@ -8074,8 +8074,8 @@ +#endif /* __KERNEL__ */ + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/include/linux/atmclip.h Mon Sep 2 19:21:54 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/include/linux/atmclip.h Mon Sep 9 18:58:20 1996 @@ -0,0 +1,37 @@ +/* atmclip.h - Classical IP over ATM */ + @@ -8114,8 +8114,8 @@ +#endif /* __KERNEL__ */ + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/include/linux/atmdev.h Mon Sep 2 19:24:59 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/include/linux/atmdev.h Mon Sep 9 18:45:07 1996 @@ -0,0 +1,242 @@ +/* atmdev.h - ATM device driver declarations */ + @@ -8359,7 +8359,7 @@ +#endif /* __KERNEL__ */ + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/include/linux/atmsap.h Wed Aug 21 10:55:44 1996 @@ -0,0 +1,129 @@ +/* atmsap.h - ATM Service Access Point addressing definitions */ @@ -8492,7 +8492,7 @@ + +#endif --- ref/include/linux/skbuff.h Tue Aug 20 17:09:42 1996 -+++ work/include/linux/skbuff.h Mon Sep 2 19:25:06 1996 ++++ work/include/linux/skbuff.h Mon Sep 9 18:45:07 1996 @@ -112,6 +112,16 @@ unsigned char *end; /* End pointer */ void (*destructor)(struct sk_buff *); /* Destruct function */ @@ -8510,7 +8510,7 @@ }; #ifdef CONFIG_SKB_LARGE ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/include/linux/sonet.h Wed Aug 21 10:55:45 1996 @@ -0,0 +1,52 @@ +/* sonet.h - SONET/SHD physical layer control */ @@ -8565,9 +8565,9 @@ +#define SONET_FRSENSE_SIZE 6 /* C1[3],H1[3] (0xff for unknown) */ + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/include/linux/atmsvc.h Mon Sep 2 19:12:44 1996 -@@ -0,0 +1,75 @@ +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/include/linux/atmsvc.h Wed Sep 4 15:32:45 1996 +@@ -0,0 +1,51 @@ +/* atmsvc.h - ATM signaling kernel-demon interface definitions */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -8583,8 +8583,8 @@ +#define ATMSIGD_CTRL _IO('a',ATMIOC_SPECIAL) + /* become ATM signaling demon control socket */ + -+enum atmsvc_msg_type { as_catch_null,as_bind,as_connect,as_accept,as_listen, -+ as_okay,as_error,as_indicate,as_close,as_itf_notify }; ++enum atmsvc_msg_type { as_catch_null,as_bind,as_connect,as_accept,as_reject, ++ as_listen,as_okay,as_error,as_indicate,as_close,as_itf_notify }; + +struct atmsvc_msg { + enum atmsvc_msg_type type; @@ -8605,31 +8605,7 @@ +}; + +/* -+ * Message contents: -+ * -+ * Message Dir vcc listen_vcc reply aal pvc --svc-- local -+ * addr *xtp addr sap *xtp addr -+ * bind K->D X - - - - - X X - - -+ * - okay D->K X - - - - - X X - - -+ * connect K->D X - - X - - X X X X -+ * - okay D->K X - - - X X - - - X -+ * listen K->D X - - X - - X X X - -+ * - okay D->K X - - - - - - - - - -+ * indicate D->K - X - - X 1 X X X - -+ * accept K->D X X - - - - - - - - -+ * - okay D->K X - - - - - - - - X -+ * close K->D X - - - - - - - - - -+ * close D->K X - X - - - - - - - -+ * -+ * 1 same value as in svc.*xtp -+ * -+ * Note: we may have to get rid of the PVC part in indicate messages later, -+ * so it's a good idea not to depend on it too heavily. -+ */ -+ -+/* -+ * In an as_itf_update message, only the fields type and pvc.sas_addr.itf are -+ * valid. ++ * Message contents: see ftp://lrcftp.epfl.ch/pub/linux/atm/docs/isp-*.tar.gz + */ + +/* @@ -8643,7 +8619,7 @@ + (tp).max_pcr : (tp).min_pcr) + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/include/linux/atmioc.h Wed Aug 21 10:55:45 1996 @@ -0,0 +1,32 @@ +/* atmioc.h - ranges for ATM-related ioctl numbers */ @@ -8701,7 +8677,7 @@ endif ifeq ($(CONFIG_INET),y) ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/Makefile Wed Aug 21 10:55:46 1996 @@ -0,0 +1,54 @@ +# @@ -8758,9 +8734,9 @@ + + +include $(TOPDIR)/Rules.make ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/clip.c Wed Aug 21 10:55:46 1996 -@@ -0,0 +1,115 @@ +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/clip.c Mon Sep 9 14:04:35 1996 +@@ -0,0 +1,116 @@ +/* net/atm/clip.c - Classical IP over ATM */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -8794,8 +8770,7 @@ +#endif + + -+ -+static int pvc_num = 0; ++struct clip_priv *old_clip_devs; + + +/*static*/ void atm_push_clip(struct atm_vcc *vcc,struct sk_buff *skb) @@ -8854,7 +8829,6 @@ +int atm_init_clip(struct atm_vcc *vcc) +{ + struct device *dev; -+ int number; + + DPRINTK("atm_init_clip\n"); + if (!suser()) return -EPERM; @@ -8868,15 +8842,18 @@ + if (!dev) return -ENOMEM; + memset(dev,0,sizeof(struct device)+sizeof(struct clip_priv)); + dev->name = CLIP(dev)->name; -+ number = pvc_num++; -+ sprintf(dev->name,"atm%d",number); ++ CLIP(dev)->number = ipcom_pick_number(-1); ++ sprintf(dev->name,"atm%d",CLIP(dev)->number); + dev->init = clip_init; + CLIP(dev)->vcc = vcc; + if (register_netdev(dev)) return -EIO; ++ /* if register_netdev can sleep, we race on ->number */ ++ CLIP(dev)->next = old_clip_devs; ++ old_clip_devs = CLIP(dev); + DPRINTK("registered %s,0x%lx\n",dev->name,(unsigned long) vcc); -+ return number; ++ return CLIP(dev)->number; +} ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/common.c Sat Aug 31 14:34:48 1996 @@ -0,0 +1,900 @@ +/* net/atm/common.c - ATM sockets (common part for PVC and SVC) */ @@ -9779,7 +9756,7 @@ + if (!vcc->dev || !vcc->dev->ops->getsockopt) return -EINVAL; + return vcc->dev->ops->getsockopt(vcc,level,optname,optval,optlen); +} ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/common.h Wed Aug 21 10:55:47 1996 @@ -0,0 +1,32 @@ +/* net/atm/common.h - ATM sockets (common part for PVC and SVC) */ @@ -9814,7 +9791,7 @@ +void svc_callback(struct atm_vcc *vcc); + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/dev.c Wed Aug 21 10:55:47 1996 @@ -0,0 +1,38 @@ +/* net/atm/dev.c - ATM device registeration */ @@ -9855,7 +9832,7 @@ +{ + free_atm_dev(dev); +} ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/pvc.c Wed Aug 21 10:55:47 1996 @@ -0,0 +1,162 @@ +/* net/atm/pvc.c - ATM PVC sockets */ @@ -10020,7 +9997,7 @@ + (void) atm_init_arequipa(); +#endif +} ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/static.c Wed Aug 21 10:55:47 1996 @@ -0,0 +1,114 @@ +/* net/atm/static.c - Staticly allocated resources */ @@ -10137,8 +10114,8 @@ + for (i = 0; i < MAX_ATM_VCC; i++) + if (atm_vcc[i].family) fn(atm_vcc+i); +} ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/static.h Mon Sep 2 19:21:54 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/static.h Mon Sep 9 18:58:20 1996 @@ -0,0 +1,29 @@ +/* net/atm/static.h - Staticly allocated resources */ + @@ -10169,9 +10146,9 @@ +void for_all_vccs(void (*fn)(struct atm_vcc *vcc)); + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/svc.c Mon Sep 2 20:17:27 1996 -@@ -0,0 +1,598 @@ +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/svc.c Thu Sep 5 21:43:21 1996 +@@ -0,0 +1,601 @@ +/* net/atm/svc.c - ATM SVC sockets */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -10252,9 +10229,8 @@ + while ((skb = skb_dequeue(&vcc->listenq))) { + vcc->flags &= ~ATM_VF_RELEASED; + DPRINTK("LISTEN REL\n"); -+ sigd_enq(NULL,as_close,vcc,NULL,NULL); /* reject */ -+ while (!(vcc->flags & ATM_VF_RELEASED) && sigd) -+ sleep_on(&vcc->sleep); ++ sigd_enq(NULL,as_reject,vcc,NULL,NULL); /* @@@ should include ++ the reason */ + dev_kfree_skb(skb,FREE_WRITE); + } + vcc->flags &= ~(ATM_VF_REGIS | ATM_VF_RELEASED); /* may retry later */ @@ -10457,31 +10433,35 @@ + } + /* should try to atm_connect now and possibly send a close on + error */ ++ msg = (struct atmsvc_msg *) skb->data; ++ new_vcc->qos = msg->qos; ++ new_vcc->flags |= ATM_VF_HASQOS; ++ new_vcc->remote = msg->svc; ++ /* copy BLLI @@@ */ ++ new_vcc->remote.sas_addr.blli = NULL; ++ error = atm_connect(newsock,msg->pvc.sap_addr.itf, ++ msg->pvc.sap_addr.vpi,msg->pvc.sap_addr.vci); ++ dev_kfree_skb(skb,FREE_WRITE); ++ if (error) { ++ sigd_enq(NULL,as_reject,old_vcc,NULL,NULL); ++ /* @@@ should include the reason */ ++ return error == -EAGAIN ? -EBUSY : error; ++ } + /* wait should be short, so we ignore the non-blocking flag */ + new_vcc->reply = WAITING; + sigd_enq(new_vcc,as_accept,old_vcc,NULL,NULL); + while (new_vcc->reply == WAITING && sigd) + sleep_on(&new_vcc->sleep); -+ if (!sigd) return -EUNATCH; ++ if (!sigd) { ++ atm_release_vcc(new_vcc,1); ++ return -EUNATCH; ++ } + old_vcc->backlog_quota++; + if (!new_vcc->reply) break; -+ dev_kfree_skb(skb,FREE_WRITE); -+ if (new_vcc->reply != -ERESTARTSYS) return new_vcc->reply; -+ } -+ if (!sigd) return -EUNATCH; -+ msg = (struct atmsvc_msg *) skb->data; -+ new_vcc->qos = msg->qos; -+ new_vcc->remote = msg->svc; -+ /* copy BLLI @@@ */ -+ new_vcc->remote.sas_addr.blli = NULL; -+ error = atm_connect(newsock,msg->pvc.sap_addr.itf,msg->pvc.sap_addr.vpi, -+ msg->pvc.sap_addr.vci); -+ dev_kfree_skb(skb,FREE_WRITE); -+ if (error) { -+ (void) svc_disconnect(ATM_SD(newsock)); -+ /* @@@ or should we try additional connections just until -+ we'd block ? (then we MUST return) */ -+ return error == -EAGAIN ? -EBUSY : error; ++ if (new_vcc->reply != -ERESTARTSYS) { ++ atm_release_vcc(new_vcc,1); ++ return new_vcc->reply; ++ } + } + newsock->state = SS_CONNECTED; + return 0; @@ -10770,8 +10750,8 @@ + return; + } +} ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/signaling.c Wed Aug 21 11:42:32 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/signaling.c Wed Sep 4 18:49:50 1996 @@ -0,0 +1,219 @@ +/* net/atm/signaling.c - ATM signaling */ + @@ -10992,8 +10972,8 @@ + wake_up(&sigd_sleep); + return 0; +} ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/signaling.h Mon Sep 2 19:21:54 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/signaling.h Mon Sep 9 18:58:20 1996 @@ -0,0 +1,25 @@ +/* net/atm/signaling.h - ATM signaling */ + @@ -11020,9 +11000,9 @@ +int sigd_attach(struct atm_vcc *vcc); + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/atmarp.c Wed Aug 21 11:42:49 1996 -@@ -0,0 +1,608 @@ +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/atmarp.c Mon Sep 9 13:23:35 1996 +@@ -0,0 +1,600 @@ +/* atmarp.c - RFC1577 ATM ARP */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -11505,18 +11485,10 @@ + +int clip_create(int number) /* remove by downing */ +{ -+ struct device *dev,*walk; ++ struct device *dev; + -+ if (number != -1) { -+ for (walk = clip_devs; walk; walk = PRIV(walk)->next) -+ if (PRIV(walk)->number == number) return -EEXIST; -+ } -+ else { -+ number = 0; -+ for (walk = clip_devs; walk; walk = PRIV(walk)->next) -+ if (PRIV(walk)->number >= number) -+ number = PRIV(walk)->number+1; -+ } ++ number = ipcom_pick_number(number); ++ if (number < 0) return number; + dev = kmalloc(sizeof(struct device)+sizeof(struct atmarp_priv), + GFP_KERNEL); + if (!dev) return -ENOMEM; @@ -11631,9 +11603,9 @@ + register_netdevice_notifier(&clip_dev_notifier); + return 0; +} ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/atmarp.h Mon Sep 2 19:21:54 1996 -@@ -0,0 +1,54 @@ +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/atmarp.h Mon Sep 9 18:58:20 1996 +@@ -0,0 +1,53 @@ +/* net/atm/atmarp.h - RFC1577 ATM ARP */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -11678,7 +11650,6 @@ +}; + + -+extern struct device *clip_devs; +extern struct atm_vcc *atmarpd; /* ugly */ + + @@ -11688,9 +11659,9 @@ +int atmarp_encap(struct atm_vcc *vcc,int mode); + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/ipcommon.h Mon Sep 2 19:22:13 1996 -@@ -0,0 +1,66 @@ +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/ipcommon.h Mon Sep 9 18:59:12 1996 +@@ -0,0 +1,73 @@ +/* net/atm/ipcommon.h - Common items for all ways of doing IP over ATM */ + +/* Written 1996 by Werner Almesberger, EPFL LRC */ @@ -11708,18 +11679,24 @@ + + +extern const unsigned char llc_oui[6]; ++extern struct device *clip_devs; + + +#define CLIP(dev) ((struct clip_priv *) ((struct device *) (dev)+1)) + + +struct clip_priv { -+ char name[8]; ++ char name[8]; /* interface name */ ++ int number; /* for convenience ... */ + struct atm_vcc *vcc; + struct enet_statistics stats; ++ struct clip_priv *next; /* next CLIP interface */ +}; + + ++extern struct clip_priv *old_clip_devs; ++ ++ +static inline void ipcom_push(struct sk_buff *skb) +{ + skb->mac.raw = skb->data; @@ -11755,11 +11732,12 @@ +void ipcom_init(struct device *dev, + int (*hard_start_xmit)(struct sk_buff *skb,struct device *dev), + unsigned short extra_flags); ++int ipcom_pick_number(int number); + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/ipcommon.c Mon Sep 2 20:21:21 1996 -@@ -0,0 +1,181 @@ +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/ipcommon.c Mon Sep 9 20:07:49 1996 +@@ -0,0 +1,214 @@ +/* net/atm/ipcommon.c - Common items for all ways of doing IP over ATM */ + +/* Written 1996 by Werner Almesberger, EPFL LRC */ @@ -11775,6 +11753,7 @@ + +#include "common.h" +#include "ipcommon.h" ++#include "atmarp.h" + + +#if 0 @@ -11941,7 +11920,39 @@ + memset(&CLIP(dev)->stats,0,sizeof(struct enet_statistics)); + +} ---- /dev/null Mon Sep 2 20:10:22 1996 ++ ++ ++int ipcom_pick_number(int number) ++{ ++#ifdef CONFIG_ATM_ATMARP ++ struct device *atmarp; ++#endif ++#ifdef CONFIG_ATM_CLIP ++ struct clip_priv *clip; ++#endif ++ ++ if (number != -1) { ++#ifdef CONFIG_ATM_ATMARP ++ for (atmarp = clip_devs; atmarp; atmarp = PRIV(atmarp)->next) ++ if (PRIV(atmarp)->number == number) return -EEXIST; ++#endif ++ } ++ else { ++ number = 0; ++ ++#ifdef CONFIG_ATM_ATMARP ++ for (atmarp = clip_devs; atmarp; atmarp = PRIV(atmarp)->next) ++ if (PRIV(atmarp)->number >= number) ++ number = PRIV(atmarp)->number+1; ++#endif ++#ifdef CONFIG_ATM_CLIP ++ for (clip = old_clip_devs; clip; clip = clip->next) ++ if (clip->number >= number) number = clip->number+1; ++#endif ++ } ++ return number; ++} +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/arequipa.c Wed Aug 21 10:55:50 1996 @@ -0,0 +1,367 @@ +/* net/atm/arequipa.c - Application requested IP over ATM */ @@ -12311,7 +12322,7 @@ + return 0; + +} ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/tunable.h Wed Aug 21 10:55:50 1996 @@ -0,0 +1,26 @@ +/* net/atm/tunable.h - Tunable parameters of ATM support */ @@ -12423,7 +12434,7 @@ #endif { NULL, NULL } /* End marker */ }; ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/mmuio.c Wed Aug 21 10:55:51 1996 @@ -0,0 +1,455 @@ +/* net/atm/mmuio.c - MMU-supported high-speed I/O */ @@ -12881,8 +12892,8 @@ +} + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/include/linux/mmuio.h Mon Sep 2 19:21:54 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/include/linux/mmuio.h Mon Sep 9 18:58:20 1996 @@ -0,0 +1,25 @@ +/* mmuio.h - MMU-supported high-speed I/O */ + @@ -12909,7 +12920,7 @@ +#endif + +#endif ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/raw.c Wed Aug 21 10:55:52 1996 @@ -0,0 +1,139 @@ +/* net/atm/raw.c - Raw AAL0 and AAL5 transports */ @@ -13051,7 +13062,7 @@ + vcc->push_oam = NULL; + return 0; +} ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/protocols.h Wed Aug 21 10:55:52 1996 @@ -0,0 +1,17 @@ +/* net/atm/protocols.h - ATM protocol handler entry points */ @@ -13072,7 +13083,7 @@ + +#endif --- ref/include/linux/netdevice.h Tue Aug 20 17:11:35 1996 -+++ work/include/linux/netdevice.h Mon Sep 2 19:25:06 1996 ++++ work/include/linux/netdevice.h Mon Sep 9 18:45:07 1996 @@ -185,6 +185,8 @@ int (*set_mac_address)(struct device *dev, void *addr); #define HAVE_PRIVATE_IOCTL @@ -13091,7 +13102,7 @@ extern void tr_setup(struct device *dev); extern int ether_config(struct device *dev, struct ifmap *map); /* Support for loadable net-drivers */ ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/include/linux/atmarp.h Mon Sep 2 19:12:43 1996 @@ -0,0 +1,98 @@ +/* atmarp.h - ATM ARP protocol and kernel-demon interface definitions */ @@ -13242,8 +13253,32 @@ tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, IPPROTO_TCP, sk->opt, MAX_SYN_SIZE,sk->ip_tos,sk->ip_ttl,&sk->ip_route_cache); if (tmp < 0) +--- ref/net/ipv4/ip_forward.c Wed Aug 7 12:59:29 1996 ++++ work/net/ipv4/ip_forward.c Mon Sep 9 19:04:51 1996 +@@ -39,6 +39,9 @@ + #include + #include + #include ++#ifdef CONFIG_AREQUIPA ++#include ++#endif + + #ifdef CONFIG_IP_FORWARD + #ifdef CONFIG_IP_MROUTE +@@ -150,7 +153,11 @@ + iph->check = checksum; + } + ++#ifndef CONFIG_AREQUIPA + if (iph->ttl <= 0) ++#else ++ if (iph->ttl <= 0 || dev == arequipa_dev) ++#endif + { + /* Tell the sender its packet died... */ + icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, 0, dev); --- ref/include/linux/proc_fs.h Tue Aug 20 17:09:42 1996 -+++ work/include/linux/proc_fs.h Mon Sep 2 19:25:10 1996 ++++ work/include/linux/proc_fs.h Mon Sep 9 18:45:07 1996 @@ -34,6 +34,7 @@ PROC_KSYMS, PROC_DMA, @@ -13365,9 +13400,9 @@ case PROC_KCORE: inode->i_mode = S_IFREG | S_IRUSR; inode->i_op = &proc_kcore_inode_operations; ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/proc.c Wed Aug 21 10:55:56 1996 -@@ -0,0 +1,484 @@ +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/proc.c Mon Sep 9 14:02:17 1996 +@@ -0,0 +1,485 @@ +/* net/atm/proc.c - ATM /proc interface */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -13392,6 +13427,7 @@ + +#include "static.h" /* ugly */ +#include "signaling.h" /* to get sigd - ugly too */ ++#include "ipcommon.h" +#include "atmarp.h" + +#ifdef CONFIG_ATM_LANE @@ -14061,7 +14097,7 @@ /* * Called once on startup. */ ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/include/linux/atmlec.h Mon Sep 2 19:12:44 1996 @@ -0,0 +1,58 @@ +/* @@ -14122,7 +14158,7 @@ + unsigned char receive; /* 1= receive vcc, 0 = send_vcc */ +}; +#endif /* _ATMLEC_H_ */ ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/lec.c Wed Aug 21 11:42:09 1996 @@ -0,0 +1,612 @@ +/* @@ -14737,8 +14773,8 @@ + + return 0; +} ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/lec.h Mon Sep 2 19:21:54 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/lec.h Mon Sep 9 18:58:20 1996 @@ -0,0 +1,53 @@ +/* + * @@ -14793,7 +14829,7 @@ +void lec_push(struct atm_vcc *vcc, struct sk_buff *skb); +#endif _LEC_H_ + ---- /dev/null Mon Sep 2 20:10:22 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 +++ work/net/atm/lec_arpc.c Wed Aug 21 11:06:48 1996 @@ -0,0 +1,1116 @@ +#include @@ -15912,8 +15948,8 @@ + lec_arp_unlock(); +} + ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/net/atm/lec_arpc.h Mon Sep 2 19:21:54 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/net/atm/lec_arpc.h Mon Sep 9 18:58:20 1996 @@ -0,0 +1,104 @@ +/* + * Lec arp cache @@ -16020,7 +16056,7 @@ + +#endif --- ref/include/net/route.h Tue Aug 20 17:14:55 1996 -+++ work/include/net/route.h Mon Sep 2 19:24:10 1996 ++++ work/include/net/route.h Mon Sep 9 18:57:34 1996 @@ -26,6 +26,7 @@ #define _ROUTE_H @@ -16084,7 +16120,7 @@ #endif /* _ROUTE_H */ --- ref/include/net/sock.h Tue Aug 20 17:11:40 1996 -+++ work/include/net/sock.h Mon Sep 2 19:25:06 1996 ++++ work/include/net/sock.h Mon Sep 9 18:45:07 1996 @@ -301,7 +301,13 @@ int ip_mc_loop; /* Loopback */ char ip_mc_name[MAX_ADDR_LEN];/* Multicast device name */ @@ -16100,8 +16136,8 @@ /* * This part is used for the timeout functions (timer.c). ---- /dev/null Mon Sep 2 20:10:22 1996 -+++ work/include/linux/arequipa.h Mon Sep 2 19:21:54 1996 +--- /dev/null Mon Sep 9 20:17:39 1996 ++++ work/include/linux/arequipa.h Mon Sep 9 18:58:20 1996 @@ -0,0 +1,45 @@ +/* arequipa.h - Arequipa interface definitions */ + diff -ur --new-file old/atm/doc/usage.tex new/atm/doc/usage.tex --- old/atm/doc/usage.tex Mon Sep 2 18:38:51 1996 +++ new/atm/doc/usage.tex Mon Sep 9 20:17:56 1996 @@ -1,7 +1,7 @@ %%def%:= %:\begin{verbatim} -%:Usage instructions - ATM on Linux, release 0.17 (pre-alpha) +%:Usage instructions - ATM on Linux, release 0.18 (pre-alpha) %:------------------------------------------------------------- %: %:\end{verbatim} @@ -38,7 +38,7 @@ \title{ATM on Linux \\ User's guide \\ - Release 0.17 (pre-alpha)} + Release 0.18 (pre-alpha)} \author{Werner Almesberger \\ {\tt werner.almesberger@lrc.di.epfl.ch} \\ \\ @@ -81,7 +81,7 @@ 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.17.tar.gz} + \url{ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.18.tar.gz} \item the Linux kernel, version 2.0.14, e.g. from \url{ftp://ftp.cs.helsinki.fi/pub/Software/Linux/Kernel/v2.0/linux-2.0.14.tar.gz} \item Perl, version 4 or 5 @@ -98,7 +98,7 @@ distribution: \begin{verbatim} -tar xfz atm-0.17.tar.gz +tar xfz atm-0.18.tar.gz \end{verbatim} and the kernel source: diff -ur --new-file old/atm/doc/usage.txt new/atm/doc/usage.txt --- old/atm/doc/usage.txt Mon Sep 2 18:39:11 1996 +++ new/atm/doc/usage.txt Mon Sep 9 20:19:42 1996 @@ -1,4 +1,4 @@ -Usage instructions - ATM on Linux, release 0.17 (pre-alpha) +Usage instructions - ATM on Linux, release 0.18 (pre-alpha) ------------------------------------------------------------- For updates of ATM on Linux, please check the Web page at @@ -17,7 +17,7 @@ In order to install this package, you need - the package itself - ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.17.tar.gz + ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.18.tar.gz - the Linux kernel, version 2.0.14, e.g. from ftp://ftp.cs.helsinki.fi/pub/Software/Linux/Kernel/v2.0/linux-2.0.14.tar.gz - Perl, version 4 or 5 @@ -33,7 +33,7 @@ all the files listed above there. Then extract the ATM on Linux distribution: -tar xfz atm-0.17.tar.gz +tar xfz atm-0.18.tar.gz and the kernel source: diff -ur --new-file old/atm/ilmid/Makefile new/atm/ilmid/Makefile --- old/atm/ilmid/Makefile Thu Jul 18 21:38:16 1996 +++ new/atm/ilmid/Makefile Fri Sep 6 16:22:19 1996 @@ -1,6 +1,6 @@ CC = cc CFLAGS = -O -LIBS = -L../lib -latmd -Lasn1 -lasn1 +LIBS = -L../lib -latmd -latm -Lasn1 -lasn1 DEFINES = -DVERSION=\"`cat ../VERSION`\" INCLUDES = -I../lib -Iasn1 SRCS = rfc1157_snmp.c rfc1155_smi.c util.c io.c message.c \ diff -ur --new-file old/atm/ilmid/io.c new/atm/ilmid/io.c --- old/atm/ilmid/io.c Mon Sep 2 11:48:32 1996 +++ new/atm/ilmid/io.c Mon Sep 9 16:57:43 1996 @@ -43,6 +43,7 @@ #include #include "io.h" #include "atmd.h" +#include "atm.h" #define SNMP_VCI 16 #define COMPONENT "IO" @@ -91,6 +92,7 @@ { struct atmif_sioc req; struct sockaddr_atmsvc addr, ouraddr[MAX_EXTRA_ADDRS+1]; + char buffer[MAX_ATM_ADDR_LEN+1]; int fd, m, n; addr.sas_family = AF_ATMSVC; @@ -124,30 +126,47 @@ if (ioctl(fd, ATM_GETADDR, &req) <0) diag(COMPONENT, DIAG_FATAL, "ioctl ATM_GETADDR: %s", strerror(errno)); - n = 1; + n = 0; + if (req.length && atm_equal(&addr, &ouraddr[0], ATM_ESA_LEN, 0)) { + diag(COMPONENT, DIAG_INFO, "Primary ATM Address did not change"); + n = 1; + } - for(m = 0; m < netprefix->octetLen; m++) - if(addr.sas_addr.prv[m] != ouraddr[0].sas_addr.prv[m]) - { n = 0; - break; - } - - if ((req.length == 0) || (n == 0)) { + if ((!(m = req.length)) || (!n)) { req.number = itf; req.arg = NULL; req.length = 0; - if(ioctl(fd, ATM_RSTADDR, &req) < 0) + if (ioctl(fd, ATM_RSTADDR, &req) < 0) diag(COMPONENT, DIAG_FATAL, "ioctl ATM_RSTADDR: %s", strerror(errno)); req.number = itf; req.arg = &addr; - req.length = sizeof(addr); - - if(ioctl(fd, ATM_ADDADDR, &req) < 0) + req.length = sizeof(addr); + + if (ioctl(fd, ATM_ADDADDR, &req) < 0) diag(COMPONENT, DIAG_FATAL, "ioctl ATM_ADDADDR: %s", strerror(errno)); - diag(COMPONENT, DIAG_INFO, "ATM NSAP Address set on local host"); + atm2text(buffer,MAX_ATM_ADDR_LEN+1,(struct sockaddr *) &addr, A2T_PRETTY); + + diag(COMPONENT, DIAG_INFO, "Primary ATM Address %s added local", buffer); + + for (n = 0; n < m/sizeof(addr); n++) { + + if(n > MAX_EXTRA_ADDRS-1) break; /* We have already registered "primary" NSAP */ + + req.number = itf; + req.arg = &ouraddr[n]; + req.length = sizeof(*ouraddr); + + atm2text(buffer,MAX_ATM_ADDR_LEN+1,(struct sockaddr *) &ouraddr[n], A2T_PRETTY); + + if (ioctl(fd, ATM_ADDADDR, &req) < 0) + diag(COMPONENT, DIAG_ERROR, "ioctl ATM_ADDADDR: %s", strerror(errno)); + else + diag(COMPONENT, DIAG_INFO, "Extra ATM Address %s added local", buffer); + + } } close(fd); diff -ur --new-file old/atm/ip/atmarp.c new/atm/ip/atmarp.c --- old/atm/ip/atmarp.c Sat Aug 31 20:29:38 1996 +++ new/atm/ip/atmarp.c Mon Sep 9 19:34:59 1996 @@ -100,7 +100,6 @@ if (argc != optind+1) usage(argv[0]); here = argv[optind]; if (strlen(here) > 3 && !strncmp(here,"atm",3)) here += 3; - else usage(argv[0]); req_num = strtoul(here,&end,10); if (*end || (here[0] == '0' && here[1])) { usage(argv[0]); diff -ur --new-file old/atm/ip/clip.c new/atm/ip/clip.c --- old/atm/ip/clip.c Sat Aug 31 14:17:07 1996 +++ new/atm/ip/clip.c Wed Sep 4 12:10:58 1996 @@ -52,10 +52,9 @@ else { qos.txtp.traffic_class = ATM_CBR; qos.txtp.min_pcr = atoi(argv[2]); - qos.txtp.max_sdu = RFC1626_MTU; } qos.rxtp.traffic_class = ATM_UBR; - qos.rxtp.max_sdu = RFC1626_MTU; + qos.txtp.max_sdu = qos.rxtp.max_sdu = RFC1626_MTU; if (setsockopt(s,SOL_ATM,SO_ATMQOS,&qos,sizeof(qos)) < 0) { perror("setsockopt SO_ATMQOS"); return 1; diff -ur --new-file old/atm/lane/Makefile new/atm/lane/Makefile --- old/atm/lane/Makefile Thu Aug 29 12:33:16 1996 +++ new/atm/lane/Makefile Mon Sep 9 20:36:43 1996 @@ -20,7 +20,6 @@ BUSOBJS = $(LESBUSOBJS) connect_bus.o LECSOBJS = lecs_db.o lecs_load.o lecs.o ldb.o mem_lecs.o atm_lecs.o OBJS = $(LESOBJS) $(BUSOBJS) $(LECSOBJS) -LDLIBS = -latm include ../Rules.make @@ -40,7 +39,7 @@ lecs: $(LECSOBJS) @echo "Linking $@" - @$(CC) $(LDFLAGS) -o $@ $(LECSOBJS) -latm + $(CC) $(LDFLAGS) -o $@ $(LECSOBJS) $(LDLIBS) clean: rm -f $(SYSPGMS) *.o *.d *~ .*~ core *.bak *.tar* *.errs load_lex.c \ diff -ur --new-file old/atm/lib/diag.c new/atm/lib/diag.c --- old/atm/lib/diag.c Thu Aug 29 18:31:14 1996 +++ new/atm/lib/diag.c Wed Sep 4 20:07:56 1996 @@ -80,6 +80,15 @@ } +void diag_fatal_debug_hook(void) +{ + /* + * Set a breakpoint here to catch fatal errors before they mess up the + * stack. + */ +} + + void vdiag(const char *component,int severity,const char *fmt,va_list ap) { COMPONENT *walk; @@ -103,6 +112,7 @@ fflush(log_to); } if (severity == DIAG_FATAL) { + diag_fatal_debug_hook(); fprintf(stderr,"Fatal error - Terminating\n"); exit(1); } diff -ur --new-file old/atm/mkdist new/atm/mkdist --- old/atm/mkdist Mon Sep 2 19:39:40 1996 +++ new/atm/mkdist Wed Sep 4 19:58:48 1996 @@ -91,4 +91,5 @@ atm/lane/packet.h atm/lane/timers.h atm/lane/timers.c atm/lane/units.c \ atm/lane/units.h \ atm/aqd/Makefile atm/aqd/arequipad.c atm/aqd/io.h atm/aqd/io.c \ + atm/aqd/arequipad.8 \ atm/atm.patch atm/mpr.patch | gzip -9 >$ARCHDIR/atm-$VERSION.tar.gz diff -ur --new-file old/atm/qgen/qlib.c new/atm/qgen/qlib.c --- old/atm/qgen/qlib.c Sat Aug 31 14:27:16 1996 +++ new/atm/qgen/qlib.c Wed Sep 4 20:41:01 1996 @@ -72,7 +72,7 @@ q_report(Q_DEBUG,"put %d %d %ld",pos,size,value); end = pos+size; if (((pos | size) & 7) && ((pos ^ (end-1)) & ~7)) - q_report(Q_FATAL,"unsupported alignment"); + q_report(Q_FATAL,"unsupported alignment (put %d,%d)",pos,size); if (size <= 8) { unsigned char *here; int shift; @@ -100,7 +100,7 @@ q_report(Q_DEBUG,"get %d %d ...",pos,size); end = pos+size; if (((pos | size) & 7) && ((pos ^ (end-1)) & ~7)) - q_report(Q_FATAL,"unsupported alignment"); + q_report(Q_FATAL,"unsupported alignment (get %d,%d)",pos,size); if (size <= 8) value = (table[pos >> 3] >> (pos & 7)) & ((1 << size)-1); else { table += pos >> 3; @@ -445,7 +445,7 @@ if (len <= 32) { const SYM_NAME *sym; - value = q_get(pos,pc[2] & 7,pc[3]); + value = q_get(pos,pc[2] & 7,len); if (!(sym = dump_fields[pc[-1]].sym)) DUMP(" %ld (0x%lx)\n",value,value); else { diff -ur --new-file old/atm/sigd/kernel.c new/atm/sigd/kernel.c --- old/atm/sigd/kernel.c Mon Sep 2 16:58:32 1996 +++ new/atm/sigd/kernel.c Thu Sep 5 15:10:31 1996 @@ -131,7 +131,6 @@ static void dispatch(SOCKET *sock,struct atmsvc_msg *msg) { - SOCKET *next; int error; switch (msg->type) { @@ -184,37 +183,33 @@ START_TIMER(sock,T303); new_state(sock,ss_connecting); return; - case as_accept: /* LISTENING only */ - if (sock->state != ss_listening) break; - /* becomes INDICATED or ZOMBIE */ - if (!sock->listen) { - diag(COMPONENT,DIAG_WARN, - "socket 0x%lx got accept with empty listen queue",msg->vcc); - return; - } - next = sock->listen; - sock->listen = next->listen; - next->listen = NULL; - if (next->state == ss_zombie) { + case as_accept: + if (sock->state == ss_zombie) { SEND_ERROR(msg->vcc,-ECONNRESET); /* -ERESTARTSYS ? */ - free_sock(next); + free_sock(sock); return; } - if (next->state != ss_indicated) { - sock = next; /* for error reporting */ - break; - } - next->id = msg->vcc; - error = send_connect(next); + if (sock->state != ss_indicated) break; + error = send_connect(sock); if (!error) { - START_TIMER(next,T313); - new_state(next,ss_accepting); + START_TIMER(sock,T313); + new_state(sock,ss_accepting); return; } - SEND_ERROR(next->id,error); - send_release(next,0); /* @@@ */ - START_TIMER(next,T308_1); - new_state(next,ss_wait_rel); + SEND_ERROR(sock->id,error); + send_release(sock,0); /* @@@ */ + START_TIMER(sock,T308_1); + new_state(sock,ss_wait_rel); + return; + case as_reject: /* ZOMBIE or INDICATED */ + if (sock->state == ss_zombie) { + free_sock(sock); + return; + } + if (sock->state != ss_indicated) break; + send_release(sock,ATM_CV_CALL_REJ); /* @@@ should use msg->reply */ + START_TIMER(sock,T308_1); + new_state(sock,ss_wait_rel); return; case as_listen: /* NULL */ { @@ -234,9 +229,9 @@ sock->state = ss_listening; return; } - case as_close: /* all but ACCEPTING and WAIT_REL */ - if (sock && (sock->state == ss_accepting || sock->state == - ss_wait_rel)) break; + case as_close: /* all but INDICATED, ZOMBIE, and WAIT_REL */ + if (sock && (sock->state == ss_indicated || sock->state == + ss_zombie || sock->state == ss_wait_rel)) break; switch (sock ? sock->state : ss_null) { case ss_listening: case ss_zombie: @@ -249,6 +244,7 @@ case ss_rel_req: return; case ss_connecting: + case ss_accepting: STOP_TIMER(sock); /* fall through */ case ss_connected: @@ -256,7 +252,6 @@ diag(COMPONENT,DIAG_INFO,"Active close (CR 0x%06X)", sock->call_ref); /* fall through */ - case ss_indicated: case ss_hold: send_release(sock, #ifdef UNI31 @@ -266,8 +261,8 @@ #endif ); START_TIMER(sock,T308_1); - new_state(sock,sock->state == ss_connecting || - sock->state == ss_connected ? ss_rel_req : ss_wait_rel); + new_state(sock,sock->state != ss_hold ? ss_rel_req : + ss_wait_rel); return; case ss_rel_ind: send_release_complete(sock->call_ref,0); /* @@@ */ @@ -287,6 +282,27 @@ } +static void dispatch_listen(SOCKET *sock,struct atmsvc_msg *msg) +{ + SOCKET *next; + + if (!sock) { + diag(COMPONENT,DIAG_WARN,"message %s is incompatible with state %s " + "(%d)",as_name[msg->type],state_name[ss_null],ss_null); + return; + } + if (!(next = sock->listen)) { + diag(COMPONENT,DIAG_WARN, + "socket 0x%lx got accept with empty listen queue",msg->vcc); + return; + } + sock->listen = next->listen; + next->listen = NULL; + next->id = msg->vcc; + dispatch(next,msg); +} + + void itf_load(int itf) { char buf[MAX_ATM_ADDR_LEN+1]; @@ -318,6 +334,7 @@ void from_kernel(struct atmsvc_msg *msg,int size) { + void (*dispatcher)(SOCKET *,struct atmsvc_msg *); SOCKET *curr; struct atm_blli **this; int bllis,i; @@ -326,12 +343,17 @@ itf_load(msg->pvc.sap_addr.itf); return; } - for (curr = sockets; curr; curr = curr->next) - if (msg->vcc == curr->id) break; - if (!curr) + if (msg->type != as_accept && msg->type != as_reject) { + dispatcher = dispatch; + for (curr = sockets; curr; curr = curr->next) + if (msg->vcc == curr->id) break; + } + else { + dispatcher = dispatch_listen; for (curr = sockets; curr; curr = curr->next) if (msg->listen_vcc == curr->id && curr->state == ss_listening) break; + } diag(COMPONENT,DIAG_DEBUG,"FROM KERNEL: %s for socket 0x%lx (0x%lx/0x%lx) " "in state %s",as_name[msg->type],(unsigned long) curr,msg->vcc, msg->listen_vcc,state_name[curr ? curr->state : ss_null]); @@ -343,5 +365,5 @@ this = &msg->blli[i].next; } *this = NULL; - dispatch(curr,msg); + dispatcher(curr,msg); } diff -ur --new-file old/atm/sigd/proto.c new/atm/sigd/proto.c --- old/atm/sigd/proto.c Mon Sep 2 14:37:53 1996 +++ new/atm/sigd/proto.c Wed Sep 4 18:24:40 1996 @@ -33,7 +33,7 @@ "REL_IND" }; const char *as_name[] = { "","as_bind","as_connect","as_accept", - "as_listen","as_okay","as_error","as_indicate","as_close" }; + "as_reject","as_listen","as_okay","as_error","as_indicate","as_close" }; const Q2931_STATE state_map[] = { /* formatting aligned with STATE */ qs_null, qs_null, qs_null, qs_call_init, diff -ur --new-file old/atm/sigd/q2931.c new/atm/sigd/q2931.c --- old/atm/sigd/q2931.c Sat Aug 31 14:19:39 1996 +++ new/atm/sigd/q2931.c Wed Sep 4 22:06:08 1996 @@ -358,6 +358,7 @@ new_state(sock,ss_rel_ind); return; case ss_indicated: + send_release_complete(sock->call_ref,0); new_state(sock,ss_zombie); /* fall through */ case ss_rel_ind: diff -ur --new-file old/atm/sigd/trace.c new/atm/sigd/trace.c --- old/atm/sigd/trace.c Mon Sep 2 17:41:48 1996 +++ new/atm/sigd/trace.c Wed Sep 4 18:24:58 1996 @@ -158,8 +158,8 @@ static void print_kernel(void *msg,int size) { static const char *type[] = { "as_catch_null","as_bind","as_connect", - "as_accept","as_listen","as_okay","as_error","as_indicate","as_close", - "as_itf_notify" }; + "as_accept","as_reject","as_listen","as_okay","as_error","as_indicate", + "as_close","as_itf_notify" }; static const char *bhli[] = { "NONE","ISO","USER","HLP","VENDOR" }; struct atmsvc_msg *m = msg; int i; diff -ur --new-file old/atm/test/ttcp.c new/atm/test/ttcp.c --- old/atm/test/ttcp.c Sat Aug 31 14:21:05 1996 +++ new/atm/test/ttcp.c Fri Sep 6 14:51:26 1996 @@ -583,7 +583,7 @@ if (realt <= 0.0) realt = 0.001; - mbps = (double)(nbytes * 8) / realt / (1024.0 * 1024.0); + mbps = (double)(nbytes * 8) / realt / 1000000.0; fprintf(stdout, "ttcp%s: %.0f bytes in %f real seconds = %s/sec (%f Mb/sec)\n", trans?"-t":"-r", @@ -604,7 +604,7 @@ "ttcp%s: %d I/O calls, msec/call = %.2f, calls/sec = %.2f\n", trans?"-t":"-r", numCalls, - 1024.0 * realt/((double)numCalls), + 1000.0 * realt/((double)numCalls), ((double)numCalls)/realt); fprintf(stdout, "ttcp%s: buffer address %#x\n", .