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

📄 aal2tx.h

📁 摩托罗拉Motolola公司网络处理器C3的示范代码.实现了ATM的AAL2层交换功能.想了解网络处理器的可以
💻 H
字号:
/* *  Copyright (c) 2001, 2002 C-Port Corporation *  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 is strictly prohibited. *//*---------------------------------------------------------------------------*/#ifndef _AAL2TX_H_#define _AAL2TX_H_/*---------------------------------------------------------------------------*/#include <dcpKernelSvcs.h>#include <dcpBufferSvcs.h>#include <dcpPduSvcs.h>#include <dcpTableSvcs.h>#include <dcpQueueSvcs.h>/*---------------------------------------------------------------------------*/#define AAL2_TX_HDLR_STACK_SIZE		256#define AAL2_TX_FWDR_STACK_SIZE		256#define MAX_DMEM_TABLE_SIZE			512#define MAX_CPS_CONTROL_BLOCKS		MAX_SCOPES#define DMEM_TABLE_INDEX_MASK		0x01FF#define ATM_SDU_SIZE				48#define CPS_PH_SIZE					3#define STF_SIZE					1#define MAX_CPS_PL_IN_ATM_CELL		(ATM_SDU_SIZE - CPS_PH_SIZE - STF_SIZE)#define NOT_ALLOCATED				0xFFFFFFFF#define EQ							==#define NE							!=#define AND							&&#define OR							||#define LT							<#define GT							>#define LE							<=#define GE							>=#ifdef AAL2_TX_DEBUG 	#define Aal2TxDebugValPrint(s, i) ksPrintf(s "0x%x", i)	#define Aal2TxDebugStrPrint(s)	  ksPrintf(s)#else	#define Aal2TxDebugValPrint(s, i) 	#define Aal2TxDebugStrPrint(s) #endif/*---------------------------------------------------------------------------*//* DMEM Table, present size 8 bytes */typedef struct{	/* 4 Byte buffer handle */	BsBufHandle	AtmSduBufHandle;		int32u		atmEgressKey;    /* ATM egress VPI, VCI and port # */	/* 1 Bit  : STF Seq Number,	 * 6 Bits : Bytes packed in the ATM SDU.	 * Can accommodate one more 1 bit variable.	 */	int8u		StfSequenceNumber	: 1;	int8u       AtmSduBytesCount	: 6;	/* 2 Bits: Timer_CU Seq Num (0-3), 	 * 1 Bit : CU_Timer Started Flag,	 * 1 Bit : CU_Timer Expired Flag	 * If more fields required in this structure of size <= 4 bits	 * then pack in this field.	 */	int8u		CuTimerSeqNum		: 2;	int8u		CuTimerStarted		: 1;	int8u		CuTimerExpired		: 1;} Aal2TxDmemTable;/* CPS Control Block */typedef struct{	/* 16 bits VC Index */	int16u		VcIndex;		/* Fwder processing done over this control block flag */	int8u		FwderProcDone;	/* Count of ATM SDUs, formed with a CPS packet */	int8u		CountAtmSdu;} CpsControlBlock;/* Global structure to keep global variables of AAL2 Tx module. This structure will  * be kept in a common memory, where AAL2 Rx module can also keep its global variables. * That arrangement will be done defining a union of two. */typedef struct {	QsMessage			CpsDescMsg;	QsMessage			XpInQueueDescMsg;	QsMessage			TimeoutDescriptorMsg;	Aal2TxDmemTable		Aal2TxDmemTable[MAX_DMEM_TABLE_SIZE];	CpsControlBlock		CpsControlBlocks[MAX_CPS_CONTROL_BLOCKS];	QsQueueId			CellDescQId;	QsQueueId			Aal2TxCuTimerEventQ;	} AAL2_TX_CONTEXT;/*---------------------------------------------------------------------------*/#endif

⌨️ 快捷键说明

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