diff -ur --new-file old/atm/CHANGES new/atm/CHANGES --- old/atm/CHANGES Fri Nov 29 18:00:19 1996 +++ new/atm/CHANGES Fri Dec 20 21:09:25 1996 @@ -1,3 +1,26 @@ +Version 0.24 to 0.25 (20-DEC-1996) +==================== + +Bug fixes +--------- + + - net/atm/atmarp.c:idle_timer_check only expired every other entry (reported + by Marko Kiiskila) + +New features +------------ + + - LANE now also supports IPX (SNAP and 802.3; by Marko Kiiskila) + - NICStAR driver now supports VPI != 0 and has configurable settings in + nicstar.h (by Stuart Daniel) + +Other changes +------------- + + - ENI: TX DMA scratch are is now stored per device. This should allow multiple + NICs to coexist. + + Version 0.23 to 0.24 (29-NOV-1996) ==================== diff -ur --new-file old/atm/README new/atm/README --- old/atm/README Fri Nov 29 17:55:24 1996 +++ new/atm/README Fri Dec 20 21:03:14 1996 @@ -1,4 +1,4 @@ -ATM on Linux, release 0.24 (pre-alpha) by Werner Almesberger, EPFL LRC +ATM on Linux, release 0.25 (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/USAGE new/atm/USAGE --- old/atm/USAGE Fri Nov 29 19:03:00 1996 +++ new/atm/USAGE Fri Dec 20 21:25:32 1996 @@ -1,4 +1,4 @@ -Usage instructions - ATM on Linux, release 0.24 (pre-alpha) +Usage instructions - ATM on Linux, release 0.25 (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.24.tar.gz + ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.25.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 @@ -33,7 +33,7 @@ all the files listed above there. Then extract the ATM on Linux distribution: -tar xfz atm-0.24.tar.gz +tar xfz atm-0.25.tar.gz and the kernel source: @@ -101,7 +101,9 @@ Chemnitz, see also ftp://ftp.infotech.tu-chemnitz.de/pub/linux-atm . The IDT 77201 driver currently only supports native ATM, i.e. IP over ATM -or LANE are not possible (and should not be tried). +or LANE are not possible (and should not be tried). A fix for this is being +worked on. Note that the file drivers/atm/nicstar.h contains a few +configurable settings. Support for a simple type of serial consoles is automatically added by the ATM patch. If you're using LILO, you can enable it by putting a line like diff -ur --new-file old/atm/VERSION new/atm/VERSION --- old/atm/VERSION Fri Nov 29 17:55:12 1996 +++ new/atm/VERSION Fri Dec 20 20:55:19 1996 @@ -1 +1 @@ -0.24 +0.25 diff -ur --new-file old/atm/atm.patch new/atm/atm.patch --- old/atm/atm.patch Fri Nov 29 20:07:37 1996 +++ new/atm/atm.patch Fri Dec 20 21:49:23 1996 @@ -753,8 +753,8 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/drivers/atm/eni.c Fri Nov 15 19:06:23 1996 -@@ -0,0 +1,1966 @@ ++++ work/drivers/atm/eni.c Fri Dec 20 20:53:53 1996 +@@ -0,0 +1,1959 @@ +/* drivers/atm/eni.c - Efficient Networks ENI155P device driver */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -1678,13 +1678,6 @@ + +static enum enq_res do_tx(struct sk_buff *skb) +{ -+ /* @@@ -+ * This static var may break with multiple adapters if multiple -+ * instances of do_tx (for different cards) are active concurrently. -+ * Moving it to eni_dev may cause a performance drop, so I'm avoiding -+ * that for now. -+ */ -+ static unsigned long dma[TX_DMA_BUF*2]; + struct atm_vcc *vcc; + struct eni_dev *eni_dev; + struct eni_vcc *eni_vcc; @@ -1754,25 +1747,25 @@ + } + /* prepare DMA queue entries */ + j = 0; -+ dma[j++] = (((tx->tx_pos+TX_DESCR_SIZE) & (tx->words-1)) << ++ eni_dev->dma[j++] = (((tx->tx_pos+TX_DESCR_SIZE) & (tx->words-1)) << + MID_DMA_COUNT_SHIFT) | (tx->index << MID_DMA_CHAN_SHIFT) | + MID_DT_JK; + j++; + if (!skb->atm.iovcnt) + if (aal5) -+ put_dma(tx->index,dma,&j,(unsigned long) skb->data, -+ skb->len); -+ else put_dma(tx->index,dma,&j,(unsigned long) skb->data+4, -+ skb->len-4); ++ put_dma(tx->index,eni_dev->dma,&j, ++ (unsigned long) skb->data,skb->len); ++ else put_dma(tx->index,eni_dev->dma,&j, ++ (unsigned long) skb->data+4,skb->len-4); + else { +DPRINTK("doing direct send\n"); + for (i = 0; i < skb->atm.iovcnt; i++) -+ put_dma(tx->index,dma,&j,(unsigned long) ++ put_dma(tx->index,eni_dev->dma,&j,(unsigned long) + ((struct iovec *) skb->data)[i].iov_base, + ((struct iovec *) skb->data)[i].iov_len); + } + /* JK for AAL5 trailer - AAL0 doesn't need it, but who cares ... */ -+ dma[j++] = (((tx->tx_pos+size) & (tx->words-1)) << ++ eni_dev->dma[j++] = (((tx->tx_pos+size) & (tx->words-1)) << + MID_DMA_COUNT_SHIFT) | (tx->index << MID_DMA_CHAN_SHIFT) | + MID_DMA_END | MID_DT_JK; + j++; @@ -1791,8 +1784,8 @@ + skb->len; + j = j >> 1; + for (i = 0; i < j; i++) { -+ eni_dev->tx_dma[dma_wr*2] = dma[i*2]; -+ eni_dev->tx_dma[dma_wr*2+1] = dma[i*2+1]; ++ eni_dev->tx_dma[dma_wr*2] = eni_dev->dma[i*2]; ++ eni_dev->tx_dma[dma_wr*2+1] = eni_dev->dma[i*2+1]; + dma_wr = (dma_wr+1) & (NR_DMA_TX-1); + } + skb->atm.pos = tx->tx_pos; @@ -2722,8 +2715,8 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/drivers/atm/eni.h Fri Nov 15 21:04:21 1996 -@@ -0,0 +1,113 @@ ++++ work/drivers/atm/eni.h Fri Dec 20 20:53:55 1996 +@@ -0,0 +1,114 @@ +/* drivers/atm/eni.h - Efficient Networks ENI155P device driver declarations */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -2806,6 +2799,7 @@ + struct sk_buff_head tx_queue; /* PDUs currently being TX DMAed*/ + struct wait_queue *tx_wait; /* for close */ + int tx_bw; /* remaining bandwidth */ ++ unsigned long dma[TX_DMA_BUF*2]; /* DMA request scratch area */ + /*-------------------------------- RX part */ + unsigned long serv_read; /* host service read index */ + struct atm_vcc *fast,*last_fast;/* queues of VCCs with pending PDUs */ @@ -8398,8 +8392,8 @@ + return 0; +} --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/drivers/atm/nicstar.h Fri Nov 15 20:23:35 1996 -@@ -0,0 +1,265 @@ ++++ work/drivers/atm/nicstar.h Fri Dec 20 21:02:13 1996 +@@ -0,0 +1,305 @@ +/* nicstar.h, M. Welsh (matt.welsh@cl.cam.ac.uk) + * Definitions for IDT77201. + * @@ -8421,6 +8415,23 @@ + * + * M. Welsh, 6 July 1996 + * ++ * ++ * Configuration notes: ++ * Driver can be configured by defining/undefining ++ * the configuration options below. ++ * Supported VPI/VCI range can be adjusted; search for ++ * CFG_VPIVCI for more info. ++ * A 128k x 32 SRAM board might require adjusting some constants ++ * below; see IDT 77201 NICStAR User's Manual ++ * ++ * If you want to use a different size for the small free buffers, ++ * be sure to set SM_BUFSZ to the actual buffer size + 4 ++ * ++ * I'm not convinced that the CBR support is "accurate"; if you want ++ * to find out what's wrong, feel free. ++ * ++ * S. Daniel, Nov. 25, 1996 ++ * + */ + +#ifndef _LINUX_NICSTAR_H @@ -8433,6 +8444,15 @@ + +#define NICSTAR_DEV_MAJOR 35 + ++/* misc configuration options */ ++#define NICSTAR_FASTXMIT 1 /* Lies about buffer lengths to speed xmit ++ possibly insecure (see nicstar.c) */ ++#define NICSTAR_CBR 1 /* Constant bit rate support */ ++#undef NICSTAR_RCQ /* Raw cell queue support; just prints out raw cells */ ++#define NICSTAR_PARANOID 1 /* adds some extra checks */ ++#undef TEST_LOOPBACK /* enables PHY-level loopback */ ++#undef ATM_013 ++ +/* Kernel definitions ******************************************************/ + +#ifdef __KERNEL__ @@ -8488,15 +8508,6 @@ + VPM = 0x50 +}; + -+/* misc configuration options (experimental) */ -+#define NICSTAR_FASTXMIT 1 -+#define NICSTAR_CBR 1 /* Constant bit rate support */ -+#undef NICSTAR_RCQ /* Raw cell queue support */ -+#define NICSTAR_PARANOID 1 /* adds some extra checks */ -+#undef TEST_LOOPBACK /* enables PHY-level loopback */ -+#undef ATM_013 -+ -+ +/* SRAM locations */ +#define NICSTAR_VBR_SCD0 (0x1e7f4) +#define NICSTAR_VBR_SCD1 (0x1e7e8) @@ -8554,9 +8565,13 @@ +#define CBRSCQ_SIZE (1024) /* space to reserve for each */ +#define CBRSCQ_ENTRIES (CBRSCQ_SIZE / TBD_SIZE) /* # entries in a CBR SCQ */ +#ifdef NICSTAR_CBR -+#define SCQFULL_MAGIC (0xf0000000) -+#define CBRSCQFULL_MAGIC (0xc0000000) -+#define CBRSCQFULL_MAGIC_CLOSE (0xe0000000) ++/* magic #s must be non-zero; restrict to high two bits to support ++ largest possible receive table (8 VPI bits, 6 VCI bits) ++ Magic #s must be non-zero to distinguish them from the timestamp ++ overflow */ ++#define SCQFULL_MAGIC (0xc0000000) ++#define CBRSCQFULL_MAGIC (0x80000000) ++#define CBRSCQFULL_MAGIC_CLOSE (0x40000000) +#else +#define SCQFULL_MAGIC (0xfeed0000) +#endif @@ -8610,8 +8625,27 @@ +#endif +} nicstar_vcimap; + -+#define NUM_VCI (4096) /* Size of Rx conn table, indexed by VCI only */ -+#define NUM_VCI_BITS (12) /* Num sig bits */ ++/* Valid combinations for VPI/VCI: ++ 4k table, no VPI, 12b VCI (set CFG_VPIVCI to 0x00000) ++ 4k table, 1b VPI, 11b VCI (set CFG_VPIVCI to 0x40000) ++ 4k table, 2b VPI, 10b VCI (set CFG_VPIVCI to 0x80000) ++ 4k table, 8b VPI, 4b VCI (set CFG_VPIVCI to 0xc0000) ++ *** below only for boards with 128k x 32b SRAM *** ++ 8k table, no VPI, 13b VCI (set CFG_VPIVCI to 0x10000) ++ 8k table, 1b VPI, 12b VCI (set CFG_VPIVCI to 0x50000) ++ 8k table, 2b VPI, 11b VCI (set CFG_VPIVCI to 0x90000) ++ 8k table, 8b VPI, 5b VCI (set CFG_VPIVCI to 0xd0000) ++ 16k table, no VPI, 14b VCI (set CFG_VPIVCI to 0x20000) ++ 16k table, 1b VPI, 13b VCI (set CFG_VPIVCI to 0x60000) ++ 16k table, 2b VPI, 12b VCI (set CFG_VPIVCI to 0xa0000) ++ 16k table, 8b VPI, 6b VCI (set CFG_VPIVCI to 0xe0000) ++ You will need to define each of the below to match the desired config ++ */ ++#define CFG_VPIVCI 0x40000 ++#define NUM_VCI (2048) /* Size of Rx conn table, indexed by VCI only */ ++#define NUM_VCI_BITS (11) /* Num sig bits */ ++#define NUM_VPI (2) /* Only VPI 0 currently defined */ ++#define NUM_VPI_BITS (1) /* Number of bits required for above */ + +typedef struct nicstar_buf_list { + caddr_t buf_addr; @@ -8657,7 +8691,7 @@ + caddr_t scq_orig; + + struct atm_dev *dev; -+ nicstar_vcimap vci_map[NUM_VCI]; ++ nicstar_vcimap vci_map[NUM_VPI * NUM_VCI]; + unsigned char tmp_cell[48]; + +} nicstar_dev, *nicstar_devp; @@ -8666,8 +8700,8 @@ + +#endif /* _LINUX_NICSTAR_H_ */ --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/drivers/atm/nicstar.c Fri Nov 15 22:01:13 1996 -@@ -0,0 +1,1923 @@ ++++ work/drivers/atm/nicstar.c Fri Dec 20 21:02:26 1996 +@@ -0,0 +1,1926 @@ +/* nicstar.c, M. Welsh (matt.welsh@cl.cam.ac.uk) + * + * Linux driver for the IDT77201 NICStAR PCI ATM controller. @@ -8696,7 +8730,7 @@ + * + */ + -+static char _modversion[] = "@(#) nicstar.c, $Id: nicstar.c,v 1.28 1996/11/12 23:17:53 swdaniel Exp $"; ++static char _modversion[] = "@(#) nicstar.c, $Id: nicstar.c,v 1.31 1996/11/25 21:05:54 swdaniel Exp $"; + +#include +#include @@ -8808,7 +8842,7 @@ + if (error) return error; + vcc->vpi = vpi; + vcc->vci = vci; -+ vcc->dev_data = &(node->vci_map[vci]); ++ vcc->dev_data = &(node->vci_map[(vpi << NUM_VCI_BITS) | vci]); + vcc->flags |= ATM_VF_ADDR; + +#if NICSTAR_CBR @@ -8817,7 +8851,7 @@ +#else + if (vcc->txtp.class == ATM_CBR) { +#endif -+ printk("Opening CBR connection on vpci %d.%d\n",vpi,vci); ++ PRINTK("Opening CBR connection on vpci %d.%d\n",vpi,vci); + alloc_tx(node,vcc); + } +#endif @@ -8838,7 +8872,7 @@ + printk ("nicstar%d: invalid AAL %d on open",node->index,vcc->aal); + return -EINVAL; + } -+ open_rx_connection(node, vci, status); ++ open_rx_connection(node, (vpi << NUM_VCI_BITS) | vci, status); + } + + vcc->flags |= ATM_VF_PARTIAL; @@ -8865,7 +8899,7 @@ +#else + if (vcc->rxtp.class != ATM_NONE) { +#endif -+ close_rx_connection(node, vcc->vci); ++ close_rx_connection(node, (vcc->vpi << NUM_VCI_BITS) | vcc->vci); + vcc->flags &= ~ATM_VF_PARTIAL; + mapval->rx = 0; + } @@ -8940,7 +8974,8 @@ + nicstar_scq *scq; + u32 rate; +#ifdef NICSTAR_FASTXMIT -+ int len, len_buf; ++ int len; ++ int len_buf = 0; +#else + nicstar_tbd tbd2, tbd3; +#endif @@ -8986,7 +9021,7 @@ + + skb->atm.vcc = vcc; + -+ vci = vcc->vci; ++ vci = (vcc->vpi << NUM_VCI_BITS) | vcc->vci; +#ifndef ATM_013 + if (vcc->qos.txtp.traffic_class == ATM_CBR) { +#else @@ -9032,6 +9067,7 @@ + len = (((skb->len + 8 + 47) / 48) * 48); + pad = len - skb->len; + PRINTK ("new len %d skb len %ld skb end %x skb tail %x\n",len,skb->len,(u32)skb->end,(u32)skb->tail); ++ + if (!(node->rev_C3)) { /* SAR supports mod 4 buffer sizes */ + len_buf = (((skb->len + 3) / 4) * 4); + if (pad == 0) { @@ -9050,7 +9086,7 @@ + + tbd1.buf_addr = (u32)skb->data; + tbd1.ctl_len = skb->len; -+ tbd1.cell_hdr = (vcc->vci << 4); ++ tbd1.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + scq->scq_shadow[sindex].skb = skb; + + if (!(node->rev_C3) && (pad != 0)) { @@ -9058,7 +9094,7 @@ + tbd1.status = TBD_AAL5 | TBD_ENDPDU | rate | (len - len_buf); + tbd1.buf_addr = (u32)node->tmp_cell; + tbd1.ctl_len = skb->len; -+ tbd1.cell_hdr = (vcc->vci << 4); ++ tbd1.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + push_scq_entry(node, scq, &tbd1, 1); + } + else { @@ -9083,7 +9119,7 @@ + tbd1.status = 0x08810000 | (((skb->len - (40 - pad))/sizeof(u32)) << 2); + tbd1.buf_addr = (u32)skb->data; + tbd1.ctl_len = skb->len; -+ tbd1.cell_hdr = (vcc->vci << 4); ++ tbd1.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + + node->scq->scq_shadow[sindex].skb = skb; + push_scq_entry(node, node->scq, &tbd1, 0); @@ -9091,7 +9127,7 @@ + tbd2.status = 0x48810030; + tbd2.buf_addr = (u32)(node->scq->scq_shadow[sindex].cell); + tbd2.ctl_len = skb->len; -+ tbd2.cell_hdr = (vcc->vci << 4); ++ tbd2.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + + push_scq_entry(node, node->scq, &tbd2, 1); + @@ -9105,7 +9141,7 @@ + tbd1.status = 0x08810000 | (((skb->len - (48 - pad))/sizeof(u32)) << 2); + tbd1.buf_addr = (u32)skb->data; + tbd1.ctl_len = skb->len; -+ tbd1.cell_hdr = (vcc->vci << 4); ++ tbd1.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + + node->scq->scq_shadow[sindex].skb = skb; + push_scq_entry(node, node->scq, &tbd1, 0); @@ -9113,14 +9149,14 @@ + tbd2.status = 0x08810030; + tbd2.buf_addr = (u32)(node->scq->scq_shadow[sindex].cell); + tbd2.ctl_len = skb->len; -+ tbd2.cell_hdr = (vcc->vci << 4); ++ tbd2.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + + push_scq_entry(node, node->scq, &tbd2, 0); + + tbd3.status = 0x48810030; + tbd3.buf_addr = (u32)(node->tmp_cell); + tbd3.ctl_len = skb->len; -+ tbd3.cell_hdr = (vcc->vci << 4); ++ tbd3.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + + push_scq_entry(node, node->scq, &tbd3, 1); + } @@ -9134,7 +9170,7 @@ + tbd1.status = 0x48810030; + tbd1.buf_addr = (u32)(node->scq->scq_shadow[sindex].cell); + tbd1.ctl_len = skb->len; -+ tbd1.cell_hdr = (vcc->vci << 4); ++ tbd1.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + + node->scq->scq_shadow[sindex].skb = skb; + push_scq_entry(node, node->scq, &tbd1, 1); @@ -9150,7 +9186,7 @@ + tbd1.status = 0x08810030; + tbd1.buf_addr = (u32)(node->scq->scq_shadow[sindex].cell); + tbd1.ctl_len = skb->len; -+ tbd1.cell_hdr = (vcc->vci << 4); ++ tbd1.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + + node->scq->scq_shadow[sindex].skb = skb; + push_scq_entry(node, node->scq, &tbd1, 0); @@ -9158,7 +9194,7 @@ + tbd2.status = 0x48810030; + tbd2.buf_addr = (u32)(node->tmp_cell); + tbd2.ctl_len = skb->len; -+ tbd2.cell_hdr = (vcc->vci << 4); ++ tbd2.cell_hdr = (vcc->vpi << 20) | (vcc->vci << 4); + + push_scq_entry(node, node->scq, &tbd2, 1); + @@ -9347,7 +9383,7 @@ + node->dev->esi[5] = '\110'; + node->dev->dev_data = node; + -+ node->dev->ci_range.vpi_bits = 0; ++ node->dev->ci_range.vpi_bits = NUM_VPI_BITS; + node->dev->ci_range.vci_bits = NUM_VCI_BITS; + + } @@ -9753,12 +9789,12 @@ + +#if NICSTAR_RCQ + /* Turn on everything */ -+ writel(0x21801c38 | 0x200 | 0x800, node->membase+CFG); ++ writel(0x21801c38 | CFG_VPIVCI | 0x200 | 0x800, node->membase+CFG); + /* | 0x800 turns on raw cell interrupts */ + /* | 0x200 for raw cell receive */ + /* | 0x8000 to receive cells that don't map via RCT (not there/closed) */ +#else -+ writel(0x21801c38, node->membase+CFG); /* Turn on everything */ ++ writel(0x21801c38 | CFG_VPIVCI, node->membase+CFG); /* Turn on everything */ +#endif + + while(CMD_BUSY(node)); @@ -9875,18 +9911,18 @@ + wake_up_interruptible(&node->scq->scqfull_waitq); + } +#else -+ id = (node->tx_statq_next->status & 0xf0000000) >> 16; ++ id = (node->tx_statq_next->status & 0xc0000000) >> 16; + switch (id) { + case (SCQFULL_MAGIC >> 16): + scq = node->scq; + break; +#if NICSTAR_CBR + case (CBRSCQFULL_MAGIC_CLOSE >> 16): -+ scq = node->vci_map[(node->tx_statq_next->status & 0x0fff0000)>>16].scq; ++ scq = node->vci_map[(node->tx_statq_next->status & 0x3fff0000)>>16].scq; + scq->closing = 1; + break; + case (CBRSCQFULL_MAGIC >> 16): -+ scq = node->vci_map[(node->tx_statq_next->status & 0x0fff0000)>>16].scq; ++ scq = node->vci_map[(node->tx_statq_next->status & 0x3fff0000)>>16].scq; + break; +#endif + default: @@ -10170,16 +10206,16 @@ + nicstar_vcimap *mapval; + + PRINTK ("Reserving vci %d\n",(u32) *vci); -+ /* We accept VPI 0 and VCI 0-4095. */ ++ /* Default, accept VPI 0 and VCI 0-4095. */ + if (*vpi == ATM_VPI_UNSPEC || *vci == ATM_VCI_UNSPEC) return -EINVAL; + + if (*vpi == ATM_VPI_ANY) *vpi = 0; -+ if (*vpi != 0) return -EINVAL; ++ if (*vpi >= NUM_VPI) return -EINVAL; + + if (*vci == ATM_VCI_ANY) { + /* Find lowest VCI */ +#ifndef ATM_013 -+ for (*vci = ATM_NOT_RSV_VCI; *vci < NUM_VCI; (*vci)++) { ++ for (*vci = (*vpi) * NUM_VCI + ATM_NOT_RSV_VCI; *vci < (*vpi + 1) * NUM_VCI; (*vci)++) { + mapval = &(node->vci_map[*vci]); + if (vcc->qos.rxtp.traffic_class != ATM_NONE && mapval->rx) continue; + if (vcc->qos.txtp.traffic_class != ATM_NONE && mapval->tx) continue; @@ -10206,7 +10242,7 @@ + } else { + /* Use this particular VCI */ + if (*vci >= NUM_VCI) return -EINVAL; -+ mapval = &(node->vci_map[*vci]); ++ mapval = &(node->vci_map[(*vpi << NUM_VCI_BITS) | *vci]); +#ifndef ATM_013 + if (vcc->qos.rxtp.traffic_class != ATM_NONE && mapval->rx) return -EADDRINUSE; + if (vcc->qos.txtp.traffic_class != ATM_NONE && mapval->tx) return -EADDRINUSE; @@ -10268,20 +10304,21 @@ + unsigned short aal5_len; + unsigned short aal0_len; + u32 *aal0_ptr; ++ u32 vpi, vci; ++ ++ vpi = (entry->vpi_vci & 0x00ff0000) >> 16; ++ vci = entry->vpi_vci & 0xffff; + -+ if ((entry->vpi_vci & 0x00ff0000) || -+ ((entry->vpi_vci & 0xffff) > NUM_VCI)) { ++ if ((vpi >= NUM_VPI) || (vci >= NUM_VCI)) { + printk("nicstar%d: SDU received for out of range VC %d.%d.\n", -+ node->index, -+ entry->vpi_vci >> 16, -+ entry->vpi_vci & 0xffff); ++ node->index, vpi, vci); + return; + } + -+ mapval = &(node->vci_map[entry->vpi_vci]); ++ mapval = &(node->vci_map[(vpi << NUM_VCI_BITS) | vci]); + if (!mapval->rx) { -+ printk("nicstar%d: SDU received on inactive VC 0.%d.\n", -+ node->index, entry->vpi_vci); ++ printk("nicstar%d: SDU received on inactive VC %d.%d.\n", ++ node->index, vpi, vci); + } + vcc = mapval->rx_vcc; + @@ -10441,7 +10478,7 @@ + int spacing; + int vci; + -+ vci = vcc->vci; ++ vci = (vcc->vpi << NUM_VCI_BITS) | vcc->vci; + create_scq(&((node->vci_map[vci]).scq),CBRSCQ_SIZE); + (node->vci_map[vci].scq)->id = CBRSCQFULL_MAGIC | (vci << 16); + PRINTK ("nicstar%d: Allocating CBR SCQ at %x\n",node->index,(u32) ((node->vci_map[vci]).scq)); @@ -13829,8 +13866,8 @@ + +#endif --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/atmarp.c Fri Nov 15 19:06:35 1996 -@@ -0,0 +1,605 @@ ++++ work/net/atm/atmarp.c Fri Dec 20 20:43:26 1996 +@@ -0,0 +1,608 @@ +/* atmarp.c - RFC1577 ATM ARP */ + +/* Written 1995,1996 by Werner Almesberger, EPFL LRC */ @@ -14004,19 +14041,22 @@ + unsigned long expire; + + idle_timer.expires = UINT_MAX; -+ for (itf = clip_devs; itf; itf = PRIV(itf)->next) -+ for (entry = &PRIV(itf)->table; *entry; -+ entry = &(*entry)->next) ++ for (itf = clip_devs; itf; itf = PRIV(itf)->next) { ++ entry = &PRIV(itf)->table; ++ while (*entry) { + if ((*entry)->idle_timeout) { + expire = (*entry)->last_use+(*entry)-> + idle_timeout; + if (expire < jiffies) { + time_out_entry(entry); -+ if (!*entry) break; ++ continue; + } + else if (expire < idle_timer.expires) + idle_timer.expires = expire; + } ++ entry = &(*entry)->next; ++ } ++ } + if (idle_timer.expires < jiffies+CLIP_CHECK_INTERVAL*HZ) + idle_timer.expires = jiffies+CLIP_CHECK_INTERVAL*HZ; + del_timer(&idle_timer); @@ -17183,8 +17223,8 @@ +}; +#endif /* _ATMLEC_H_ */ --- /dev/null Mon Jul 18 01:46:18 1994 -+++ work/net/atm/lec.c Tue Nov 26 16:08:44 1996 -@@ -0,0 +1,641 @@ ++++ work/net/atm/lec.c Wed Dec 4 13:13:39 1996 +@@ -0,0 +1,646 @@ +/* + * lec.c: Lan Emulation driver + * Marko Kiiskila carnil@cs.tut.fi @@ -17306,8 +17346,9 @@ + + /* Put le header to place */ + lec_h = (struct lecdatahdr_8023*)skb->data; ++ /* + lec_h->le_header = htons(priv->lecid); -+ ++ */ +#if DUMP_PACKETS > 0 + printk("%s: send datalen:%ld lecid:%4.4x\n", dev->name, + skb->len, priv->lecid); @@ -17422,7 +17463,6 @@ + /* Destination addr */ + if (daddr) { + memcpy(hdr->h_dest, daddr, dev->addr_len); -+ hdr->le_header = 0; + return dev->hard_header_len; + } + return -dev->hard_header_len; @@ -17680,6 +17720,7 @@ + struct device *dev = (struct device *)vcc->proto_data; + struct lec_priv *priv = (struct lec_priv *)dev->priv; + struct lecdatahdr_8023 *hdr; ++ unsigned char *rawp; +#if DUMP_PACKETS >0 + int i=0; + char buf[300]; @@ -17743,6 +17784,10 @@ + else + skb->protocol = htons(ETH_P_802_2); + skb->h.raw = skb_pull(skb, LEC_HEADER_LEN); ++ rawp = skb->data; ++ /* Magic hack for IPX ... */ ++ if (*(unsigned short*)rawp == 0xFFFF) ++ skb->protocol = htons(ETH_P_802_3); + netif_rx(skb); + priv->stats.rx_packets++; + } diff -ur --new-file old/atm/doc/usage.tex new/atm/doc/usage.tex --- old/atm/doc/usage.tex Fri Nov 29 18:01:27 1996 +++ new/atm/doc/usage.tex Fri Dec 20 21:11:32 1996 @@ -1,7 +1,7 @@ %%def%:= %:\begin{verbatim} -%:Usage instructions - ATM on Linux, release 0.24 (pre-alpha) +%:Usage instructions - ATM on Linux, release 0.25 (pre-alpha) %:------------------------------------------------------------- %: %:\end{verbatim} @@ -38,14 +38,14 @@ \title{ATM on Linux \\ User's guide \\ - Release 0.24 (pre-alpha)} + Release 0.25 (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{November 17, 1996} +\date{December 20, 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.24.tar.gz} + \url{ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.25.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 @@ -98,7 +98,7 @@ distribution: \begin{verbatim} -tar xfz atm-0.24.tar.gz +tar xfz atm-0.25.tar.gz \end{verbatim} and the kernel source: @@ -177,7 +177,9 @@ see also \url{ftp://ftp.infotech.tu-chemnitz.de/pub/linux-atm}. The IDT 77201 driver currently only supports native ATM, i.e. IP over ATM -or LANE are not possible (and should not be tried). +or LANE are not possible (and should not be tried). A fix for this is being +worked on. Note that the file \path{drivers/atm/nicstar.h} contains a few +configurable settings. Support for a simple type of serial consoles is automatically added by the ATM patch. If you're using \name{LILO}, you can enable it by putting a line diff -ur --new-file old/atm/doc/usage.txt new/atm/doc/usage.txt --- old/atm/doc/usage.txt Fri Nov 29 19:03:00 1996 +++ new/atm/doc/usage.txt Fri Dec 20 21:25:32 1996 @@ -1,4 +1,4 @@ -Usage instructions - ATM on Linux, release 0.24 (pre-alpha) +Usage instructions - ATM on Linux, release 0.25 (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.24.tar.gz + ftp://lrcftp.epfl.ch/pub/linux/atm/dist/atm-0.25.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 @@ -33,7 +33,7 @@ all the files listed above there. Then extract the ATM on Linux distribution: -tar xfz atm-0.24.tar.gz +tar xfz atm-0.25.tar.gz and the kernel source: @@ -101,7 +101,9 @@ Chemnitz, see also ftp://ftp.infotech.tu-chemnitz.de/pub/linux-atm . The IDT 77201 driver currently only supports native ATM, i.e. IP over ATM -or LANE are not possible (and should not be tried). +or LANE are not possible (and should not be tried). A fix for this is being +worked on. Note that the file drivers/atm/nicstar.h contains a few +configurable settings. Support for a simple type of serial consoles is automatically added by the ATM patch. If you're using LILO, you can enable it by putting a line like diff -ur --new-file old/atm/mkdist new/atm/mkdist --- old/atm/mkdist Fri Nov 29 19:48:31 1996 +++ new/atm/mkdist Fri Dec 20 21:49:01 1996 @@ -33,6 +33,7 @@ atm/qgen/second.c atm/qgen/third.c atm/qgen/op.h atm/qgen/qgen.h \ atm/qgen/qgen.c atm/qgen/ql.l atm/qgen/ql.y atm/qgen/qlib.h \ atm/qgen/qlib.c atm/qgen/q2931.h atm/qgen/qtest.c atm/qgen/uni3x \ + atm/qgen/uni40 \ atm/arpd/Makefile atm/arpd/arp.c atm/arpd/arp.h atm/arpd/atmarpd.c \ atm/arpd/io.c atm/arpd/io.h atm/arpd/itf.c atm/arpd/itf.h \ atm/arpd/table.c atm/arpd/table.h atm/arpd/atmarpd.8 \ diff -ur --new-file old/atm/qgen/Makefile new/atm/qgen/Makefile --- old/atm/qgen/Makefile Wed Nov 6 19:14:21 1996 +++ new/atm/qgen/Makefile Fri Dec 20 21:39:16 1996 @@ -1,7 +1,7 @@ LIBS=-lfl # lex may want -ll here OBJS=common.o file.o first.o lex.yy.o qgen.o second.o third.o y.tab.o TRASH=q.out.h q.out.c qd.out.c qd.dump.c -PGMS=qgen q.out.o qd.dump.o #qtest +PGMS=qgen q.out.o qd.dump.o q40.out.o #qtest NLS=atm_ai_msg atm_ai_ie atm_loc atm_cv atm_pu atm_na atm_cond atm_ie qmsg \ atm_np atm_ton atm_sat atm_prs atm_scrn atm_vpa atm_poe q2931_cs atm_td \ atm_bc atm_tt atm_tr atm_stc atm_upcc q2931_proto atm_flag atm_aalp atm_tag \ @@ -17,6 +17,13 @@ q.out.h q.out.c q.test.c: qgen uni3x default.nl $(CC) $(STANDARDS) -E - #include #include @@ -25,9 +26,12 @@ int main(int argc,char **argv) { + const char *prefix; + + prefix = getenv("PREFIX"); if (argc == 2 && !strcmp(argv[1],"-d")) debug = 1; if (argc == 2 && !strcmp(argv[1],"-D")) dump = 1; - open_files(dump ? "qd" : "q"); + open_files(prefix ? prefix : dump ? "qd" : "q"); to_h("/* THIS IS A MACHINE-GENERATED FILE. DO NOT EDIT ! */\n\n"); to_c("/* THIS IS A MACHINE-GENERATED FILE. DO NOT EDIT ! */\n\n"); to_test("/* THIS IS A MACHINE-GENERATED FILE. DO NOT EDIT ! */\n\n"); diff -ur --new-file old/atm/qgen/qlib.h new/atm/qgen/qlib.h --- old/atm/qgen/qlib.h Thu Nov 28 20:19:44 1996 +++ new/atm/qgen/qlib.h Fri Dec 13 12:50:43 1996 @@ -13,7 +13,11 @@ #endif +#ifdef UNI40 +#include "q40.out.h" +#else #include "q.out.h" +#endif /* diff -ur --new-file old/atm/qgen/uni40 new/atm/qgen/uni40 --- old/atm/qgen/uni40 Thu Jan 1 01:00:00 1970 +++ new/atm/qgen/uni40 Wed Nov 6 19:12:55 1996 @@ -0,0 +1,521 @@ +/* uni40 - UNI 4.0 message format decription */ + +/* Written 1995,1996 by Werner Almesberger, EPFL-LRC */ + + +#undef linux /* grr ... */ + +include "atmsap.h" +include "q2931.h" + + +#define VAR_STD_HDR(name,defl) \ + _ext <1@8,more> = 1 \ + name##_cs "q2931_cs" <2@6,more> = defl \ + _flag "atm_flag" <1@5,more> = ATM_FLAG_NO \ + _action_ind "atm_ai_ie" <3@1> = 0 /* only 2 bits in UNI 3.0 */ \ + _ie_len <16> = recover RECOV_IND_IE length + +#define ITU_STD_HDR VAR_STD_HDR(,Q2931_CS_ITU) +#define NET_STD_HDR VAR_STD_HDR(,Q2931_CS_NET) + + +def ie_aal = { + ITU_STD_HDR { + aal_type <8> = case { + 5 { + _id "atm_aalp" <8> = multi { + ATM_AALP_FW_MAX_SDU { + fw_max_sdu <16> + } + ATM_AALP_BW_MAX_SDU { + bw_max_sdu <16> + } + ATM_AALP_SSCS { + sscs_type <8> + } + } + } + } + } +} + + +def ie_td = { # UNI 3.0 calls this "User Cell Rate" + ITU_STD_HDR { + _id "atm_td" <8> = multi { + ATM_TD_FW_PCR_0 { + fw_pcr_0 <24> + } + ATM_TD_BW_PCR_0 { + bw_pcr_0 <24> + } + ATM_TD_FW_PCR_01 { + fw_pcr_01 <24> + } + ATM_TD_BW_PCR_01 { + bw_pcr_01 <24> + } +#if 0 /* later ... */ + ATM_TD_FW_SCR_0 { + fw_scr_0 <24> + } + ATM_TD_BW_SCR_0 { + bw_scr_0 <24> + } + ATM_TD_FW_SCR_01 { + fw_scr_01 <24> + } + ATM_TD_BW_SCR_01 { + bw_scr_01 <24> + } + ATM_TD_FW_MBS_0 { + fw_mbs_0 <24> + } + ATM_TD_BW_MBS_0 { + bw_mbs_0 <24> + } + ATM_TD_FW_MBS_01 { + fw_mbs_01 <24> + } + ATM_TD_BW_MBS_01 { + bw_mbs_01 <24> + } + ATM_TD_BEST_EFFORT { + best_effort <0> + } + ATM_TD_TM_OPT { + bw_tag "atm_tag" <1@2,more> + fw_tag "atm_tag" <1@1> + } +#endif + } + } +} + + +def ie_bbcap = { + ITU_STD_HDR { + bearer_class "atm_bc" <5@1,more> + _ext <1@8> = case { + 0 { + _ext <1@8,more> = 1 + traf_type "atm_tt" <3@3,more> = ATM_TT_NO_IND + tim_req "atm_tr" <2@1> = ATM_TR_NO_IND + } + default 1 {} + } + _ext <1@8,more> = 1 + susc_clip "atm_stc" <2@6,more> = ATM_STC_NO + upcc "atm_upcc" <2@1> = ATM_UPCC_P2P + } +} + + +def ie_bhli = { + ITU_STD_HDR { + _ext <1@8,more> = 1 + hli_type <7@1> = case { +# Note: cannot use ATM_HL_* here, because those values are incremented by one + 0 { # ISO + iso_hli <-64> + } + 1 { # User Specific + user_hli <-64> + } + 3 { # Vendor-Specific Application identifier + hli_oui <24> + app_id <32> + } + 4 { # Reference to ITU-T SG 1 B-ISDN Teleservice Recommendation + tobedefined <8> + } + } + } +} + + +def ie_blli = { + ITU_STD_HDR { + _lid <2@6,more> = multi { + 1 { + _ext <1@8,more> = 1 + uil1_proto <5@1> + } + 2 { + uil2_proto "atm_l2" <5@1,more> = case { + ATM_L2_X25_LL,ATM_L2_X25_ML,ATM_L2_HDLC_ARM, + ATM_L2_HDLC_NRM,ATM_L2_HDLC_ABM,ATM_L2_Q922, + ATM_L2_ISO7776 { # CCITT encoding + _ext <1@8> = case { + 0 { + l2_mode "atm_imd" <2@6,more> = ATM_IMD_NORMAL + q933 <2@1,more> = 0 + _ext <1@8> = case { + 0 { + window_size <7@1,more> + _ext <1@8> = 1 + } + default 1 {} + } + } + default 1 {} + } + } + ATM_L2_USER { # User specified + _ext <1@8> = 1 + user_l2 <7@1> + } + default ATM_L2_ISO1745,ATM_L2_Q291,ATM_L2_LAPB, + ATM_L2_ISO8802,ATM_L2_X75 { # No additional data + _ext <1@8> = 1 + } + } + } + 3 { + uil3_proto "atm_l3" <5@1,more> = case { + ATM_L3_X25,ATM_L3_ISO8208,ATM_L3_X223 { # CCITT coding + _ext <1@8> = case { + 0 { + l3_mode "atm_imd" <2@6,more> = ATM_IMD_NORMAL + _ext <1@8> = case { + 0 { + def_pck_size <4@1> + _ext <1@8> = case { + 0 { + _ext <1@8> = 1 + pck_win_size <7@1> + } + default 1 {} + } + } + default 1 {} + } + } + default 1 {} + } + } + ATM_L3_TR9577 { # ISO/IEC TR9577 + _ext <1@8> = case { + 0 { + _ext <1@8,more> = 0 + ipi_high <7@1> = case { + 0x40 { # SNAP hack + _ext <1@8,more> = 1 + _ipi_low <1@7> = case { # ugly + 0 { + _ext <1@8,more> = 1 + _snap_id <2@6> = 0 + oui <24> + pid <16> + } + default 1 {} + } + } + default 0x0 { # ugly + _ext <1@8,more> = 1 + ipi_low <1@7> + } + } + } + default 1 {} + } + } + ATM_L3_USER { # User specified + _ext <1@8> = 1 + user_l3 <7@1> + } + } + } + } + } +} + + +def ie_call_state = { + ITU_STD_HDR { + call_state <6@1> + } +} + + +def ie_cdpn = { + ITU_STD_HDR { + _ext <1@8,more> = 1 + _plan "atm_np" <4@1,more> = case { + ATM_NP_E164 { + _type "atm_ton" <3@5> = ATM_TON_INTRNTNL + cdpn_e164 <-40> # @@@ fix this + } + ATM_NP_NSAP { # ATM Endsystem Address + _type "atm_ton" <3@5> = ATM_TON_UNKNOWN + cdpn_esa <-160> + } + } + } +} + + +def ie_cdps = { + ITU_STD_HDR { + _ext <1@8,more> = 1 +#ifdef UNI30 + _type "atm_sat" <3@5,more> = ATM_SAT_NSAP +#endif +#ifdef UNI31 + cdps_type "atm_sat" <3@5,more> = ATM_SAT_NSAP +#endif + _oddeven <1@4> = 0 + cdps <-160> + } +} + + +def ie_cgpn = { # @@@ extend language to allow same trick as for cdpn + ITU_STD_HDR { + cgpn_plan "atm_np" <4@1,more> + cgpn_type "atm_ton" <2@6,more> + _ext <1@8> = case { + 0 { + _ext <1@8,more> = 1 + pres_ind "atm_prs" <2@6,more> = ATM_PRS_ALLOW + scr_ind "atm_scrn" <2@1> = ATM_SCRN_UP_NS + } + default 1 {} + } + cgpn <-160> + } +} + + +def ie_cgps = { + ITU_STD_HDR { + _ext <1@8,more> = 1 +#ifdef UNI30 + _type "atm_sat" <3@5,more> = ATM_SAT_NSAP +#endif +#ifdef UNI31 + cgps_type "atm_sat" <3@5,more> = ATM_SAT_NSAP +#endif + _oddeven <1@4> = 0 + cgps <-160> + } +} + + +def ie_cause = { + VAR_STD_HDR(cause,Q2931_CS_ITU) { + _ext <1@8,more> = 1 + location "atm_loc" <4@1> = ATM_LOC_USER + _ext <1@8,more> = 1 + cause "atm_cv" <7@1> = case { + ATM_CV_UNALLOC,ATM_CV_NO_ROUTE_DEST,ATM_CV_QOS_UNAVAIL { # Note 2 + break + _ext <1@8,more> = 1 + pu "atm_pu" <1@4,more> = ATM_PU_USER + na "atm_na" <1@3,more> = ATM_NA_NORMAL + cond2 "atm_cond" <2@1> = ATM_COND_UNKNOWN + } + ATM_CV_CALL_REJ { # Note 3 + break + _ext <1@8,more> = 1 + cond3 "atm_cond" <2@1,more> = ATM_COND_UNKNOWN + reason <5@3> = case { + ATM_RSN_USER { + user_diag <-216> + } + ATM_RSN_IE_MISS,ATM_RSN_IE_INSUFF { + ie_id3 "atm_ie" <8> + } + } + } + ATM_CV_NUM_CHANGED { # Note 4 + break + new_dest <-224> # good luck ... + } + ATM_CV_REJ_CLIR { # Note 5 + break + invalid <8> # not supported + } + ATM_CV_CI_ACC_INF_DISC,ATM_CV_INCOMP_DEST,ATM_CV_MAND_IE_MISSING, + ATM_CV_UNKNOWN_IE,ATM_CV_INVALID_IE { # Note 6 + break + ie_id6 <-224> + } + ATM_CV_UCR_UNAVAIL { # Note 8 + break + ucr_id <-224> + } + ATM_CV_NO_SUCH_CHAN { # Note 9 + break + unav_vpci <16> + unav_vci <16> + } + ATM_CV_UNKNOWN_MSG_TYPE,ATM_CV_INCOMP_MSG { # Note 10 + break + bad_msg_type "qmsg" <8> + } + ATM_CV_TIMER_EXP { # Note 11 + break + timer <24> + } + default 0 {} + } + } +} + + +def ie_conn_id = { + ITU_STD_HDR { + _ext <1@8,more> = 1 + _vp_ass "atm_vpa" <2@4,more> = 1 /* explicit */ + _pref_exc "atm_poe" <3@1> = 0 + vpi <16> + vci <16> + } +} + + +def ie_e2e_td = { + ITU_STD_HDR { + _id "atm_tdl" <8> = multi { + ATM_TDL_CUM { + cum_delay <16> + } + ATM_TDL_E2EMAX { + max_delay <16> + } + } + + } +} + + +def ie_qos = { +#ifdef UNI30 + NET_STD_HDR { +#else + /* + * Depending on what values are put into qos_fw and qos_bw, this may + * still be invalid. But at least the defaults should be okay. Note + * that defining UNI30 and UNI31 together yields only the UNI30 + * behaviour. We assume that everybody who implements UNI 3.1 today + * has a similar kludge in their networking code, so we should get + * away with that. + */ + VAR_STD_HDR(qos,Q2931_CS_NET) { +#endif + qos_fw <8> = 0 + qos_bw <8> = 0 + } +} + + +def ie_bbrep = { + ITU_STD_HDR { + _ext <1@8,more> = 1 + rep_ind <4@1> = 2 + } +} + + +def ie_restart = { + ITU_STD_HDR { + _ext <1@8,more> = 1 + rst_class <3@1> + } +} + + +def ie_bbs_comp = { + ITU_STD_HDR { + _ext <1@8,more> = 1 + bbsc_ind <7@1> = 0x21 + } +} + + +def ie_tns = { + ITU_STD_HDR { + _ext <1@8,more> = 1 + _net_type "atm_tni" <3@5,more> = 2 /* @@@ default ? */ + _carrier_id "atm_nip" <4@1> = 1 /* @@@ default ? */ + net_id <-32> # @@@ how many actually ? + } +} + + +def ie_notify = { + ITU_STD_HDR { + notification <-32> # @@@ how many actually ? + } +} + + +def ie_oam_td = { + ITU_STD_HDR { + _ext <1@8,more> = 1 + shaping "atm_shi" <2@6,more> = ATM_SHI_NONE + compliance "atm_oci" <1@5,more> = ATM_OCI_OPT + fault "atm_unfm" <3@1> = ATM_UNFM_NONE + _ext <1@8,more> = 1 + fwd_ofi "atm_ofi" <3@5,more> = ATM_OFI_0_0 + bwd_ofi "atm_ofi" <3@1> = ATM_OFI_0_0 + } +} + + +def ie_ep_ref = { + ITU_STD_HDR { + _ep_type <8> = 0 + ep_ref <16> + } +} + + +def ie_ep_state = { + ITU_STD_HDR { + ep_state <6@1> + } +} + + +{ + _pdsc "q2931_proto" <8> = Q2931_PROTO_DSC + _cr_len <8> = 3 + call_ref <24> + msg_type "qmsg" <8> + _ext <1@8,more> = 1 + _flag "atm_flag" <1@5,more> = ATM_FLAG_NO + _action_ind "atm_ai_msg" <2@1> = 0 + msg_len <16> = length { + _ie_id "atm_ie" <8> = multi { + aal: ATM_IE_AAL ie_aal + td: ATM_IE_TD ie_td + bbcap: ATM_IE_BBCAP ie_bbcap + bhli: ATM_IE_BHLI ie_bhli + blli: ATM_IE_BLLI [3] ie_blli + call_state: ATM_IE_CALL_STATE ie_call_state + cdpn: ATM_IE_CDPN ie_cdpn + cdps: ATM_IE_CDPS ie_cdps + cgpn: ATM_IE_CGPN ie_cgpn + cgps: ATM_IE_CGPS ie_cgps + cause: ATM_IE_CAUSE [2] ie_cause + conn_id: ATM_IE_CONN_ID ie_conn_id + e2e_td: ATM_IE_E2E_TD ie_e2e_td + qos: ATM_IE_QOS ie_qos + bbrep: ATM_IE_BBREP ie_bbrep + restart: ATM_IE_RESTART ie_restart + bbs_comp: ATM_IE_BBS_COMP ie_bbs_comp + tns: ATM_IE_TNS ie_tns + notify: ATM_IE_NOTIFY ie_notify + oam_td: ATM_IE_OAM_TD ie_oam_td + ep_ref: ATM_IE_EPR ie_ep_ref + ep_state: ATM_IE_EP_STATE ie_ep_state + default 0 { + VAR_STD_HDR(_,0) + abort RECOV_ASE_UNKNOWN_IE + } + } + } +} .