📄 ixethacc.h
字号:
* Free MBufs are returned to the user via the registered callback when the port is disabled * * @li Reentrant - yes * @li ISR Callable - no * * @pre The port must be enabled with @a ixEthAccPortEnable, otherwise this * function has no effect * * @param portId @ref IxEthAccPortId [in] - Port id to act upon. * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid. * @li @a IX_ETH_ACC_PORT_UNINITIALIZED : portId is not initialized * @li @a IX_ETH_ACC_MAC_UNINITIALIZED : port MAC address is not initialized * * <hr> */PUBLIC IxEthAccStatus ixEthAccPortDisable(IxEthAccPortId portId);/** * @ingroup IxEthAcc * * @fn ixEthAccPortEnabledQuery(IxEthAccPortId portId, BOOL *enabled) * * @brief Get the enabled state of a port. * * @li Reentrant - yes * @li ISR Callable - yes * * @pre The port must first be initialized via @a ixEthAccPortInit * * @param portId @ref IxEthAccPortId [in] - Port id to act upon. * @param enabled BOOL [out] - location to store the state of the port * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid * * <hr> */PUBLIC IxEthAccStatusixEthAccPortEnabledQuery(IxEthAccPortId portId, BOOL *enabled);/** * @ingroup IxEthAcc * * @fn ixEthAccPortPromiscuousModeClear(IxEthAccPortId portId) * * @brief Put the Ethernet MAC device in non-promiscuous mode. * * In non-promiscuous mode the MAC filters all frames other than * destination MAC address which matches the following criteria: * @li Unicast address provisioned via @a ixEthAccUnicastMacAddressSet * @li All broadcast frames. * @li Multicast addresses provisioned via @a ixEthAccMulticastAddressJoin * * Other functions modify the MAC filtering * * @li @a ixEthAccPortMulticastAddressJoinAll() - all multicast * frames are forwarded to the application * @li @a ixEthAccPortMulticastAddressLeaveAll() - rollback the * effects of @a ixEthAccPortMulticastAddressJoinAll() * @li @a ixEthAccPortMulticastAddressLeave() - unprovision a new * filtering address * @li @a ixEthAccPortMulticastAddressJoin() - provision a new * filtering address * @li @a ixEthAccPortPromiscuousModeSet() - all frames are * forwarded to the application regardless of the multicast * address provisioned * @li @a ixEthAccPortPromiscuousModeClear() - frames are forwarded * to the application following the multicast address provisioned * * In all cases, unicast and broadcast addresses are forwarded to * the application. * * @li Reentrant - yes * @li ISR Callable - no * * @sa ixEthAccPortPromiscuousModeSet * * @param portId @ref IxEthAccPortId [in] - Ethernet port id. * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid. * @li @a IX_ETH_ACC_PORT_UNINITIALIZED : portId is un-initialized * * <hr> */PUBLIC IxEthAccStatus ixEthAccPortPromiscuousModeClear(IxEthAccPortId portId);/** * @ingroup IxEthAcc * * @fn ixEthAccPortPromiscuousModeSet(IxEthAccPortId portId) * * @brief Put the MAC device in promiscuous mode. * * If the device is in promiscuous mode then all all received frames shall be forwared * to the NPE for processing. * * Other functions modify the MAC filtering * * @li @a ixEthAccPortMulticastAddressJoinAll() - all multicast * frames are forwarded to the application * @li @a ixEthAccPortMulticastAddressLeaveAll() - rollback the * effects of @a ixEthAccPortMulticastAddressJoinAll() * @li @a ixEthAccPortMulticastAddressLeave() - unprovision a new * filtering address * @li @a ixEthAccPortMulticastAddressJoin() - provision a new * filtering address * @li @a ixEthAccPortPromiscuousModeSet() - all frames are * forwarded to the application regardless of the multicast * address provisioned * @li @a ixEthAccPortPromiscuousModeClear() - frames are forwarded * to the application following the multicast address provisioned * * In all cases, unicast and broadcast addresses are forwarded to * the application. * * @li Reentrant - yes * @li ISR Callable - no * * @sa ixEthAccPortPromiscuousModeClear * * @param portId @ref IxEthAccPortId [in] - Ethernet port id. * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid. * @li @a IX_ETH_ACC_PORT_UNINITIALIZED : portId is un-initialized * * <hr> */PUBLIC IxEthAccStatus ixEthAccPortPromiscuousModeSet(IxEthAccPortId portId);/** * @ingroup IxEthAcc * * @fn ixEthAccPortUnicastMacAddressSet( IxEthAccPortId portId, IxEthAccMacAddr *macAddr) * * @brief Configure unicast MAC address for a particular port * * * @li Reentrant - yes * @li ISR Callable - no * * @param portId @ref IxEthAccPortId [in] - Ethernet port id. * @param *macAddr @ref IxEthAccMacAddr [in] - Ethernet Mac address. * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid. * @li @a IX_ETH_ACC_PORT_UNINITIALIZED : portId is un-initialized * * <hr> */PUBLIC IxEthAccStatus ixEthAccPortUnicastMacAddressSet(IxEthAccPortId portId, IxEthAccMacAddr *macAddr);/** * @ingroup IxEthAcc * * @fn ixEthAccPortUnicastMacAddressGet( IxEthAccPortId portId, IxEthAccMacAddr *macAddr) * * @brief Get unicast MAC address for a particular MAC port * * @pre * The MAC address must first be set via @a ixEthAccMacPromiscuousModeSet * If the MAC address has not been set, the function returns a * IX_ETH_ACC_MAC_UNINITIALIZED status * * @li Reentrant - yes * @li ISR Callable - no * * @param portId @ref IxEthAccPortId [in] - Ethernet port id. * @param *macAddr @ref IxEthAccMacAddr [out] - Ethernet MAC address. * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid. * @li @a IX_ETH_ACC_MAC_UNINITIALIZED : port MAC address is not initialized. * @li @a IX_ETH_ACC_FAIL : macAddr is invalid. * * <hr> */PUBLIC IxEthAccStatusixEthAccPortUnicastMacAddressGet(IxEthAccPortId portId, IxEthAccMacAddr *macAddr);/** * @ingroup IxEthAcc * * @fn ixEthAccPortMulticastAddressJoin( IxEthAccPortId portId, IxEthAccMacAddr *macAddr) * * @brief Add a multicast address to the MAC address table. * * @note * Due to the operation of the Ethernet MAC multicast filtering mechanism, frames which do not * have a multicast destination address which were provisioned via this API may be forwarded * to the NPE's. This is a result of the hardware comparison algorithm used in the destination mac address logic * within the Ethernet MAC. * * See Also: Intel (R) IXP4XX Product Line of Network Processors hardware development manual. * * Other functions modify the MAC filtering * * @li @a ixEthAccPortMulticastAddressJoinAll() - all multicast * frames are forwarded to the application * @li @a ixEthAccPortMulticastAddressLeaveAll() - rollback the * effects of @a ixEthAccPortMulticastAddressJoinAll() * @li @a ixEthAccPortMulticastAddressLeave() - unprovision a new * filtering address * @li @a ixEthAccPortMulticastAddressJoin() - provision a new * filtering address * @li @a ixEthAccPortPromiscuousModeSet() - all frames are * forwarded to the application regardless of the multicast * address provisioned * @li @a ixEthAccPortPromiscuousModeClear() - frames are forwarded * to the application following the multicast address provisioned * * In all cases, unicast and broadcast addresses are forwarded to * the application. * * @li Reentrant - yes * @li ISR Callable - no * * @param portId @ref IxEthAccPortId [in] - Ethernet port id. * @param *macAddr @ref IxEthAccMacAddr [in] - Ethernet Mac address. * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_FAIL : Error writing to the MAC registers * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid. * @li @a IX_ETH_ACC_PORT_UNINITIALIZED : portId is un-initialized * * <hr> */PUBLIC IxEthAccStatusixEthAccPortMulticastAddressJoin(IxEthAccPortId portId, IxEthAccMacAddr *macAddr);/** * @ingroup IxEthAcc * * @fn ixEthAccPortMulticastAddressJoinAll( IxEthAccPortId portId) * * @brief Filter all frames with multicast dest. * * This function clears the MAC address table, and then sets * the MAC to forward ALL multicast frames to the NPE. * Specifically, it forwards all frames whose destination address * has the LSB of the highest byte set (01:00:00:00:00:00). This * bit is commonly referred to as the "multicast bit". * Broadcast frames will still be forwarded. * * Other functions modify the MAC filtering * * @li @a ixEthAccPortMulticastAddressJoinAll() - all multicast * frames are forwarded to the application * @li @a ixEthAccPortMulticastAddressLeaveAll() - rollback the * effects of @a ixEthAccPortMulticastAddressJoinAll() * @li @a ixEthAccPortMulticastAddressLeave() - unprovision a new * filtering address * @li @a ixEthAccPortMulticastAddressJoin() - provision a new * filtering address * @li @a ixEthAccPortPromiscuousModeSet() - all frames are * forwarded to the application regardless of the multicast * address provisioned * @li @a ixEthAccPortPromiscuousModeClear() - frames are forwarded * to the application following the multicast address provisioned * * In all cases, unicast and broadcast addresses are forwarded to * the application. * * @li Reentrant - yes * @li ISR Callable - no * * @param portId @ref IxEthAccPortId [in] - Ethernet port id. * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid. * @li @a IX_ETH_ACC_PORT_UNINITIALIZED : portId is un-initialized * * <hr> */PUBLIC IxEthAccStatusixEthAccPortMulticastAddressJoinAll(IxEthAccPortId portId);/** * @ingroup IxEthAcc * * @fn ixEthAccPortMulticastAddressLeave( IxEthAccPortId portId, IxEthAccMacAddr *macAddr) * * @brief Remove a multicast address from the MAC address table. * * Other functions modify the MAC filtering * * @li @a ixEthAccPortMulticastAddressJoinAll() - all multicast * frames are forwarded to the application * @li @a ixEthAccPortMulticastAddressLeaveAll() - rollback the * effects of @a ixEthAccPortMulticastAddressJoinAll() * @li @a ixEthAccPortMulticastAddressLeave() - unprovision a new * filtering address * @li @a ixEthAccPortMulticastAddressJoin() - provision a new * filtering address * @li @a ixEthAccPortPromiscuousModeSet() - all frames are * forwarded to the application regardless of the multicast * address provisioned * @li @a ixEthAccPortPromiscuousModeClear() - frames are forwarded * to the application following the multicast address provisioned * * In all cases, unicast and broadcast addresses are forwarded to * the application. * * @li Reentrant - yes * @li ISR Callable - no * * @param portId @ref IxEthAccPortId [in] - Ethernet port id. * @param *macAddr @ref IxEthAccMacAddr [in] - Ethernet Mac address. * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_NO_SUCH_ADDR : Failed if MAC address was not in the table. * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid. * @li @a IX_ETH_ACC_PORT_UNINITIALIZED : portId is un-initialized * * <hr> */PUBLIC IxEthAccStatusixEthAccPortMulticastAddressLeave(IxEthAccPortId portId, IxEthAccMacAddr *macAddr);/** * @ingroup IxEthAcc * * @fn ixEthAccPortMulticastAddressLeaveAll( IxEthAccPortId portId) * * @brief This function unconfigures the multicast filtering settings * * This function first clears the MAC address table, and then sets * the MAC as configured by the promiscuous mode current settings. * * Other functions modify the MAC filtering * * @li @a ixEthAccPortMulticastAddressJoinAll() - all multicast * frames are forwarded to the application * @li @a ixEthAccPortMulticastAddressLeaveAll() - rollback the * effects of @a ixEthAccPortMulticastAddressJoinAll() * @li @a ixEthAccPortMulticastAddressLeave() - unprovision a new * filtering address * @li @a ixEthAccPortMulticastAddressJoin() - provision a new * filtering address * @li @a ixEthAccPortPromiscuousModeSet() - all frames are * forwarded to the application regardless of the multicast * address provisioned * @li @a ixEthAccPortPromiscuousModeClear() - frames are forwarded * to the application following the multicast address provisioned * * In all cases, unicast and broadcast addresses are forwarded to * the application. * * @li Reentrant - yes * @li ISR Callable - no * * @param portId @ref IxEthAccPortId [in] - Ethernet port id. * * @return IxEthAccStatus * @li @a IX_ETH_ACC_SUCCESS * @li @a IX_ETH_ACC_INVALID_PORT : portId is invalid. * @li @a IX_ETH_ACC_PORT_UNINITIALIZED : portId is un-initialized * * <hr> */PUBLIC IxEthAccStatusixEthAccPortMulticastAddressLeaveAll(IxEthAccPortId portId);/** * @ingroup IxEthAcc * * @fn ixEthAccPortUnicastAddressShow(IxEthAccPortId portId) * * @brief Displays unicast MAC address * * Displays unicast address which is configured using * @a ixEthAccUnicastMacAddressSet. This function also displays the MAC filter used * to filter multicast frames. * * Other functions modify the MAC filtering * * @li @a ixEthAccPortMulticastAddressJoinAll() - all multicast * frames are forwarded to the application * @li @a ixEthAccPortMulticastAddressLeaveAll() - rollback the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -