⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atmvcctablesetupxp.c

📁 摩托罗拉Motolola公司网络处理器C3的示范代码.实现了ATM的AAL2层交换功能.想了解网络处理器的可以
💻 C
📖 第 1 页 / 共 4 页
字号:
/* *  Copyright <c> 2000,2001, 2002 C-Port Corporation,A Motorola Company *  All Rights Reserved *   *  The information contained in this file is confidential and proprietary. *  Any reproduction, use or disclosure, in whole or in part, of this *  program, including any attempt to obtain a human-readable version of this *  program, without the express, prior written consent of C-Port                 *  Corporation or Motorola Incorporated is strictly prohibited. * *  File        : atmVccTableSetup.c */#include "atm.h"#include "atmXpIf.h"#include "aal2XpIf.h"#define  NUMBER_OF_CPS 16VcUnicastIngressInit atmSwitchUnicastTables1[]={    // these circuits come in port 0 and go out on port 1    {   // Ingress VC Index = 1        COMPOSEKEY(4, 0, 1), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              1,             // Vcindex            AAL2_RX1_BASE_QUEUE,             // queueId                 0,            //Padding            0,             // Vpi            1,             // Vci            COMPOSEKEY(4, 0, 1),      // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 2        COMPOSEKEY(4, 0, 2), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              2,             // Vcindex            AAL2_RX1_BASE_QUEUE,             // queueId                 0,            //Padding            0,             // Vpi            2,             // Vci            COMPOSEKEY(4, 0, 2),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 3        COMPOSEKEY(4, 0, 34), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              3,             // Vcindex            AAL2_RX1_BASE_QUEUE,             // queueId                 0,            //Padding            0,             // Vpi            34,             // Vci            COMPOSEKEY(4, 0, 34),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 4        COMPOSEKEY(4, 0, 35), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              4,             // Vcindex            AAL2_RX1_BASE_QUEUE,             // queueId                 0,            //Padding            0,             // Vpi            35,             // Vci            COMPOSEKEY(4, 0, 35),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 5        COMPOSEKEY(4, 1, 32), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              5,             // Vcindex            AAL2_RX2_BASE_QUEUE,             // queueId                 0,            //Padding            1,             // Vpi            32,             // Vci            COMPOSEKEY(4, 1, 32),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 6        COMPOSEKEY(4, 1, 33), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              6,             // Vcindex            AAL2_RX2_BASE_QUEUE,             // queueId                 0,            //Padding            1,             // Vpi            33,             // Vci            COMPOSEKEY(4, 1, 33),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 7        COMPOSEKEY(4, 1, 34), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              7,             // Vcindex            AAL2_RX2_BASE_QUEUE,             // queueId                 0,            //Padding            1,             // Vpi            34,             // Vci            COMPOSEKEY(4, 1, 34),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 8        COMPOSEKEY(4, 1, 35), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              8,             // Vcindex            AAL2_RX2_BASE_QUEUE,             // queueId                 0,            //Padding            1,             // Vpi            35,             // Vci            COMPOSEKEY(4, 1, 35),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 9        COMPOSEKEY(4, 2, 32), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              9,             // Vcindex            AAL2_RX3_BASE_QUEUE,             // queueId                 0,            //Padding            2,             // Vpi            32,             // Vci            COMPOSEKEY(4, 2, 32),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 10        COMPOSEKEY(4, 2, 33), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              10,             // Vcindex            AAL2_RX3_BASE_QUEUE,             // queueId                 0,            //Padding            2,             // Vpi            33,             // Vci            COMPOSEKEY(4, 2, 33),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 11        COMPOSEKEY(4, 2, 34), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              11,             // Vcindex            AAL2_RX3_BASE_QUEUE,             // queueId                 0,            //Padding            2,             // Vpi            34,             // Vci            COMPOSEKEY(4, 2, 34),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 12        COMPOSEKEY(4, 2, 35), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              12,             // Vcindex            AAL2_RX3_BASE_QUEUE,             // queueId                 0,            //Padding            2,             // Vpi            35,             // Vci            COMPOSEKEY(4, 2, 35),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 13        COMPOSEKEY(5, 3, 32), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              13,             // Vcindex            AAL2_RX4_BASE_QUEUE,             // queueId                 0,            //Padding            3,             // Vpi            32,             // Vci            COMPOSEKEY(5, 3, 32),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 14        COMPOSEKEY(5, 3, 33), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              14,             // Vcindex             AAL2_RX4_BASE_QUEUE,             // queueId                 0,            //Padding               3,             // Vpi              33,             // Vci            COMPOSEKEY(5, 3, 33),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 15        COMPOSEKEY(5, 3, 34), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              15,             // Vcindex             AAL2_RX4_BASE_QUEUE,             // queueId                 0,            //Padding               3,             // Vpi              34,             // Vci            COMPOSEKEY(5, 3, 34),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 16        COMPOSEKEY(5, 3, 35), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              16,             // Vcindex             AAL2_RX4_BASE_QUEUE,             // queueId                 0,            //Padding               3,             // Vpi              35,             // Vci            COMPOSEKEY(5, 3, 35),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 17        COMPOSEKEY(5, 4, 32), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              17,             // Vcindex             AAL2_RX5_BASE_QUEUE,             // queueId                 0,            //Padding               4,             // Vpi              32,             // Vci            COMPOSEKEY(5, 4, 32),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 18        COMPOSEKEY(5, 4, 33), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              18,             // Vcindex             AAL2_RX5_BASE_QUEUE,             // queueId                 0,            //Padding               4,             // Vpi              33,             // Vci            COMPOSEKEY(5, 4, 33),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 19        COMPOSEKEY(5, 4, 34), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass              19,             // Vcindex             AAL2_RX5_BASE_QUEUE,             // queueId                 0,            //Padding               4,             // Vpi              34,             // Vci            COMPOSEKEY(5, 4, 34),     // 32 bit ATM egress key            {                0x0000000,   // TAT                0x040,       // maxCTD                 0x01,        // Increment                  0x08,        // Limit             }        }    },        {   // Ingress VC Index = 20        COMPOSEKEY(5, 4, 35), // COMPOSEKEY(CPID,VPI,VCI);        {            1 << VCFLAGS_VALID_CONNECTION_BIT, // unsigned Flags            VC_CLASS_USER_RTVBR,                 // unsigned TrafficClass

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -