![]() |
ETHFW API Guide
|
This file contains the type definitions and helper macros for Ethernet Firmware's Virtual Port.
Go to the source code of this file.
Enumerations | |
| enum | EthRemoteCfg_VirtPort { ETHREMOTECFG_SWITCH_PORT_0, ETHREMOTECFG_SWITCH_PORT_1, ETHREMOTECFG_SWITCH_PORT_2, ETHREMOTECFG_SWITCH_PORT_3, ETHREMOTECFG_SWITCH_PORT_LAST = ETHREMOTECFG_SWITCH_PORT_3, ETHREMOTECFG_MAC_PORT_1, ETHREMOTECFG_MAC_PORT_2, ETHREMOTECFG_MAC_PORT_3, ETHREMOTECFG_MAC_PORT_4, ETHREMOTECFG_MAC_PORT_5, ETHREMOTECFG_MAC_PORT_6, ETHREMOTECFG_MAC_PORT_7, ETHREMOTECFG_MAC_PORT_8, ETHREMOTECFG_MAC_PORT_LAST = ETHREMOTECFG_MAC_PORT_8 } |
| Virtual port id. More... | |
Functions | |
| static bool | EthRemoteCfg_isSwitchPort (EthRemoteCfg_VirtPort portId) |
| Check whether port is a virtual switch port or not. More... | |
| static bool | EthRemoteCfg_isMacPort (EthRemoteCfg_VirtPort portId) |
| Check whether port is a virtual MAC port or not. More... | |
| static uint32_t | EthRemoteCfg_getPortNum (EthRemoteCfg_VirtPort portId) |
| Get virtual port number. More... | |
| static Enet_MacPort | EthRemoteCfg_getMacPort (EthRemoteCfg_VirtPort portId) |
| Get Enet MAC port number corresponding to a virtual port id. More... | |
Virtual port id.
|
static |
Check whether port is a virtual switch port or not.
| portId | [in] Virtual port id. |
|
static |
Check whether port is a virtual MAC port or not.
| portId | [in] Virtual port id. |
|
static |
Get virtual port number.
Gets the port number of a virtual port. Virtual switch ports numbers are 0-relative and virtual MAC ports are 1-relative.
| portId | [in] Virtual port id. |
|
static |
Get Enet MAC port number corresponding to a virtual port id.
Gets the Enet MAC port number corresponding to a virtual MAC port. It will return ENET_MAC_PORT_INV for virtual switch ports.
The returned value of this function could be used as is to populate the port number used for TX directed packets.
| portId | Virtual port id. |
ENET_MAC_PORT_INV for virtual switch ports.