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

📄 ixethacccodelet.h

📁 intel IXP400系列cpu(2.3版)的库文件
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * #defines for function return types, etc. *//** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_NPEB_MAC * * @brief Hard-encoded MAC address for NPEB.   */#define IX_ETHACC_CODELET_NPEA_MAC {{0x2, 0x0, 0x6, 0x7, 0x8, 0x9}}/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_NPEB_MAC * * @brief Hard-encoded MAC address for NPEB.   */#define IX_ETHACC_CODELET_NPEB_MAC {{0x2, 0x0, 0xa, 0xb, 0xc, 0xd}}/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_NPEC_MAC * * @brief Hard-encoded MAC address for NPEC. */#define IX_ETHACC_CODELET_NPEC_MAC {{0x2, 0x0, 0xe, 0xf, 0xa, 0xb}}/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_RX_MBUF_POOL_SIZE * * @brief Size of receive MBuf pool.   */#ifdef __ixp46X#define IX_ETHACC_CODELET_RX_MBUF_POOL_SIZE   (512*3)#else#define IX_ETHACC_CODELET_RX_MBUF_POOL_SIZE   (512*2)#endif/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_TX_MBUF_POOL_SIZE * * @brief Size of transmit MBuf pool.   */#define IX_ETHACC_CODELET_TX_MBUF_POOL_SIZE   128/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_MAX_PORT * * @brief Number of Ethernet Ports supported for this codelet. */#define IX_ETHACC_CODELET_MAX_PORT IX_ETH_ACC_NUMBER_OF_PORTS/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_MBUF_POOL_SIZE * * @brief Size of MBuf pool. */#define IX_ETHACC_CODELET_MBUF_POOL_SIZE \  ((IX_ETHACC_CODELET_RX_MBUF_POOL_SIZE + IX_ETHACC_CODELET_TX_MBUF_POOL_SIZE) \  * IX_ETHACC_CODELET_MAX_PORT)/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_PCK_SIZE * * @brief Size of MBuf packet (recommaended size for ethAcc component) */#define IX_ETHACC_CODELET_PCK_SIZE IX_ETHACC_RX_MBUF_MIN_SIZE/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_PCK_LEN * * @brief Length of MBuf payload (in bytes). */#define IX_ETHACC_CODELET_PCK_LEN 1536/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_MBUF_DATA_POOL_SIZE * * @brief Size of MBuf data pool. */#define IX_ETHACC_CODELET_MBUF_DATA_POOL_SIZE \  (IX_ETHACC_CODELET_MBUF_POOL_SIZE * IX_ETHACC_CODELET_PCK_SIZE)/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_TXGEN_PCK_LEN * * @brief Size of packets for TxGenRxSink Operation. */#define IX_ETHACC_CODELET_TXGEN_PCK_LEN 60/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_TXGEN_PCKS  * * @brief Number of packets to generate for the TxGenRxSink Operation. */#define IX_ETHACC_CODELET_TXGEN_PCKS 128/*  *  Compilation trap to ensure  *  IX_ETHACC_CODELET_TXGEN_PCKS <= IX_ETHACC_CODELET_TX_MBUF_POOL_SIZE */#if IX_ETHACC_CODELET_TXGEN_PCKS > IX_ETHACC_CODELET_TX_MBUF_POOL_SIZE    #error Number of TX Gen packets is greater than Tx MBuf pool#endif/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_TXGENRXSINK_VERIFY * * @brief Verify payload for TxGenRxSink operation.  *        To undefine, change to #undef. *  * @Warning Defining this will affect performance */#undef IX_ETHACC_CODELET_TXGENRXSINK_VERIFY /** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_RX_FCS_STRIP * * @brief Strip FCS from incoming frames. *        To undefine, change to #undef.  */#define IX_ETHACC_CODELET_RX_FCS_STRIP /** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_RX_FCS_STRIP * * @brief Append FCS for outgoing frames. *        To undefine, change to #undef.  */#undef IX_ETHACC_CODELET_TX_FCS_APPEND/** * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_FRAME_SIZE * * @brief Maximum size of a frame.  * This maximum frame size includes different network settings : * @li Ethernet frames (up to 1518 bytes),  * @li BabyJumbo frames (up to nearly 1600 bytes)  * @li Jumbo frames (9K bytes).  * Note that different encapsulation types may * extend the MTU size of 9000. The NPE firmware * compares onlu the overall ethernet frame size (MSDU), with may be * stripped from the FCS at the time of comparrison. The frame size is  * affected by other operations which changes the frame size, like the  * addition or the removal of VLAN tags. * */#ifdef IX_ETHACC_CODELET_RX_FCS_STRIP#define IX_ETHACC_CODELET_FRAME_SIZE (14+9000) /* eth header + 9K MTU */#else#define IX_ETHACC_CODELET_FRAME_SIZE (14+9000+4)/* eth header + 9K MTU + FCS */#endif/**  * @ingroup IxEthAccCodelet  * * @def IX_ETHACC_CODELET_RX_FCS_STRIP * * @brief Type of operations of the Ethernet Access Codelet. */typedef enum{    IX_ETHACC_CODELET_RX_SINK = 1,    /**< All frames received (from external device)                                        *  will be sinked for available ports. */    IX_ETHACC_CODELET_SW_LOOPBACK,    /**< All frames received are software loopbacked                                         *  to the same port for available ports */    IX_ETHACC_CODELET_TXGEN_RXSINK,   /**< Frames generated and transmitted from port 1,                                         *  remote loopbacked to port 2 by using cross cable					*  and received on port 2. */    IX_ETHACC_CODELET_PHY_LOOPBACK,   /**< Frames generated and PHY loopbacked on the                                         *  same port for available ports. */    IX_ETHACC_CODELET_BRIDGE,         /**< Frames received on one port will be transmitted                                        *  through the other port. */    IX_ETHACC_CODELET_BRIDGE_QOS,     /**< Frames received on one port will be transmitted                                        *  through the other port, with priority enabled */    IX_ETHACC_CODELET_BRIDGE_FIREWALL,/**< Frames received on one port will be transmitted                                        *  through the other port if the MAC address match 					*  the firewall criteria */    IX_ETHACC_CODELET_ETH_LEARNING,   /**< Ethernet Learning Facility where it adds some static                                        *  and dynamic entries. Dynamic entries are then aged and 					*  verified that they no longer appear in the database. */    IX_ETHACC_CODELET_BRIDGE_WIFI     /**< Ethernet 802.3 <=> 802.11 header conversion test */} IxEthAccCodeletOperation;/* * Variable declarations global to this file. Externs are followed by * statics. *//* * Function definitions *//**  * @ingroup IxEthAccCodelet * * @fn ixEthAccCodeletMain(IxEthAccCodeletOperation operationType, *                         IxEthAccPortId inPort, *                         IxEthAccPortId outPort) * * @brief This function is used as a single point of execution for EthAcc codelet. * * @param "IxEthAccCodeletOperation [in] operationType" - The type of operation  *        to be executed. Refer to the descriptions above. * * @return * - IX_SUCCESS : If operation selected is successfully setup * - IX_FAIL    : If operation selected fails to be setup. */PUBLIC IX_STATUSixEthAccCodeletMain(IxEthAccCodeletOperation operationType,                    IxEthAccPortId inPort,                    IxEthAccPortId outPort);#endif /* IXETHACCCODELET_H *//** @} defgroup IxEthAccCodelet*//** @} defgroup Codelets*/

⌨️ 快捷键说明

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