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

📄 ixethnpe.h

📁 有关ARM开发板上的IXP400网络驱动程序的源码以。
💻 H
📖 第 1 页 / 共 2 页
字号:
#ifndef __doxygen_HIDE  /* This file is not part of the API */#ifndef IxEthNpe_H#define IxEthNpe_H/** * @file IxEthNpe.h *  * @par * IXP400 SW Release version 2.1 *  * -- Copyright Notice -- *  * @par * Copyright (c) 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 --*//** * @defgroup IxEthNpe Intel (R) IXP400 Software Ethernet NPE (IxEthNpe) API * * @brief Contains the API for Ethernet NPE. *  * All messages given to NPE, get back an acknowledgment. The acknowledgment  * is identical to the message sent to the NPE (except for NPE_GETSTATUS message). * * @{ *//*-------------------------------------------------------------------------- * Total number of ethernet NPEs supported *------------------------------------------------------------------------*//** * @def IX_ETHNPE_NUM_NPES */#define IX_ETHNPE_NUM_NPES	 	(3)/*-------------------------------------------------------------------------- * Maximum number of ports per NPE supported *------------------------------------------------------------------------*//** * @def IX_ETHNPE_NUM_PORTS_PER_NPE */#define IX_ETHNPE_NUM_PORTS_PER_NPE     (1)/*-------------------------------------------------------------------------- * Total number of ethernet ports on all NPEs supported *------------------------------------------------------------------------*//** * @def IX_ETHNPE_NUM_PHYSICAL_PORTS */#ifdef __ixp46X#define IX_ETHNPE_NUM_PHYSICAL_PORTS 	(3)#else#define IX_ETHNPE_NUM_PHYSICAL_PORTS 	(2)#endif/*-------------------------------------------------------------------------- * NPE Logical PortID field conversions and data types *------------------------------------------------------------------------*//** * @brief The following section deals with the NPE Logical ID used in *        queue entries. *  Logical ID field definition (8bits): *        Bits:   | 7   6 | 5   4 | 3   2   1   0 |  *        Field:  | RSVD  | NPEID |    PORT ID    | *//** * @brief NPE Node ID (ID of the NPE) */typedef UINT8 IxEthNpeNodeId;/** * @brief NPE Port ID (port number on an NPE) */typedef UINT8 IxEthNpePortId;/** * @brief Logical Port ID including both NPE and port numbers */typedef UINT8 IxEthNpeLogicalId;/** * @brief Physical Port ID (index into array of all physical ports) */typedef UINT32 IxEthNpePhysicalId;/** * @def IX_ETHNPE_NODE_AND_PORT_TO_LOGICAL_ID */#define IX_ETHNPE_NODE_AND_PORT_TO_LOGICAL_ID(npe,port)	((npe << 4) | (port & 0xF))/** * @def IX_ETHNPE_LOGICAL_ID_TO_NODE */#define IX_ETHNPE_LOGICAL_ID_TO_NODE(id)			(id >> 4)/** * @def IX_ETHNPE_LOGICAL_ID_TO_PORT */#define IX_ETHNPE_LOGICAL_ID_TO_PORT(id)		(id & 0xF)/** * @def IxEthNpePorts * @brief Port logical ID array */static constIxEthNpeLogicalId IxEthNpePorts[IX_ETHNPE_NUM_PHYSICAL_PORTS] ={    IX_ETHNPE_NODE_AND_PORT_TO_LOGICAL_ID(1,0), /* physical port 0 */    IX_ETHNPE_NODE_AND_PORT_TO_LOGICAL_ID(2,0)  /* physical port 1 */#ifdef __ixp46X    ,    IX_ETHNPE_NODE_AND_PORT_TO_LOGICAL_ID(0,0) /* physical port 2 */#endif};/** * @def IX_ETHNPE_LOGICAL_ID_TO_PHYSICAL_ID * @brief This hard-coded conversion depends on how IxEthNpePorts *        is defined and must be updated accordingly */#define IX_ETHNPE_LOGICAL_ID_TO_PHYSICAL_ID(id) \            IX_ETHNPE_NODE_AND_PORT_TO_PHYSICAL_ID( \                IX_ETHNPE_LOGICAL_ID_TO_NODE(id), \                IX_ETHNPE_LOGICAL_ID_TO_PORT(id) )/** * @def IX_ETHNPE_NODE_AND_PORT_TO_PHYSICAL_ID * @brief This hard-coded conversion depends on how IxEthNpePorts *        is defined and must be updated accordingly */#define IX_ETHNPE_NODE_AND_PORT_TO_PHYSICAL_ID(npe,port) \            npe ? npe - 1 : 2/** * @def IX_ETHNPE_PHYSICAL_ID_TO_LOGICAL_ID */#define IX_ETHNPE_PHYSICAL_ID_TO_LOGICAL_ID(index)	(IxEthNpePorts[index])/** * @def IX_ETHNPE_PHYSICAL_ID_TO_NODE */#define IX_ETHNPE_PHYSICAL_ID_TO_NODE(index) \            (IX_ETHNPE_LOGICAL_ID_TO_NODE(IxEthNpePorts[index]))/** * @def IX_ETHNPE_PHYSICAL_ID_TO_PORT */#define IX_ETHNPE_PHYSICAL_ID_TO_PORT(index) \            (IX_ETHNPE_LOGICAL_ID_TO_PORT(IxEthNpePorts[index]))/*-------------------------------------------------------------------------- * APB Message IDs - Intel XScale(R) Core ->NPE *------------------------------------------------------------------------*//** * @def IX_ETHNPE_NPE_GETSTATUS * * @brief Request from the Intel XScale(R) Core  client for the NPE to return the firmware * version of the currently executing image. * * Acknowledgment message id is same as the request message id.  * NPE returns the firmware version ID to Intel XScale(R) Core . */#define IX_ETHNPE_NPE_GETSTATUS                 0x00/** * @def IX_ETHNPE_EDB_SETPORTADDRESS * * @brief Request from the Intel XScale(R) Core  client for the NPE to set the Ethernet  * port's port ID and MAC address.  */#define IX_ETHNPE_EDB_SETPORTADDRESS            0x01/** * @def IX_ETHNPE_EDB_GETMACADDRESSDATABASE * * @brief Request from Intel XScale(R) Core  client to the NPE requesting upload of  * Ethernet Filtering Database or Header Conversion Database from NPE's  * data memory to Intel XScale(R) Core  accessible SDRAM. */#define IX_ETHNPE_EDB_GETMACADDRESSDATABASE     0x02/** * @def IX_ETHNPE_EDB_SETMACADDRESSSDATABASE * * @brief Request from Intel XScale(R) Core  client to the NPE requesting download of  * Ethernet Filtering Database or Header Conversion Database from SDRAM * to the NPE's datamemory. */#define IX_ETHNPE_EDB_SETMACADDRESSSDATABASE    0x03/** * @def IX_ETHNPE_GETSTATS * * @brief Request from the Intel XScale(R) Core  client for the current MAC port statistics  * data to be written to the (empty) statistics structure and the specified * location in externa memory. */#define IX_ETHNPE_GETSTATS                      0x04/** * @def IX_ETHNPE_RESETSTATS * * @brief Request from the Intel XScale(R) Core  client to the NPE to reset all of its internal  * MAC port statistics state variables.  * * As a side effect, this message entails an implicit request that the NPE *  write the current MAC port statistics into the MAC statistics structure  * at the specified location in external memory. */#define IX_ETHNPE_RESETSTATS                    0x05/** * @def IX_ETHNPE_SETMAXFRAMELENGTHS * * @brief Request from the Intel XScale(R) Core  client to the NPE to configure maximum framelengths * and block sizes in receive and transmit direction. */#define IX_ETHNPE_SETMAXFRAMELENGTHS            0x06/** * @def IX_ETHNPE_VLAN_SETRXTAGMODE * * @brief Request from the Intel XScale(R) Core  client to the NPE to configure VLAN frame type * filtering and VLAN the tagging mode for the receiver. */#define IX_ETHNPE_VLAN_SETRXTAGMODE             0x07/** * @def IX_ETHNPE_VLAN_SETDEFAULTRXVID * * @brief Request from the Intel XScale(R) Core  client to the NPE to set receiver's default  * VLAN tag (PVID)and internal traffic class. */#define IX_ETHNPE_VLAN_SETDEFAULTRXVID          0x08/** * @def IX_ETHNPE_VLAN_SETPORTVLANTABLEENTRY * * @brief Request from the Intel XScale(R) Core  client to the NPE to configure VLAN Port  * membership and Tx tagging for 8 consecutive VLANID's. */#define IX_ETHNPE_VLAN_SETPORTVLANTABLEENTRY    0x09/** * @def IX_ETHNPE_VLAN_SETPORTVLANTABLERANGE * * @brief Request from the Intel XScale(R) Core  client to the NPE to configure VLAN Port * membership and Tx tagging for a range of VLANID's. */#define IX_ETHNPE_VLAN_SETPORTVLANTABLERANGE    0x0A/** * @def IX_ETHNPE_VLAN_SETRXQOSENTRY * * @brief Request from the Intel XScale(R) Core  client to the NPE to map a user priority * to QoS class and an AQM queue number. */#define IX_ETHNPE_VLAN_SETRXQOSENTRY            0x0B/** * @def IX_ETHNPE_VLAN_SETPORTIDEXTRACTIONMODE * * @brief Request from the Intel XScale(R) Core  client to the NPE to enable or disable * portID extraction from VLAN-tagged frames for the specified port. */#define IX_ETHNPE_VLAN_SETPORTIDEXTRACTIONMODE  0x0C/** * @def IX_ETHNPE_STP_SETBLOCKINGSTATE * * @brief Request from the Intel XScale(R) Core  client to the NPE to block or unblock * forwarding for spanning tree BPDUs. */#define IX_ETHNPE_STP_SETBLOCKINGSTATE          0x0D/** * @def IX_ETHNPE_FW_SETFIREWALLMODE * * @brief Request from the Intel XScale(R) Core  client to the NPE to configure firewall * services modes of operation and/or download Ethernet Firewall Database from * SDRAM to NPE. */#define IX_ETHNPE_FW_SETFIREWALLMODE            0x0E/** * @def IX_ETHNPE_PC_SETFRAMECONTROLDURATIONID  * * @brief Request from the Intel XScale(R) Core  client to the NPE to set global frame control * and duration/ID field for the 802.3 to 802.11 protocol header conversion * service. */#define IX_ETHNPE_PC_SETFRAMECONTROLDURATIONID  0x0F/** * @def IX_ETHNPE_PC_SETAPMACTABLE * * @brief Request from the Intel XScale(R) Core  client to the NPE to update a block/section/ * range of the AP MAC Address Table. */#define IX_ETHNPE_PC_SETAPMACTABLE              0x11/** * @def IX_ETHNPE_SETLOOPBACK_MODE * * @brief Turn on or off the NPE frame loopback. */#define IX_ETHNPE_SETLOOPBACK_MODE              0x12/** * @def IX_ETHNPE_PC_SETBSSIDTABLE * * @brief Request from the Intel XScale(R) Core  client to the NPE to update a block/section/ * range of the BSSID MAC Address Table. */#define IX_ETHNPE_PC_SETBSSIDTABLE              0x13/** * @def IX_ETHNPE_APPENDFCSCONFIG * * @brief Notification from the Intel XScale(R) Core  client to the NPE telling the NPE the  * MAC FCS append configuration */#define IX_ETHNPE_APPENDFCSCONFIG              0x15/*-------------------------------------------------------------------------- * APB Message IDs - NPE->Intel XScale(R) Core  *------------------------------------------------------------------------*//** * @def IX_ETHNPE_NPE_GETSTATUS_ACK * * @brief Acknowledgment to IX_ETHNPE_NPE_GETSTATUS message. NPE firmware version  * id is returned in the message. */#define IX_ETHNPE_NPE_GETSTATUS_ACK                 0x00/** * @def IX_ETHNPE_EDB_SETPORTADDRESS_ACK * * @brief Acknowledgment to IX_ETHNPE_EDB_SETPORTADDRESS message. */#define IX_ETHNPE_EDB_SETPORTADDRESS_ACK            0x01/** * @def IX_ETHNPE_EDB_GETMACADDRESSDATABASE_ACK * * @brief Acknowledgment to IX_ETHNPE_EDB_GETMACADDRESSDATABASE message */#define IX_ETHNPE_EDB_GETMACADDRESSDATABASE_ACK     0x02/** * @def IX_ETHNPE_EDB_SETMACADDRESSSDATABASE_ACK * * @brief Acknowledgment to IX_ETHNPE_EDB_SETMACADDRESSSDATABASE message. */#define IX_ETHNPE_EDB_SETMACADDRESSSDATABASE_ACK    0x03/** * @def IX_ETHNPE_GETSTATS_ACK * * @brief Acknowledgment to IX_ETHNPE_GETSTATS message. */#define IX_ETHNPE_GETSTATS_ACK                      0x04/** * @def IX_ETHNPE_RESETSTATS_ACK * * @brief Acknowledgment to IX_ETHNPE_RESETSTATS message. */#define IX_ETHNPE_RESETSTATS_ACK                    0x05/** * @def IX_ETHNPE_SETMAXFRAMELENGTHS_ACK * * @brief Acknowledgment to IX_ETHNPE_SETMAXFRAMELENGTHS message. */#define IX_ETHNPE_SETMAXFRAMELENGTHS_ACK            0x06/** * @def IX_ETHNPE_VLAN_SETRXTAGMODE_ACK * * @brief Acknowledgment to IX_ETHNPE_VLAN_SETRXTAGMODE message. */#define IX_ETHNPE_VLAN_SETRXTAGMODE_ACK             0x07/** * @def IX_ETHNPE_VLAN_SETDEFAULTRXVID_ACK * * @brief Acknowledgment to IX_ETHNPE_VLAN_SETDEFAULTRXVID  message. */#define IX_ETHNPE_VLAN_SETDEFAULTRXVID_ACK          0x08/** * @def IX_ETHNPE_VLAN_SETPORTVLANTABLEENTRY_ACK

⌨️ 快捷键说明

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