📄 ixatmdacc.h
字号:
/** * @file IxAtmdAcc.h * * @date 07-Nov-2001 * * @brief IxAtmdAcc Public API * * This file contains the public API of IxAtmdAcc, related to the * data functions of the component * * * @par * IXP400 SW Release version 2.0 * * -- Copyright Notice -- * * @par * Copyright 2001-2005, Intel Corporation. * All rights reserved. * * @par * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Intel Corporation nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * @par * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @par * -- End of Copyright Notice -- *//* ------------------------------------------------------ Doxygen group definitions ------------------------------------------------------ *//** * * @defgroup IxAtmdAccAPI IXP400 ATM Driver Access (IxAtmdAcc) API * * @brief The public API for the IXP400 Atm Driver Data component * * IxAtmdAcc is the low level interface by which AAL0/AAL5 and * OAM data gets transmitted to,and received from the Utopia bus. * * For AAL0/AAL5 services transmit and receive connections may * be established independantly for unique combinations of * port,VPI,and VCI. * * Two AAL0 services supporting 48 or 52 byte cell data are provided. * Submitted AAL0 PDUs must be a multiple of the cell data size (48/52). * AAL0_52 is a raw cell service the client must format * the PDU with an ATM cell header (excluding HEC) at the start of * each cell, note that AtmdAcc does not validate the cell headers in * a submitted PDU. * * OAM cells cannot be received over the AAL0 service but instead * are received over a dedicated OAM service. * * For the OAM service an "OAM Tx channel" may be enabled for a port * by establishing a single dedicated OAM Tx connection on that port. * A single "OAM Rx channel" for all ports may be enabled by * establishing a dedicated OAM Rx connection. * * The OAM service allows buffers containing 52 byte OAM F4/F5 cells * to be transmitted and received over the dedicated OAM channels. * HEC is appended/removed, and CRC-10 performed by the NPE. The OAM * service offered by AtmdAcc is a raw cell transport service. * It is assumed that ITU I.610 procedures that make use of this * service are implemented above AtmdAcc. * * Note that the dedicated OAM connections are established on * reserved VPI,VCI, and (in the case of Rx) port values defined below. * These values are used purely to descriminate the dedicated OAM channels * and do not identify a particular OAM F4/F5 flow. F4/F5 flows may be * realised for particluar VPI/VCIs by manipulating the VPI,VCI * fields of the ATM cell headers of cells in the buffers passed * to AtmdAcc. Note that AtmdAcc does not validate the cell headers * in a submitted OAM PDU. * * * * This part is related to the User datapath processing * * @{ */#ifndef IXATMDACC_H#define IXATMDACC_H#include "IxAtmTypes.h"/* ------------------------------------------------------ AtmdAcc Data Types definition ------------------------------------------------------ *//** * * @ingroup IxAtmdAccAPI * * @def IX_ATMDACC_WARNING * * @brief Warning return code * * This constant is used to tell IxAtmDAcc user about a special case. * */#define IX_ATMDACC_WARNING 2/** * * @ingroup IxAtmdAccAPI * * @def IX_ATMDACC_BUSY * * @brief Busy return code * * This constant is used to tell IxAtmDAcc user that the request * is correct, but cannot be processed because the IxAtmAcc resources * are already used. The user has to retry its request later * */#define IX_ATMDACC_BUSY 3/** * * @ingroup IxAtmdAccAPI * * @def IX_ATMDACC_RESOURCES_STILL_ALLOCATED * * @brief Disconnect return code * * This constant is used to tell IxAtmDAcc user that the disconnect * functions are not complete because the resources used by the driver * are not yet released. The user has to retry the disconnect call * later. * */#define IX_ATMDACC_RESOURCES_STILL_ALLOCATED 4/** * * @ingroup IxAtmdAccAPI * * @def IX_ATMDACC_DEFAULT_REPLENISH_COUNT * * @brief Default resources usage for RxVcFree replenish mechanism * * This constant is used to tell IxAtmDAcc to allocate and use * the minimum of resources for rx free replenish. * * @sa ixAtmdAccRxVcConnect */#define IX_ATMDACC_DEFAULT_REPLENISH_COUNT 0/** * @ingroup IxAtmdAccAPI * * @def IX_ATMDACC_OAM_TX_VPI * * @brief The reserved value used for the dedicated OAM * Tx connection. This "well known" value is used by atmdAcc and * its clients to dsicriminate the OAM channel, and should be chosen so * that it does not coencide with the VPI value used in an AAL0/AAL5 connection. * Any attempt to connect a service type other than OAM on this VPI will fail. * * */#define IX_ATMDACC_OAM_TX_VPI 0/** * @ingroup IxAtmdAccAPI * * @def IX_ATMDACC_OAM_TX_VCI * * @brief The reserved value used for the dedicated OAM * Tx connection. This "well known" value is used by atmdAcc and * its clients to dsicriminate the OAM channel, and should be chosen so * that it does not coencide with the VCI value used in an AAL0/AAL5 connection. * Any attempt to connect a service type other than OAM on this VCI will fail. */#define IX_ATMDACC_OAM_TX_VCI 0 /** * @ingroup IxAtmdAccAPI * * @def IX_ATMDACC_OAM_RX_PORT * * @brief The reserved dummy PORT used for all dedicated OAM * Rx connections. Note that this is not a real port but must * have a value that lies within the valid range of port values. */#define IX_ATMDACC_OAM_RX_PORT IX_UTOPIA_PORT_0 /** * @ingroup IxAtmdAccAPI * * @def IX_ATMDACC_OAM_RX_VPI * * @brief The reserved value value used for the dedicated OAM * Rx connection. This value should be chosen so that it does not * coencide with the VPI value used in an AAL0/AAL5 connection. * Any attempt to connect a service type other than OAM on this VPI will fail. */#define IX_ATMDACC_OAM_RX_VPI 0/** * @ingroup IxAtmdAccAPI * * @def IX_ATMDACC_OAM_RX_VCI * * @brief The reserved value value used for the dedicated OAM * Rx connection. This value should be chosen so that it does not * coencide with the VCI value used in an AAL0/AAL5 connection. * Any attempt to connect a service type other than OAM on this VCI will fail. */#define IX_ATMDACC_OAM_RX_VCI 0/** * @enum IxAtmdAccPduStatus * * @ingroup IxAtmdAccAPI * * @brief IxAtmdAcc Pdu status : * * IxAtmdAccPduStatus is used during a RX operation to indicate * the status of the received PDU * */typedef enum{ IX_ATMDACC_AAL0_VALID = 0, /**< aal0 pdu */ IX_ATMDACC_OAM_VALID, /**< OAM pdu */ IX_ATMDACC_AAL2_VALID, /**< aal2 pdu @b reserved for future use */ IX_ATMDACC_AAL5_VALID, /**< aal5 pdu complete and trailer is valid */ IX_ATMDACC_AAL5_PARTIAL, /**< aal5 pdu not complete, trailer is missing */ IX_ATMDACC_AAL5_CRC_ERROR, /**< aal5 pdu not complete, crc error/length error */ IX_ATMDACC_MBUF_RETURN /**< empty buffer returned to the user */} IxAtmdAccPduStatus;/** * * @enum IxAtmdAccAalType * * @ingroup IxAtmdAccAPI * * @brief IxAtmdAcc AAL Service Type : * * IxAtmdAccAalType defines the type of traffic to run on this VC * */typedef enum{ IX_ATMDACC_AAL5, /**< ITU-T AAL5 */ IX_ATMDACC_AAL2, /**< ITU-T AAL2 @b reserved for future use */ IX_ATMDACC_AAL0_48, /**< AAL0 48 byte payloads (cell header is added by NPE)*/ IX_ATMDACC_AAL0_52, /**< AAL0 52 byte cell data (HEC is added by NPE) */ IX_ATMDACC_OAM, /**< OAM cell transport service (HEC is added by NPE)*/ IX_ATMDACC_MAX_SERVICE_TYPE /**< not a service, used for parameter validation */} IxAtmdAccAalType;/** * * @enum IxAtmdAccClpStatus * * @ingroup IxAtmdAccAPI * * @brief IxAtmdAcc CLP indication * * IxAtmdAccClpStatus defines the CLP status of the current PDU * */typedef enum{ IX_ATMDACC_CLP_NOT_SET = 0, /**< CLP indication is not set */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -