📄 ixatmdacc.h
字号:
IX_ATMDACC_CLP_SET = 1 /**< CLP indication is set */} IxAtmdAccClpStatus;/** * @typedef IxAtmdAccUserId * * @ingroup IxAtmdAccAPI * * @brief User-supplied Id * * IxAtmdAccUserId is passed through callbacks and allows the * IxAtmdAcc user to identify the source of a call back. The range of * this user-owned Id is [0...2^32-1)]. * * The user provides this own Ids on a per-channel basis as a parameter * in a call to @a ixAtmdAccRxVcConnect() or @a ixAtmdAccRxVcConnect() * * @sa ixAtmdAccRxVcConnect * @sa ixAtmdAccTxVcConnect * */typedef unsigned int IxAtmdAccUserId;/* ------------------------------------------------------ Part of the IxAtmdAcc interface related to RX traffic ------------------------------------------------------ *//** * * @ingroup IxAtmdAccAPI * * @brief Rx callback prototype * * IxAtmdAccRxVcRxCallback is the prototype of the Rx callback user * function called once per PDU to pass a receive Pdu to a user on a * partilcular connection. The callback is likely to push the mbufs * to a protocol layer, and recycle the mbufs for a further use. * * @note -This function is called ONLY in the context of * the @a ixAtmdAccRxDispatch() function * * @sa ixAtmdAccRxDispatch * @sa ixAtmdAccRxVcConnect * * @param port @ref IxAtmLogicalPort [in] - the port on which this PDU was received * a logical PHY port [@a IX_UTOPIA_PORT_0 .. @a IX_UTOPIA_MAX_PORTS - 1] * @param userId @ref IxAtmdAccUserId [in] - user Id provided in the call * to @a ixAtmdAccRxVcConnect() * @param status @ref IxAtmdAccPduStatus [in] - an indication about the PDU validity. * In the case of AAL0 the only possibile value is * AAL0_VALID, in this case the client may optionally determine * that an rx timeout occured by checking if the mbuf is * compleletly or only partially filled, the later case * indicating a timeout. * In the case of OAM the only possible value is OAM valid. * The status is set to @a IX_ATMDACC_MBUF_RETURN when * the mbuf is released during a disconnect process. * @param clp @ref IxAtmdAccClpStatus [in] - clp indication for this PDU. * For AAL5/AAL0_48 this information * is set if the clp bit of any rx cell is set * For AAL0-52/OAM the client may inspect the CLP in individual * cell headers in the PDU, and this parameter is set to 0. * @param *mbufPtr @ref IX_OSAL_MBUF [in] - depending on the servive type a pointer to * an mbuf (AAL5/AAL0/OAM) or mbuf chain (AAL5 only), * that comprises the complete PDU data. * * This parameter is guaranteed not to be a null pointer. * */typedef void (*IxAtmdAccRxVcRxCallback) (IxAtmLogicalPort port, IxAtmdAccUserId userId, IxAtmdAccPduStatus status, IxAtmdAccClpStatus clp, IX_OSAL_MBUF * mbufPtr);/** * * @ingroup IxAtmdAccAPI * * @brief Callback prototype for free buffer level is low. * * IxAtmdAccRxVcFreeLowCallback is the prototype of the user function * which get called on a per-VC basis, when more mbufs are needed to * continue the ATM data reception. This function is likely to supply * more available mbufs by one or many calls to the replenish function * @a ixAtmdAccRxVcFreeReplenish() * * This function is called when the number of available buffers for * reception is going under the threshold level as defined * in @a ixAtmdAccRxVcFreeLowCallbackRegister() * * This function is called inside an Qmgr dispatch context. No system * resource or interrupt-unsafe feature should be used inside this * callback. * * @sa ixAtmdAccRxVcFreeLowCallbackRegister * @sa IxAtmdAccRxVcFreeLowCallback * @sa ixAtmdAccRxVcFreeReplenish * @sa ixAtmdAccRxVcFreeEntriesQuery * @sa ixAtmdAccRxVcConnect * * @param userId @ref IxAtmdAccUserId [in] - user Id provided in the call * to @a ixAtmdAccRxVcConnect() * * @return None * */typedef void (*IxAtmdAccRxVcFreeLowCallback) (IxAtmdAccUserId userId);/* ------------------------------------------------------ Part of the IxAtmdAcc interface related to TX traffic ------------------------------------------------------ *//** * * @ingroup IxAtmdAccAPI * * @brief Buffer callback prototype. * * This function is called to relinguish ownership of a transmitted * buffer chain to the user. * * @note -In the case of a chained mbuf the AmtdAcc component can * chain many user buffers together and pass ownership to the user in * one function call. * * @param userId @ref IxAtmdAccUserId [in] - user If provided at registration of this * callback. * @param mbufPtr @ref IX_OSAL_MBUF [in] - a pointer to mbufs or chain of mbufs and is * guaranteed not to be a null pointer. * */typedef void (*IxAtmdAccTxVcBufferReturnCallback) (IxAtmdAccUserId userId, IX_OSAL_MBUF * mbufPtr);/* ------------------------------------------------------ Part of the IxAtmdAcc interface related to Initialisation ------------------------------------------------------ *//** * * @ingroup IxAtmdAccAPI * * @fn ixAtmdAccInit (void) * * @brief Initialise the IxAtmdAcc Component * * This function initialise the IxAtmdAcc component. This function shall * be called before any other function of the API. Its role is to * initialise all internal resources of the IxAtmdAcc component. * * The ixQmgr component needs to be initialized prior the use of * @a ixAtmdAccInit() * * @param none * * Failing to initilialize the IxAtmdAcc API before any use of it will * result in a failed status. * If the specified component is not present, a success status will still be * returned, however, a warning indicating the NPE to download to is not * present will be issued. * * @return @li IX_SUCCESS initialisation is complete (in case of component not * being present, a warning is clearly indicated) * @return @li IX_FAIL unable to process this request either * because this IxAtmdAcc is already initialised * or some unspecified error has occrred. */PUBLIC IX_STATUS ixAtmdAccInit (void);/** * * @ingroup IxAtmdAccAPI * * @fn ixAtmdAccShow (void) * * @brief Show IxAtmdAcc configuration on a per port basis * * @param none * * @return none * * @note - Display use printf() and are redirected to stdout */PUBLIC voidixAtmdAccShow (void);/** * * @ingroup IxAtmdAccAPI * * @fn ixAtmdAccStatsShow (void) * * @brief Show all IxAtmdAcc stats * * @param none * * @return none * * @note - Stats display use printf() and are redirected to stdout */PUBLIC voidixAtmdAccStatsShow (void);/** * * @ingroup IxAtmdAccAPI * * @fn ixAtmdAccStatsReset (void) * * @brief Reset all IxAtmdAcc stats * * @param none * * @return none * */PUBLIC voidixAtmdAccStatsReset (void);/* ------------------------------------------------------ Part of the IxAtmdAcc interface related to RX traffic ------------------------------------------------------ *//** * * @ingroup IxAtmdAccAPI * * @fn ixAtmdAccRxVcConnect (IxAtmLogicalPort port, unsigned int vpi, unsigned int vci, IxAtmdAccAalType aalServiceType, IxAtmRxQueueId rxQueueId, IxAtmdAccUserId userCallbackId, IxAtmdAccRxVcRxCallback rxCallback, unsigned int minimumReplenishCount, IxAtmConnId * connIdPtr, IxAtmNpeRxVcId * npeVcIdPtr ) * * @brief Connect to a Aal Pdu receive service for a particular * port/vpi/vci, and service type. * * This function allows a user to connect to an Aal5/Aal0/OAM Pdu receive service * for a particular port/vpi/vci. It registers the callback and allocates * internal resources and a Connection Id to be used in further API calls * related to this VCC. * * The function will setup VC receive service on the specified rx queue. * * This function is blocking and makes use internal locks, and hence * should not be called from an interrupt context. * * On return from @a ixAtmdAccRxVcConnect() with a failure status, the * connection Id parameter is unspecified. Its value cannot be used. * A connId is the reference by which IxAtmdAcc refers to a * connected VC. This identifier is the result of a succesful call * to a connect function. This identifier is invalid after a * sucessful call to a disconnect function. * * Calling this function for the same combination of Vpi, Vci and more * than once without calling @a ixAtmdAccRxVcTryDisconnect() will result in a * failure status. * * If this function returns success the user should supply receive * buffers by calling @a ixAtmdAccRxVcFreeReplenish() and then call * @a ixAtmdAccRxVcEnable() to begin receiving pdus. * * There is a choice of two receive Qs on which the VC pdus could be * receive. The user must associate the VC with one of these. Essentially * having two qs allows more flexible system configuration such as have * high prioriy traffic on one q (e.g. voice) and low priority traffic on * the other (e.g. data). The high priority Q could be serviced in * preference to the low priority Q. One queue may be configured to be * serviced as soon as there is traffic, the other queue may be configured * to be serviced by a polling mechanism running at idle time. * * Two AAL0 services supporting 48 or 52 byte cell data are provided. * Received AAL0 PDUs will be be a multiple of the cell data size (48/52). * AAL0_52 is a raw cell service and includes an ATM cell header * (excluding HEC) at the start of each cell. * * 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. * 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. *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -