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

📄 atminit.c

📁 摩托罗拉Motolola公司网络处理器C3的示范代码.实现了ATM的AAL2层交换功能.想了解网络处理器的可以
💻 C
字号:
/* *  atmInit.c * *  Initialization of the ATM cell switch *//* *  Copyright (c) 1998,1999,2000,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. */#include <dcpBufferSvcs.h>#include <dcpTableSvcs.h>#include <dcpPduSvcs.h>#include "rcSdpAtmApiIf.h"#include "atmStatus.h"#include "atmPrivate.h"/* *  atmInitialize() - public function that initializes atmCellSwitch application. */voidatmInitialize(void){    /* Initialize receive and transmit side threads */    int32u scope;    for (scope = 0; scope < MAX_SCOPES; scope++) {        BsBufHandle bufHandle;        MergeSpc*   mergeSpc;        PduHandle   pduHandle = pduHandleForScopeNumber(scope);        /*         *  Prime each payload receive data scope with a buffer handle.         *  This is necessary because the receive algorithm is optimized         *  with the assumption that there is always a buffer handle         *  in the receive data scope ready to capture incoming payload.         */        while (bsError(bufHandle = bsBufferAllocate(poolId)));        pduRxBufHandleSet(pduHandle, bufHandle);        pduRxPayloadSet(pduHandle, 0);        pduRxFree(pduHandle);        /*         *  Prime each payload transmit data scope with a buffer handle.         *  This is necessary because the transmit algorithm is optimized         *  with the assumption that there is always a buffer handle         *  in the transmit data scope that must be freed.         */        while (bsError(bufHandle = bsBufferAllocate(poolId)));        pduTxBufHandleSet(pduHandle, bufHandle);        mergeSpc = (MergeSpc*)pduTxHeaderGet(pduHandle);        mergeSpc->atmMergeSpc.payloadLength = -48;    }}

⌨️ 快捷键说明

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