diff -ur --new-file old/atm/CHANGES new/atm/CHANGES --- old/atm/CHANGES Mon Oct 14 19:35:43 1996 +++ new/atm/CHANGES Fri Oct 18 18:38:10 1996 @@ -1,3 +1,44 @@ +Version 0.20 to 0.21 (18-OCT-1996) +==================== + +Bug fixes +--------- + + - net/atm/common.c:atm_connect didn't refuse traffic_class == ATM_NONE in both + directions + - include/linux/atmsvc.h:SELECT_TOP_PCR didn't default to ATM_MAX_PCR if + min_pcr == 0 && max_pcr == 0 + - debug/delay swallowed one-byte packets + - oops, forgot man/Makefile, so qos.7 wasn't installed + - atmarpd left max_sdu at zero for automatically generated entries + - atmarpd now only uses the default QOS if the traffic type is set in neither + direction + - signaling: if the listen queue was full, new connections were rejected with + as_close instead of as_reject, thereby upsetting atmsigd + - svc_accept didn't adjust the listen queue quota when rejecting incoming + connection requests + - fixed a few bad font selections in atmsigd(8) + +New features +------------ + + - included the window scale patch by Randy Scott and + Robert Hill + - -q option for ilmid to set the QOS (like in atmsigd) + - new script mkbindist to install the utilities into a tar.gz file + +Other changes +------------- + + - debug/delay now prints the usage if invoked without arguments + - removed the pretentious usec resolution for delays in debug/delay + - removed the UBR semantics change warning + - qos.7: clarified that bps are the user data rate + - arequipa_attach_unchecked now also adjusts the upper layer MTU (which can + violate RFC1122, but I'll tackle that later) + - text2qos now also accepts fractional values, e.g. 9.6kbps + + Version 0.19 to 0.20 (14-OCT-1996) ==================== diff -ur --new-file old/atm/Makefile new/atm/Makefile --- old/atm/Makefile Wed Oct 9 11:06:31 1996 +++ new/atm/Makefile Wed Oct 16 22:13:02 1996 @@ -1,13 +1,15 @@ # "qgen" and "saal" _must_ appear before "sigd" # "lib" must appear before anything else -DIRS=lib maint ip test debug qgen saal sigd arpd ilmid led lane aqd #ans +DIRS=lib maint ip test debug qgen saal sigd arpd ilmid led lane aqd man #ans all: for n in $(DIRS); do $(MAKE) -C $$n || exit; done install: - for n in $(DIRS); do $(MAKE) -C $$n install || exit; done + for n in $(DIRS); do \ + $(MAKE) -C $$n instdirs || exit; \ + $(MAKE) -C $$n install || exit; done uninstall: for n in $(DIRS); do $(MAKE) -C $$n uninstall || exit; done diff -ur --new-file old/atm/README new/atm/README --- old/atm/README Mon Oct 14 19:36:29 1996 +++ new/atm/README Tue Oct 15 22:57:48 1996 @@ -1,4 +1,4 @@ -ATM on Linux, release 0.20 (pre-alpha) by Werner Almesberger, EPFL LRC +ATM on Linux, release 0.21 (pre-alpha) by Werner Almesberger, EPFL LRC ====================================== werner.almesberger@lrc.di.epfl.ch This is experimental software. There are known major bugs and certainly diff -ur --new-file old/atm/Rules.make new/atm/Rules.make --- old/atm/Rules.make Thu Oct 10 23:15:45 1996 +++ new/atm/Rules.make Wed Oct 16 22:17:29 1996 @@ -32,6 +32,17 @@ INSTMAN4=$(INSTMAN)/man4 INSTMAN7=$(INSTMAN)/man7 INSTMAN8=$(INSTMAN)/man8 +# format: "process" mode instdir files +PROCLIST=\ + process 0755 $(INSTBOOTBIN) $(BOOTPGMS); \ + process 0755 $(INSTSYSBIN) $(SYSPGMS); \ + process 0755 $(INSTUSRBIN) $(USRPGMS); \ + process 0644 $(INSTLIB) $(GENLIBS); \ + process 0644 $(INSTHDR) $(SYSHDR); \ + process 0644 $(INSTMAN1) $(MAN1); \ + process 0644 $(INSTMAN4) $(MAN4); \ + process 0644 $(INSTMAN7) $(MAN7); \ + process 0644 $(INSTMAN8) $(MAN8) # # Enable memory debugging if MPR is installed @@ -61,29 +72,19 @@ @process() { if [ ! -z "$$3" ]; then mode=$$1; dir=$$2; \ shift 2; echo "install -c -m $$mode $$* $$dir"; \ install -c -m $$mode $$* $$dir; fi }; \ - process 0755 $(INSTBOOTBIN) $(BOOTPGMS); \ - process 0755 $(INSTSYSBIN) $(SYSPGMS); \ - process 0755 $(INSTUSRBIN) $(USRPGMS); \ - process 0644 $(INSTLIB) $(GENLIBS); \ - process 0644 $(INSTHDR) $(SYSHDR); \ - process 0644 $(INSTMAN1) $(MAN1); \ - process 0644 $(INSTMAN4) $(MAN4); \ - process 0644 $(INSTMAN7) $(MAN7); \ - process 0644 $(INSTMAN8) $(MAN8) + $(PROCLIST) + +instdirs: + @process() { if [ ! -z "$$3" ]; then \ + echo "install -d $$2"; \ + install -d $$2; fi }; \ + $(PROCLIST) uninstall: - @process() { if [ ! -z "$$2" ]; then dir=$$1; shift; \ + @process() { if [ ! -z "$$3" ]; then dir=$$2; shift; \ echo "cd $$dir; rm -f $$*"; \ cd $$dir; rm -f $$*; fi }; \ - process $(INSTBOOTBIN) $(BOOTPGMS); \ - process $(INSTSYSBIN) $(SYSPGMS); \ - process $(INSTUSRBIN) $(USRPGMS); \ - process $(INSTLIB) $(GENLIBS); \ - process $(INSTHDR) $(SYSHDR); \ - process $(INSTMAN1) $(MAN1); \ - process $(INSTMAN4) $(MAN4); \ - process $(INSTMAN7) $(MAN7); \ - process $(INSTMAN8) $(MAN8) + $(PROCLIST) depend: $(CPP) -M *.c $(INCLUDES) -I../lib >.tmpdepend diff -ur --new-file old/atm/USAGE new/atm/USAGE --- old/atm/USAGE Mon Oct 14 19:06:26 1996 +++ new/atm/USAGE Fri Oct 18 15:05:33 1996 @@ -1,4 +1,4 @@ -Usage instructions - ATM on Linux, release 0.20 (pre-alpha) +Usage instructions - ATM on Linux, release 0.21 (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.20.tar.gz + ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.21.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.20.tar.gz +tar xfz atm-0.21.tar.gz and the kernel source: @@ -486,6 +486,8 @@ -l write diagnostic messages to the specified file instead of to standard error. The special name syslog is used to send diagnostics to the system logger. + -q configures the ILMI VC to use the specified quality of + service. By default, UBR at link speed is used on the ILMI VC. -x disable inclusion of variable bindings in the ColdstartTrap. Some switches (e.g. the LS100) only work if this option is set. diff -ur --new-file old/atm/VERSION new/atm/VERSION --- old/atm/VERSION Sat Sep 28 07:47:48 1996 +++ new/atm/VERSION Tue Oct 15 22:57:35 1996 @@ -1 +1 @@ -0.20 +0.21 diff -ur --new-file old/atm/arpd/arp.c new/atm/arpd/arp.c --- old/atm/arpd/arp.c Thu Oct 10 22:38:50 1996 +++ new/atm/arpd/arp.c Wed Oct 16 21:34:27 1996 @@ -410,6 +410,15 @@ } +static void adjust_qos(ITF *itf,struct atm_qos *qos,int null_encap) +{ + if (!qos->txtp.max_sdu) + qos->txtp.max_sdu = RFC1626_MTU+(null_encap ? 0 : RFC1483LLC_LEN); + if (!qos->rxtp.max_sdu) + qos->rxtp.max_sdu = RFC1626_MTU+(null_encap ? 0 : RFC1483LLC_LEN); +} + + static void learn(VCC *vcc,unsigned long ip,struct sockaddr_atmsvc *addr) { ENTRY *entry; @@ -468,6 +477,7 @@ if (!entry->addr) entry->addr = alloc(sizeof(*addr)); *entry->addr = *addr; entry->qos = entry->itf->qos; + adjust_qos(entry->itf,&entry->qos,0); for (walk = entry->vccs; walk; walk = walk->next) if (!walk->connecting) if (set_ip(walk->fd,ip) < 0) @@ -765,15 +775,6 @@ } -static void adjust_qos(ITF *itf,struct atm_qos *qos,int null_encap) -{ - if (!qos->txtp.max_sdu) - qos->txtp.max_sdu = RFC1626_MTU+(null_encap ? 0 : RFC1483LLC_LEN); - if (!qos->rxtp.max_sdu) - qos->rxtp.max_sdu = RFC1626_MTU+(null_encap ? 0 : RFC1483LLC_LEN); -} - - int arp_ioctl(int itf_num,unsigned long cmd,struct atmarpreq *req) { ITF *itf; @@ -809,7 +810,8 @@ diag(COMPONENT,DIAG_DEBUG,"got SIOCSARP for itf %d, IP %d.%d.%d.%d" ", ATM %s, flags 0x%x",itf_num,ipp[0],ipp[1],ipp[2],ipp[3],buffer, req->arp_flags); - if (!req->arp_qos.txtp.traffic_class) req->arp_qos = itf->qos; + if (!req->arp_qos.txtp.traffic_class && + !req->arp_qos.rxtp.traffic_class) req->arp_qos = itf->qos; switch (req->arp_ha.sas_family) { case AF_ATMPVC: adjust_qos(itf,&req->arp_qos,req->arp_flags & ATF_NULL); diff -ur --new-file old/atm/atm.patch new/atm/atm.patch --- old/atm/atm.patch Mon Oct 14 20:04:44 1996 +++ new/atm/atm.patch Fri Oct 18 18:38:33 1996 @@ -2687,7 +2687,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/drivers/atm/eni.h Thu Oct 10 19:03:46 1996 ++++ work/drivers/atm/eni.h Thu Oct 17 15:49:41 1996 @@ -0,0 +1,113 @@ +/* drivers/atm/eni.h - Efficient Networks ENI155P device driver declarations */ + @@ -3372,7 +3372,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/drivers/atm/suni.h Thu Oct 10 19:03:46 1996 ++++ work/drivers/atm/suni.h Thu Oct 17 15:49:41 1996 @@ -0,0 +1,219 @@ +/* drivers/atm/suni.h - PMC SUNI (PHY) declarations */ + @@ -6099,7 +6099,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/drivers/atm/zatm.h Thu Oct 10 19:04:13 1996 ++++ work/drivers/atm/zatm.h Thu Oct 17 15:50:09 1996 @@ -0,0 +1,172 @@ +/* drivers/atm/zatm.h - ZeitNet ZN122x device driver declarations */ + @@ -6311,7 +6311,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/drivers/atm/tneta1570.h Thu Oct 10 19:04:41 1996 ++++ work/drivers/atm/tneta1570.h Thu Oct 17 15:50:31 1996 @@ -0,0 +1,390 @@ +/* drivers/atm/tneta1570.h - TI TNETA1570 (SAR) declarations */ + @@ -8580,7 +8580,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/include/linux/atmclip.h Thu Oct 10 19:13:50 1996 ++++ work/include/linux/atmclip.h Thu Oct 17 15:51:54 1996 @@ -0,0 +1,37 @@ +/* atmclip.h - Classical IP over ATM */ + @@ -8620,7 +8620,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/include/linux/atmdev.h Thu Oct 10 18:55:50 1996 ++++ work/include/linux/atmdev.h Thu Oct 17 15:49:26 1996 @@ -0,0 +1,255 @@ +/* atmdev.h - ATM device driver declarations */ + @@ -9005,7 +9005,7 @@ + +#endif --- ref/include/linux/skbuff.h Tue Aug 20 17:09:42 1996 -+++ work/include/linux/skbuff.h Thu Oct 10 18:55:49 1996 ++++ work/include/linux/skbuff.h Tue Oct 15 13:28:32 1996 @@ -112,6 +112,21 @@ unsigned char *end; /* End pointer */ void (*destructor)(struct sk_buff *); /* Destruct function */ @@ -9084,7 +9084,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/include/linux/atmsvc.h Thu Oct 10 19:13:51 1996 ++++ work/include/linux/atmsvc.h Tue Oct 15 15:19:20 1996 @@ -0,0 +1,51 @@ +/* atmsvc.h - ATM signaling kernel-demon interface definitions */ + @@ -9134,7 +9134,7 @@ + */ + +#define SELECT_TOP_PCR(tp) ((tp).max_pcr && (tp).max_pcr != ATM_MAX_PCR ? \ -+ (tp).max_pcr : (tp).min_pcr) ++ (tp).max_pcr : (tp).min_pcr ? (tp).min_pcr : ATM_MAX_PCR) + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 @@ -9372,8 +9372,8 @@ + return CLIP(dev)->number; +} --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/common.c Sun Oct 13 15:52:33 1996 -@@ -0,0 +1,928 @@ ++++ work/net/atm/common.c Wed Oct 16 16:47:38 1996 +@@ -0,0 +1,932 @@ +/* net/atm/common.c - ATM sockets (common part for PVC and SVC) */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -9687,6 +9687,8 @@ + vcc->qos.txtp.max_pcr,vcc->qos.txtp.max_sdu, + vcc->qos.rxtp.traffic_class,vcc->qos.rxtp.min_pcr, + vcc->qos.rxtp.max_pcr,vcc->qos.rxtp.max_sdu); ++ if (!vcc->qos.txtp.traffic_class && !vcc->qos.rxtp.traffic_class) ++ return -EINVAL; + if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS || + vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) + return -EINVAL; @@ -10209,6 +10211,7 @@ + if (optlen != sizeof(struct atm_qos)) + return -EINVAL; + memcpy_fromfs(&vcc->qos,optval,optlen); ++#if 0 + if ((vcc->qos.txtp.traffic_class == ATM_UBR && + (vcc->qos.txtp.min_pcr || + vcc->qos.txtp.max_pcr || @@ -10220,6 +10223,7 @@ + printk(KERN_WARNING "Warning: " + "semantics of ATM_UBR have changed " + "with min/max_pcr != 0\n"); ++#endif + vcc->flags |= ATM_VF_HASQOS; + return 0; + default: @@ -10674,7 +10678,7 @@ + if (atm_vcc[i].family) fn(atm_vcc+i); +} --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/static.h Thu Oct 10 19:13:50 1996 ++++ work/net/atm/static.h Thu Oct 17 15:51:54 1996 @@ -0,0 +1,29 @@ +/* net/atm/static.h - Staticly allocated resources */ + @@ -10706,7 +10710,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/svc.c Fri Oct 4 13:11:53 1996 ++++ work/net/atm/svc.c Thu Oct 17 14:00:17 1996 @@ -0,0 +1,604 @@ +/* net/atm/svc.c - ATM SVC sockets */ + @@ -11000,6 +11004,7 @@ + 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); ++ old_vcc->backlog_quota++; + if (error) { + sigd_enq(NULL,as_reject,old_vcc,NULL,NULL); + /* @@@ should include the reason */ @@ -11014,7 +11019,6 @@ + atm_release_vcc(new_vcc,1); + return -EUNATCH; + } -+ old_vcc->backlog_quota++; + if (!new_vcc->reply) break; + if (new_vcc->reply != -ERESTARTSYS) { + atm_release_vcc(new_vcc,1); @@ -11313,7 +11317,7 @@ + } +} --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/signaling.c Thu Sep 12 10:21:05 1996 ++++ work/net/atm/signaling.c Thu Oct 17 13:55:23 1996 @@ -0,0 +1,219 @@ +/* net/atm/signaling.c - ATM signaling */ + @@ -11384,7 +11388,7 @@ + vcc = (struct atm_vcc *) msg->listen_vcc; + DPRINTK("as_indicate!!!\n"); + if (!vcc->backlog_quota) { -+ sigd_enq(0,as_close,(struct atm_vcc *) ++ sigd_enq(0,as_reject,(struct atm_vcc *) + msg->listen_vcc,NULL,NULL); + return 0; + } @@ -11535,7 +11539,7 @@ + return 0; +} --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/signaling.h Thu Oct 10 19:13:51 1996 ++++ work/net/atm/signaling.h Thu Oct 17 15:51:54 1996 @@ -0,0 +1,25 @@ +/* net/atm/signaling.h - ATM signaling */ + @@ -12171,7 +12175,7 @@ + return 0; +} --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/atmarp.h Sun Oct 13 14:14:43 1996 ++++ work/net/atm/atmarp.h Thu Oct 17 15:51:54 1996 @@ -0,0 +1,53 @@ +/* net/atm/atmarp.h - RFC1577 ATM ARP */ + @@ -12227,7 +12231,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/ipcommon.h Thu Oct 10 19:14:42 1996 ++++ work/net/atm/ipcommon.h Thu Oct 17 15:52:38 1996 @@ -0,0 +1,73 @@ +/* net/atm/ipcommon.h - Common items for all ways of doing IP over ATM */ + @@ -12520,8 +12524,8 @@ + return number; +} --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/arequipa.c Thu Oct 10 20:49:08 1996 -@@ -0,0 +1,418 @@ ++++ work/net/atm/arequipa.c Fri Oct 18 17:59:09 1996 +@@ -0,0 +1,426 @@ +/* net/atm/arequipa.c - Application requested IP over ATM */ + +/* Written 1996 by Jean-Michel Pittet and Werner Almesberger, EPFL LRC */ @@ -12761,6 +12765,13 @@ + rt = upper->ip_route_cache; /* revalidate cache */ + upper->ip_route_cache = NULL; + set_rt_cache(upper,rt); ++ /* ++ * The next statement violates RFC1122, because it may change MSS when ++ * both sides have already exchanged their SYNs. Linux doesn't mind if ++ * this happens, but other systems might. Needs to be fixed. @@@ ++ */ ++ if (ATM_SD(lower)->qos.txtp.max_sdu > RFC1483LLC_LEN) ++ upper->mtu = ATM_SD(lower)->qos.txtp.max_sdu-RFC1483LLC_LEN; + return 0; +} + @@ -12878,6 +12889,7 @@ + memset(arequipa_dev,0,sizeof(struct device)+sizeof(struct clip_priv)); + arequipa_dev->name = "arequipa"; + arequipa_dev->init = arequipa_init; ++ arequipa_rt.rt_dev = arequipa_dev; + arequipa_init(arequipa_dev); + return 0; +} @@ -12970,7 +12982,7 @@ + +#endif --- ref/net/ipv4/af_inet.c Sun Aug 4 11:56:25 1996 -+++ work/net/ipv4/af_inet.c Thu Oct 10 20:44:29 1996 ++++ work/net/ipv4/af_inet.c Thu Oct 17 11:32:11 1996 @@ -105,6 +105,14 @@ #include #endif @@ -13018,7 +13030,15 @@ sk->socket = sock; #ifdef CONFIG_TCP_NAGLE_OFF sk->nonagle = 1; -@@ -1339,7 +1358,18 @@ +@@ -673,6 +692,7 @@ + sk->rcvbuf = SK_RMEM_MAX; + sk->rto = TCP_TIMEOUT_INIT; /*TCP_WRITE_TIME*/ + sk->cong_window = 1; /* start with only sending one packet at a time. */ ++ sk->ssthresh = 0x7fffffff; + sk->priority = 1; + sk->state = TCP_CLOSE; + +@@ -1339,7 +1359,18 @@ return((*dlci_ioctl_hook)(cmd, (void *) arg)); #endif return -ENOPKG; @@ -13521,7 +13541,7 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/include/linux/mmuio.h Thu Oct 10 19:13:50 1996 ++++ work/include/linux/mmuio.h Tue Oct 15 13:41:12 1996 @@ -0,0 +1,25 @@ +/* mmuio.h - MMU-supported high-speed I/O */ + @@ -13711,7 +13731,7 @@ + +#endif --- ref/include/linux/netdevice.h Tue Aug 20 17:11:35 1996 -+++ work/include/linux/netdevice.h Thu Oct 10 18:55:50 1996 ++++ work/include/linux/netdevice.h Tue Oct 15 13:28:32 1996 @@ -185,6 +185,8 @@ int (*set_mac_address)(struct device *dev, void *addr); #define HAVE_PRIVATE_IOCTL @@ -13870,8 +13890,18 @@ if (sk->users) { --- ref/net/ipv4/tcp.c Sun Aug 4 12:56:54 1996 -+++ work/net/ipv4/tcp.c Wed Aug 21 10:55:55 1996 -@@ -1991,6 +1991,11 @@ ++++ work/net/ipv4/tcp.c Fri Oct 18 17:59:46 1996 +@@ -1936,6 +1936,9 @@ + int atype; + struct tcphdr *t1; + struct rtable *rt; ++#ifdef CONFIG_SCALED_WINDOWS ++ unsigned long window; ++#endif + + if (sk->state != TCP_CLOSE) + return(-EISCONN); +@@ -1991,6 +1994,11 @@ * Put in the IP header and routing stuff. */ @@ -13883,6 +13913,59 @@ 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) +@@ -2002,6 +2010,11 @@ + if ((rt = sk->ip_route_cache) != NULL && !sk->saddr) + sk->saddr = rt->rt_src; + sk->rcv_saddr = sk->saddr; ++#ifdef CONFIG_SCALED_WINDOWS ++ sk->snd_wscale = 0; ++ sk->rcv_wscale = 0; ++ sk->wscaling = 0; ++#endif + + /* + * Set up our outgoing TCP sequence number +@@ -2065,14 +2078,35 @@ + * Put in the TCP options to say MTU. + */ + +- ptr = skb_put(buff,4); +- ptr[0] = 2; +- ptr[1] = 4; ++#ifdef CONFIG_SCALED_WINDOWS ++ window = sk->rcvbuf; ++ sk->rcv_wscale = 0; ++ while (window > MAX_WINDOW) { ++ window >>= 1; ++ sk->rcv_wscale++; ++ } ++ t1->doff += 1; /* 4 bytes for window scaling option and NOP */ ++ ptr = skb_put(buff,TCPOLEN_MSS+TCPOLEN_NOP+TCPOLEN_WINDOW); ++#else ++ ptr = skb_put(buff,TCPOLEN_MSS); ++#endif ++ ptr[0] = TCPOPT_MSS; ++ ptr[1] = TCPOLEN_MSS; + ptr[2] = (sk->mtu) >> 8; + ptr[3] = (sk->mtu) & 0xff; +- buff->csum = csum_partial(ptr, 4, 0); ++#ifdef CONFIG_SCALED_WINDOWS ++ ptr[4] = TCPOPT_NOP; ++ ptr[5] = TCPOPT_WINDOW; ++ ptr[6] = TCPOLEN_WINDOW; ++ ptr[7] = sk->rcv_wscale; ++ buff->csum = csum_partial(ptr,TCPOLEN_MSS+TCPOLEN_NOP+TCPOLEN_WINDOW,0); + tcp_send_check(t1, sk->saddr, sk->daddr, +- sizeof(struct tcphdr) + 4, buff); ++ sizeof(struct tcphdr)+TCPOLEN_MSS+TCPOLEN_NOP+TCPOLEN_WINDOW,buff); ++#else ++ buff->csum = csum_partial(ptr, TCPOLEN_MSS, 0); ++ tcp_send_check(t1, sk->saddr, sk->daddr, ++ sizeof(struct tcphdr) + TCPOLEN_MSS, buff); ++#endif + + /* + * This must go first otherwise a really quick response will get reset. --- 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 @@ @@ -13908,7 +13991,7 @@ /* 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 Thu Oct 10 18:55:49 1996 ++++ work/include/linux/proc_fs.h Tue Oct 15 13:28:32 1996 @@ -34,6 +34,7 @@ PROC_KSYMS, PROC_DMA, @@ -15475,7 +15558,7 @@ + return i; +} --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/lec.h Thu Oct 10 19:13:50 1996 ++++ work/net/atm/lec.h Thu Oct 17 15:51:54 1996 @@ -0,0 +1,107 @@ +/* + * @@ -16636,7 +16719,7 @@ +} + --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/lec_arpc.h Thu Oct 10 19:13:50 1996 ++++ work/net/atm/lec_arpc.h Thu Oct 17 15:51:54 1996 @@ -0,0 +1,102 @@ +/* + * Lec arp cache @@ -16741,7 +16824,7 @@ + +#endif --- ref/include/net/route.h Tue Aug 20 17:14:55 1996 -+++ work/include/net/route.h Thu Oct 10 19:12:48 1996 ++++ work/include/net/route.h Thu Oct 17 15:51:08 1996 @@ -26,6 +26,7 @@ #define _ROUTE_H @@ -16805,8 +16888,64 @@ #endif /* _ROUTE_H */ --- ref/include/net/sock.h Tue Aug 20 17:11:40 1996 -+++ work/include/net/sock.h Thu Oct 10 18:55:50 1996 -@@ -301,7 +301,13 @@ ++++ work/include/net/sock.h Fri Oct 18 17:57:05 1996 +@@ -189,6 +189,9 @@ + zapped, /* In ax25 & ipx means not linked */ + broadcast, + nonagle, ++#ifdef CONFIG_SCALED_WINDOWS ++ wscaling, ++#endif + bsdism; + unsigned long lingertime; + int proc; +@@ -210,20 +213,34 @@ + __u32 saddr; /* Sending source */ + __u32 rcv_saddr; /* Bound address */ + unsigned short max_unacked; ++#ifdef CONFIG_SCALED_WINDOWS ++ __u32 window; ++ unsigned char rcv_wscale; /* our window scale */ ++ unsigned char snd_wscale; /* their window scale */ ++#else + unsigned short window; ++#endif + __u32 lastwin_seq; /* sequence number when we last updated the window we offer */ + __u32 high_seq; /* sequence number when we did current fast retransmit */ + volatile unsigned long ato; /* ack timeout */ + volatile unsigned long lrcvtime; /* jiffies at last data rcv */ + volatile unsigned long idletime; /* jiffies at last rcv */ ++#ifdef CONFIG_SCALED_WINDOWS ++ unsigned long bytes_rcv; ++#else + unsigned short bytes_rcv; ++#endif + /* + * mss is min(mtu, max_window) + */ + unsigned short mtu; /* mss negotiated in the syn's */ + volatile unsigned short mss; /* current eff. mss - can change */ + volatile unsigned short user_mss; /* mss requested by user in ioctl */ ++#ifdef CONFIG_SCALED_WINDOWS ++ volatile __u32 max_window; ++#else + volatile unsigned short max_window; ++#endif + unsigned long window_clamp; + unsigned int ssthresh; + unsigned short num; +@@ -251,8 +268,8 @@ + unsigned char max_ack_backlog; + unsigned char priority; + unsigned char debug; +- unsigned short rcvbuf; +- unsigned short sndbuf; ++ unsigned long rcvbuf; ++ unsigned long sndbuf; + unsigned short type; + unsigned char localroute; /* Route locally only */ + #ifdef CONFIG_AX25 +@@ -301,7 +318,13 @@ int ip_mc_loop; /* Loopback */ char ip_mc_name[MAX_ADDR_LEN];/* Multicast device name */ struct ip_mc_socklist *ip_mc_list; /* Group array */ @@ -16822,7 +16961,7 @@ /* * This part is used for the timeout functions (timer.c). --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/include/linux/arequipa.h Thu Oct 10 19:13:50 1996 ++++ work/include/linux/arequipa.h Thu Oct 17 15:51:54 1996 @@ -0,0 +1,46 @@ +/* arequipa.h - Arequipa interface definitions */ + @@ -16871,7 +17010,7 @@ + +#endif --- ref/net/ipv4/tcp_input.c Thu Aug 1 14:25:59 1996 -+++ work/net/ipv4/tcp_input.c Fri Sep 27 14:53:00 1996 ++++ work/net/ipv4/tcp_input.c Fri Oct 18 18:01:29 1996 @@ -36,6 +36,11 @@ #include #include @@ -16884,7 +17023,33 @@ /* * Policy code extracted so it's now separate */ -@@ -428,6 +433,24 @@ +@@ -316,13 +321,22 @@ + switch(opcode) + { + case TCPOPT_MSS: +- if(opsize==4 && th->syn) +- { ++ if(opsize==TCPOLEN_MSS && ++ th->syn) { + sk->mtu=min(sk->mtu,ntohs(*(unsigned short *)ptr)); + mss_seen = 1; + } + break; +- /* Add other options here as people feel the urge to implement stuff like large windows */ ++#ifdef CONFIG_SCALED_WINDOWS ++ case TCPOPT_WINDOW: ++ if (opsize==TCPOLEN_WINDOW && th->syn) { ++ sk->snd_wscale=min(ptr[0], ++ MAX_WIN_SCALE); ++ sk->wscaling=1; ++ } ++ break; ++#endif ++ /* Add other options here */ + } + ptr+=opsize-2; + length-=opsize; +@@ -428,6 +442,24 @@ return; } } @@ -16909,7 +17074,19 @@ skb_queue_head_init(&newsk->write_queue); skb_queue_head_init(&newsk->receive_queue); newsk->send_head = NULL; -@@ -529,7 +552,7 @@ +@@ -438,6 +470,11 @@ + newsk->rto = TCP_TIMEOUT_INIT; + newsk->mdev = TCP_TIMEOUT_INIT; + newsk->max_window = 0; ++#ifdef CONFIG_SCALED_WINDOWS ++ newsk->snd_wscale = 0; ++ newsk->rcv_wscale = 0; ++ newsk->wscaling = 0; ++#endif + /* + * See draft-stevens-tcpca-spec-01 for discussion of the + * initialization of these values. +@@ -529,7 +566,7 @@ */ rt = ip_rt_route(newsk->opt && newsk->opt->srr ? newsk->opt->faddr : saddr, 0); @@ -16918,7 +17095,38 @@ if(rt!=NULL && (rt->rt_flags&RTF_WINDOW)) newsk->window_clamp = rt->rt_window; -@@ -1785,6 +1808,13 @@ +@@ -539,7 +576,8 @@ + 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 */ + else + newsk->mtu = 576 - sizeof(struct iphdr) - sizeof(struct tcphdr); + +@@ -683,6 +721,9 @@ + * Have we discovered a larger window + */ + window_seq = ntohs(th->window); ++#ifdef CONFIG_SCALED_WINDOWS ++ if (sk->wscaling && sk->snd_wscale) window_seq <<= sk->snd_wscale; ++#endif + if (window_seq > sk->max_window) + { + sk->max_window = window_seq; +@@ -1170,6 +1211,10 @@ + sk->rtt = 0; + sk->rto = TCP_TIMEOUT_INIT; + sk->mdev = TCP_TIMEOUT_INIT; ++ ++#ifdef CONFIG_SCALED_WINDOWS ++ if (!sk->wscaling) sk->rcv_wscale = 0; ++#endif + } + + /* +@@ -1785,6 +1830,13 @@ skb->free = 1; skb->saddr = daddr; skb->daddr = saddr; @@ -16932,6 +17140,184 @@ /* * We may need to add it to the backlog here. +--- ref/net/ipv4/Config.in Fri Jul 19 07:24:05 1996 ++++ work/net/ipv4/Config.in Tue Oct 15 13:16:49 1996 +@@ -42,3 +42,4 @@ + #bool 'IP: Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF + bool 'IP: Drop source routed frames' CONFIG_IP_NOSR + bool 'IP: Allow large windows (not recommended if <16Mb of memory)' CONFIG_SKB_LARGE ++bool 'IP: Window scale option' CONFIG_SCALED_WINDOWS +--- ref/include/net/tcp.h Tue Aug 20 17:14:55 1996 ++++ work/include/net/tcp.h Thu Oct 17 15:51:08 1996 +@@ -23,16 +23,26 @@ + + /* + * 40 is maximal IP options size +- * 4 is TCP option size (MSS) ++ * 4 is TCP option size (MSS only) ++ * 8 is TCP option size (MSS + NOP + WINDOW) + */ ++#ifdef CONFIG_SCALED_WINDOWS ++#define MAX_SYN_SIZE (sizeof(struct iphdr) + 40 + sizeof(struct tcphdr) + 8 + MAX_HEADER + 15) ++#else + #define MAX_SYN_SIZE (sizeof(struct iphdr) + 40 + sizeof(struct tcphdr) + 4 + MAX_HEADER + 15) ++#endif + #define MAX_FIN_SIZE (sizeof(struct iphdr) + 40 + sizeof(struct tcphdr) + MAX_HEADER + 15) + #define MAX_ACK_SIZE (sizeof(struct iphdr) + 40 + sizeof(struct tcphdr) + MAX_HEADER + 15) + #define MAX_RESET_SIZE (sizeof(struct iphdr) + 40 + sizeof(struct tcphdr) + MAX_HEADER + 15) + +-#define MAX_WINDOW 32767 /* Never offer a window over 32767 without using +- window scaling (not yet supported). Some poor +- stacks do signed 16bit maths! */ ++#ifdef CONFIG_SCALED_WINDOWS ++#define MAX_WINDOW 65535 ++#define MAX_WIN_SCALE 14 ++#else ++#define MAX_WINDOW 32767 /* Never offer a window over 32767 ++ without using window scaling. Some ++ poor stacks do signed 16bit maths! */ ++#endif + #define MIN_WINDOW 2048 + #define MAX_ACK_BACKLOG 2 + #define MAX_DUP_ACKS 2 +@@ -82,12 +92,16 @@ + #define TCPOPT_NOP 1 /* Padding */ + #define TCPOPT_EOL 0 /* End of options */ + #define TCPOPT_MSS 2 /* Segment size negotiating */ +-/* +- * We don't use these yet, but they are for PAWS and big windows +- */ + #define TCPOPT_WINDOW 3 /* Window scaling */ + #define TCPOPT_TIMESTAMP 8 /* Better RTT estimations/PAWS */ + ++/* ++ * TCP option lengths ++ */ ++#define TCPOLEN_NOP 1 ++#define TCPOLEN_MSS 4 ++#define TCPOLEN_WINDOW 3 ++#define TCPOLEN_TIMESTAMP 10 + + /* + * The next routines deal with comparing 32 bit unsigned ints +@@ -206,7 +220,11 @@ + sk->lastwin_seq = sk->acked_seq; + oldwin = window; + } ++#ifdef CONFIG_SCALED_WINDOWS ++ return oldwin >> sk->rcv_wscale; ++#else + return oldwin; ++#endif + } + + /* +--- ref/net/core/sock.c Sat Aug 17 19:28:10 1996 ++++ work/net/core/sock.c Wed Oct 16 08:19:51 1996 +@@ -172,22 +172,32 @@ + sk->broadcast=valbool; + return 0; + case SO_SNDBUF: ++#ifdef CONFIG_SCALED_WINDOWS ++ if(val > (MAX_WINDOW << MAX_WIN_SCALE)) ++ val = MAX_WINDOW << MAX_WIN_SCALE; ++#else + if(val > SK_WMEM_MAX*2) + val = SK_WMEM_MAX*2; +- if(val < 256) +- val = 256; + if(val > 65535) + val = 65535; ++#endif ++ if(val < 256) ++ val = 256; + sk->sndbuf = val; + return 0; + + case SO_RCVBUF: ++#ifdef CONFIG_SCALED_WINDOWS ++ if(val > (MAX_WINDOW << MAX_WIN_SCALE)) ++ val = MAX_WINDOW << MAX_WIN_SCALE; ++#else + if(val > SK_RMEM_MAX*2) + val = SK_RMEM_MAX*2; +- if(val < 256) +- val = 256; + if(val > 65535) + val = 65535; ++#endif ++ if(val < 256) ++ val = 256; + sk->rcvbuf = val; + return(0); + +--- ref/net/ipv4/tcp_output.c Wed Aug 7 08:37:34 1996 ++++ work/net/ipv4/tcp_output.c Fri Oct 18 17:56:18 1996 +@@ -69,7 +69,22 @@ + minwin = sk->mtu; + maxwin = sk->window_clamp; + if (!maxwin) ++#ifdef CONFIG_SCALED_WINDOWS ++ { ++ maxwin = sk->rcvbuf; ++ if (!sk->wscaling && maxwin > MAX_WINDOW) { ++ maxwin = MAX_WINDOW; ++ } else if (sk->state == TCP_SYN_RECV && sk->wscaling) { ++ sk->rcv_wscale = 0; ++ while (maxwin > MAX_WINDOW) { ++ maxwin >>= 1; ++ sk->rcv_wscale++; ++ } ++ } ++ } ++#else + maxwin = MAX_WINDOW; ++#endif + if (minwin > maxwin/2) + minwin = maxwin/2; + +@@ -835,6 +850,33 @@ + t1->rst = 0; + t1->psh = 0; + t1->ack_seq = htonl(newsk->acked_seq); ++#ifdef CONFIG_SCALED_WINDOWS ++ if (newsk->wscaling) { ++ t1->doff = 7; ++ ptr = skb_put(buff,TCPOLEN_MSS+TCPOLEN_NOP+TCPOLEN_WINDOW); ++ ptr[0] = TCPOPT_MSS; ++ ptr[1] = TCPOLEN_MSS; ++ ptr[2] = ((newsk->mtu) >> 8) & 0xff; ++ ptr[3] = (newsk->mtu) & 0xff; ++ ptr[4] = TCPOPT_NOP; ++ ptr[5] = TCPOPT_WINDOW; ++ ptr[6] = TCPOLEN_WINDOW; ++ ptr[7] = newsk->rcv_wscale; ++ buff->csum = csum_partial(ptr, TCPOLEN_MSS+TCPOLEN_NOP+ ++ TCPOLEN_WINDOW, 0); ++ tcp_send_check(t1, newsk->saddr, newsk->daddr, sizeof(*t1)+ ++ TCPOLEN_MSS+TCPOLEN_NOP+TCPOLEN_WINDOW, buff); ++ } else { ++ t1->doff = 6; ++ ptr = skb_put(buff,TCPOLEN_MSS); ++ ptr[0] = TCPOPT_MSS; ++ ptr[1] = TCPOLEN_MSS; ++ ptr[2] = ((newsk->mtu) >> 8) & 0xff; ++ ptr[3] =(newsk->mtu) & 0xff; ++ buff->csum = csum_partial(ptr, TCPOLEN_MSS, 0); ++ tcp_send_check(t1, newsk->saddr, newsk->daddr, sizeof(*t1)+TCPOLEN_MSS, buff); ++ } ++#else + t1->doff = sizeof(*t1)/4+1; + ptr = skb_put(buff,4); + ptr[0] = 2; +@@ -843,6 +885,7 @@ + ptr[3] =(newsk->mtu) & 0xff; + buff->csum = csum_partial(ptr, 4, 0); + tcp_send_check(t1, newsk->saddr, newsk->daddr, sizeof(*t1)+4, buff); ++#endif + newsk->prot->queue_xmit(newsk, ndev, buff, 0); + tcp_reset_xmit_timer(newsk, TIME_WRITE , TCP_TIMEOUT_INIT); + skb->sk = newsk; --- /dev/null Mon Jul 18 01:46:18 1994 +++ work/include/linux/bigphysarea.h Fri Oct 4 13:14:31 1996 @@ -0,0 +1,25 @@ diff -ur --new-file old/atm/debug/delay.c new/atm/debug/delay.c --- old/atm/debug/delay.c Fri Oct 11 20:34:02 1996 +++ new/atm/debug/delay.c Wed Oct 16 10:40:42 1996 @@ -106,7 +106,7 @@ perror("read"); exit(1); } - if (size > 1) { + if (size > 0) { if (!(p = malloc(sizeof(PACKET)-1+size))) { perror("malloc"); exit(1); @@ -189,7 +189,7 @@ fprintf(stderr," path :== vc/vc/delay\n"); fprintf(stderr," vc :== [itf.]vpi.vci[,qos_spec]\n"); fprintf(stderr," delay :== timeunit\n"); - fprintf(stderr," unit :== s | ms | us\n"); + fprintf(stderr," unit :== s | ms\n"); exit(1); } @@ -203,6 +203,7 @@ name = argv[0]; FD_ZERO(&in); + if (argc < 2) usage(name); while (argc > 1) { argc--; argv++; @@ -230,11 +231,6 @@ case 'm': dsc->delay.tv_sec = delay/1000; dsc->delay.tv_usec = (delay % 1000)*1000; - if (*++end != 's') usage(name); - break; - case 'u': - dsc->delay.tv_sec = 0; - dsc->delay.tv_usec = delay; if (*++end != 's') usage(name); break; default: diff -ur --new-file old/atm/doc/usage.tex new/atm/doc/usage.tex --- old/atm/doc/usage.tex Mon Oct 14 19:06:00 1996 +++ new/atm/doc/usage.tex Thu Oct 17 14:50:16 1996 @@ -1,7 +1,7 @@ %%def%:= %:\begin{verbatim} -%:Usage instructions - ATM on Linux, release 0.20 (pre-alpha) +%:Usage instructions - ATM on Linux, release 0.21 (pre-alpha) %:------------------------------------------------------------- %: %:\end{verbatim} @@ -38,14 +38,14 @@ \title{ATM on Linux \\ User's guide \\ - Release 0.20 (pre-alpha)} + Release 0.21 (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{October 14, 1996} +\date{October 15, 1996} \begin{document} \maketitle @@ -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.20.tar.gz} + \url{ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.21.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.20.tar.gz +tar xfz atm-0.21.tar.gz \end{verbatim} and the kernel source: @@ -598,6 +598,8 @@ \item[\raw{-l \meta{logfile}}] write diagnostic messages to the specified file instead of to standard error. The special name \raw{syslog} is used to send diagnostics to the system logger. + \item[\raw{-q \meta{qos}}] configures the ILMI VC to use the specified + quality of service. By default, UBR at link speed is used on the ILMI VC. \item[\raw{-x}] disable inclusion of variable bindings in the ColdstartTrap. Some switches (e.g. the LS100) only work if this option is set. diff -ur --new-file old/atm/doc/usage.txt new/atm/doc/usage.txt --- old/atm/doc/usage.txt Mon Oct 14 19:06:26 1996 +++ new/atm/doc/usage.txt Fri Oct 18 15:05:33 1996 @@ -1,4 +1,4 @@ -Usage instructions - ATM on Linux, release 0.20 (pre-alpha) +Usage instructions - ATM on Linux, release 0.21 (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.20.tar.gz + ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.21.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.20.tar.gz +tar xfz atm-0.21.tar.gz and the kernel source: @@ -486,6 +486,8 @@ -l write diagnostic messages to the specified file instead of to standard error. The special name syslog is used to send diagnostics to the system logger. + -q configures the ILMI VC to use the specified quality of + service. By default, UBR at link speed is used on the ILMI VC. -x disable inclusion of variable bindings in the ColdstartTrap. Some switches (e.g. the LS100) only work if this option is set. diff -ur --new-file old/atm/ilmid/ilmid.c new/atm/ilmid/ilmid.c --- old/atm/ilmid/ilmid.c Wed Aug 21 11:34:05 1996 +++ new/atm/ilmid/ilmid.c Wed Oct 16 20:52:12 1996 @@ -53,7 +53,8 @@ void usage(char *name) { - fprintf(stderr, "usage: %s [-b] [-d] [-l logfile] [-x] \n", name); + fprintf(stderr, "usage: %s [-b] [-d] [-l logfile] [-x] [-q qos] " + "\n", name); exit(1); } @@ -237,10 +238,12 @@ { int fd, opt, itf = 0, bg = 0; pid_t pid; + const char *qos; set_application("ilmid"); set_verbosity(NULL, DIAG_INFO); - while((opt = getopt(argc, argv, "bdhl:x")) != EOF) + qos = NULL; + while((opt = getopt(argc, argv, "bdhl:q:x")) != EOF) switch (opt) { case 'd': @@ -252,6 +255,9 @@ case 'l': set_logfile(optarg); break; + case 'q': + qos = optarg; + break; case 'x': no_var_bindings = 1; break; @@ -278,7 +284,7 @@ } InitNibbleMem(512, 512); - fd = open_ilmi(itf); + fd = open_ilmi(itf,qos); ilmi_loop(fd, itf); close(fd); return 0; diff -ur --new-file old/atm/ilmid/io.c new/atm/ilmid/io.c --- old/atm/ilmid/io.c Mon Sep 9 16:57:43 1996 +++ new/atm/ilmid/io.c Wed Oct 16 16:35:40 1996 @@ -246,20 +246,21 @@ } -int open_ilmi(int itf) +int open_ilmi(int itf,const char *qos_spec) { struct sockaddr_atmpvc addr; struct atm_qos qos; int fd; - + if((fd = socket(PF_ATMPVC, SOCK_DGRAM, ATM_AAL5)) < 0) diag(COMPONENT, DIAG_FATAL, "socket: %s", strerror(errno)); memset(&qos, 0, sizeof(qos)); - qos.rxtp.traffic_class = ATM_UBR; - qos.txtp.traffic_class = ATM_UBR; qos.rxtp.max_sdu = MAX_ILMI_MSG; qos.txtp.max_sdu = MAX_ILMI_MSG; + if (!qos_spec) qos.rxtp.traffic_class = qos.txtp.traffic_class = ATM_UBR; + else if (text2qos(qos_spec,&qos,T2Q_DEFAULTS) < 0) + diag(COMPONENT,DIAG_FATAL,"invalid qos: %s",qos_spec); if (setsockopt(fd, SOL_ATM, SO_ATMQOS, &qos, sizeof(qos)) < 0) diag(COMPONENT,DIAG_FATAL,"setsockopt SO_ATMQOS: %s",strerror(errno)); diff -ur --new-file old/atm/ilmid/io.h new/atm/ilmid/io.h --- old/atm/ilmid/io.h Wed Aug 21 11:34:06 1996 +++ new/atm/ilmid/io.h Wed Oct 16 16:21:27 1996 @@ -45,6 +45,6 @@ int wait_for_message(int fd, struct timeval *timeout); int read_message(int fd, Message *message); int send_message(int fd, Message *message); -int open_ilmi(int itf); +int open_ilmi(int itf,const char *qos_spec); #endif diff -ur --new-file old/atm/lib/text2qos.c new/atm/lib/text2qos.c --- old/atm/lib/text2qos.c Thu Oct 10 18:37:10 1996 +++ new/atm/lib/text2qos.c Thu Oct 17 22:44:26 1996 @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -46,21 +47,39 @@ const char mult[] = "kKmMgGg"; const char *multiplier; char *end; - unsigned int rate; + unsigned int rate,fract; + int power; if (!strncmp(*text,"max",3)) { *text += 3; return ATM_MAX_PCR; } rate = strtoul(*text,&end,10); + power = fract = 0; + if (*end == '.') + for (end++; *end && isdigit(*end); end++) { + fract = fract*10+*end-48; + if (--power == -9) break; + } if (*end && (multiplier = strchr(mult,*end))) { while (multiplier >= mult) { if (rate > UINT_MAX/1000) return RATE_ERROR; rate *= 1000; + power += 3; multiplier -= 2; } end++; } + while (power && fract) + if (power < 0) { + fract /= 10; + power++; + } + else { + fract *= 10; + power--; + } + rate += fract; if (strlen(end) >= 3) if (!strncmp(end,"cps",3)) end += 3; else if (!strncmp(end,"bps",3)) { diff -ur --new-file old/atm/man/Makefile new/atm/man/Makefile --- old/atm/man/Makefile Thu Jan 1 01:00:00 1970 +++ new/atm/man/Makefile Wed Oct 16 10:37:07 1996 @@ -0,0 +1,5 @@ +MAN7=qos.7 + +include ../Rules.make + +all: diff -ur --new-file old/atm/man/qos.7 new/atm/man/qos.7 --- old/atm/man/qos.7 Thu Oct 10 20:17:33 1996 +++ new/atm/man/qos.7 Fri Oct 18 18:15:29 1996 @@ -1,4 +1,4 @@ -.TH QOS 7 "Oct 10, 1996" "Linux" "Miscellaneous" +.TH QOS 7 "Oct 18, 1996" "Linux" "Miscellaneous" .SH NAME qos \- Quality of Service specification .SH DESCRIPTION @@ -52,8 +52,10 @@ (cells per second) and \fBbps\fP (bits per second) are recognized. If multiplier and unit are omitted, cells per second are assumed. Note that the rate is always converted to cells per second, so rounding errors -may occur when specifying the rate in bits per second. The rate must be -an integer, even if using a multiplier. It is an error to specify only a +may occur when specifying the rate in bits per second. Rates measured in +bits per second are considered to be user data rates, i.e. one cell +corresponds to 384 bits. The rate can be a fractional value, e.g. +\fB1.3Mbps\fP. It is an error to specify only a multiplier without a unit. Link speed can be indicated by using the keyword \fBmax\fP as the rate. .IP \fIsize\fP diff -ur --new-file old/atm/mkbindist new/atm/mkbindist --- old/atm/mkbindist Thu Jan 1 01:00:00 1970 +++ new/atm/mkbindist Fri Oct 18 18:03:42 1996 @@ -0,0 +1,15 @@ +#!/bin/sh +# +# mkbindist - Makes a binary distribution of the ATM on Linux utilities. +# Note it _doesn't_ include kernel images or kernel patches. +# The base directory is assumed to be /usr (not /usr/local) +# +mkdir bin +INSTROOT=`pwd`/bin +INSTPREFIX=$INSTROOT/usr +export INSTROOT INSTPREFIX +make -e install +cd bin +tar cvf - . | gzip -9 >../atm-`cat ../VERSION`-bin.tar.gz +cd .. +rm -rf bin diff -ur --new-file old/atm/mkdist new/atm/mkdist --- old/atm/mkdist Mon Oct 14 19:24:34 1996 +++ new/atm/mkdist Wed Oct 16 22:17:49 1996 @@ -15,10 +15,11 @@ atm/VERSION atm/README atm/README.DRIVERS atm/CREDITS atm/USAGE \ atm/CHANGES atm/BUGS \ atm/COPYING atm/COPYING.GPL \ - atm/Makefile atm/Rules.make atm/mkdist atm/mkdiff atm/.kernel \ + atm/Makefile atm/Rules.make atm/mkdist atm/mkdiff atm/mkbindist \ + atm/.kernel \ atm/doc/README atm/doc/usage.tex atm/doc/usage.txt atm/doc/url.sty \ atm/doc/Makefile atm/doc/rlatex atm/doc/t2a.pl \ - atm/man/qos.7 \ + atm/man/Makefile atm/man/qos.7 \ atm/sigd/Makefile atm/sigd/atmsigd.c atm/sigd/cfg.l atm/sigd/cfg.y \ atm/sigd/io.h atm/sigd/io.c atm/sigd/kernel.c atm/sigd/proto.h \ atm/sigd/proto.c atm/sigd/q2931.c atm/sigd/timeout.c atm/sigd/timeout.h \ diff -ur --new-file old/atm/sigd/atmsigd.8 new/atm/sigd/atmsigd.8 --- old/atm/sigd/atmsigd.8 Mon Oct 14 18:55:01 1996 +++ new/atm/sigd/atmsigd.8 Thu Oct 17 14:52:55 1996 @@ -1,4 +1,4 @@ -.TH ATMSIGD 8 "Oct 14, 1996" "Linux" "Maintenance Commands" +.TH ATMSIGD 8 "Oct 17, 1996" "Linux" "Maintenance Commands" .SH NAME atmsigd \- ATM signaling demon .SH SYNOPSIS @@ -44,7 +44,7 @@ Prints addresses in numeric format only, i.e. no address to name translation is attempted. .IP \fB\-N\fP -Makes \fPatmsigd\fB behave like the network side of the UNI (useful if you +Makes \fBatmsigd\fP behave like the network side of the UNI (useful if you have two PCs but no switch). Normally, it acts as the user side. .IP \fB\-q\ \fIqos\fP Configures the signaling VC to use the specified quality of service (see @@ -69,8 +69,9 @@ When receiving a \fBSIGUSR1\fP signals, \fBatmsigd\fP dumps the list of all internal socket descriptors. With \fBSIGUSR2\fP, it dumps the contents of the trace buffer. If a dump directory was set, dumps are written to files -called \fBatmsigd.\fIpid\fB.status.\fInumber\fP and -\fBatmsigd.\fIpid\fB.trace.\fInumber\fP, respectively, with \fInumber\fP +called \fBatmsigd.\fP\fIpid\fP\fB.status.\fP\fInumber\fP and +\fBatmsigd.\fP\fIpid\fP\fB.trace.\fP\fInumber\fP, respectively, with +\fInumber\fP starting at zero and being incremented for every dump. If no dump directory is set, dumps are written to standard error. .P .