Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Enumerations | Functions
Packet Transmit And Receive [OPENAPI_PKT]

Enumerations

enum  OPEN_EXT_PKT_TX_TYPE_t {
  OPEN_EXT_PKT_TX_NORMAL_UNICAST = 0, OPEN_EXT_PKT_TX_VLAN_MULTICAST = 1, OPEN_EXT_PKT_TX_L2RAW_UNICAST = 2, OPEN_EXT_PKT_TX_L2RAW_VLAN_MULTICAST = 3,
  OPEN_EXT_PKT_TX_NUM_OF_TYPE = 4
}
 

Functions

open_error_t openapiExtPktTransmit (openapiClientHandle_t *client_handle, open_buffdesc *buffer, OPEN_EXT_PKT_TX_TYPE_t type, uint32_t ifNum, uint32_t vlanId, uint32_t priority)
 Transmit frame out of one or multiple front-panel switch interfaces. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
OPEN_EXT_PKT_TX_NORMAL_UNICAST 

Normal Unicast.

OPEN_EXT_PKT_TX_VLAN_MULTICAST 

Normal Unicast for VLAN members.

OPEN_EXT_PKT_TX_L2RAW_UNICAST 

Unicast without any modifications or state checks.

OPEN_EXT_PKT_TX_L2RAW_VLAN_MULTICAST 

Unicast for VLAN members without any modifications or state checks.

OPEN_EXT_PKT_TX_NUM_OF_TYPE 

Unused, always the last in the enum.

Definition at line 43 of file openapi_pkt.h.

Function Documentation

open_error_t openapiExtPktTransmit ( openapiClientHandle_t client_handle,
open_buffdesc buffer,
OPEN_EXT_PKT_TX_TYPE_t  type,
uint32_t  ifNum,
uint32_t  vlanId,
uint32_t  priority 
)

Transmit frame out of one or multiple front-panel switch interfaces.

Parameters
[in]client_handleclient handle from registration API
[in]bufferSpecifies the packet to be sent. The packet should be fully formed with all the L2/L3 ethernet header information encoded in the packet. The CRC should not be encoded in the packet and will be added by the hardware.
[in]typeFollowing frame transmission types are supported -
  • OPEN_EXT_PKT_TX_NORMAL_UNICAST: Send the frame out of specified interface and vlanId. A vlan tag will be added to the packet based on 802.1q tag configuration for the port. The packet will not be sent if the port is not a member of the specified vlan or if the port is not in spanning-tree forwarding state for the vlan.
                            \li \b OPEN_EXT_PKT_TX_L2RAW_UNICAST: Send the frame out of specified ifNum. 
                            The frame will be injected out without any
                            modifications and vlan membership/spanning-tree
                            state checks. 

                            \li \b OPEN_EXT_PKT_TX_VLAN_MULTICAST: Send the frame to all member interfaces of 
                            a given vlan. The frame is sent out of only
                            those members that are in spanning-tree forwarding
                            state for the vlan. A vlan tag will be added to the
                            packet based on 802.1q tag configuration for the interface.


                            \li \b OPEN_EXT_PKT_TX_L2RAW_VLAN_MULTICAST: Send the frame to all member interfaces of 
                            a given vlan. The frame is sent out of all member interfaces without 
                            any modifications and spanning-tree state checks.
[in]ifNumSpecifies the front-panel interface out of which the frame should be transmitted. The interface number could be a physical or logical (Lag/Vlan router) interface. For Lag interfaces , the packet is sent out of one of the member interfaces. For vlan router interfaces, a L2 forwardingdb lookup is done to determine the destination interface based on Destination mac/vlanId. If the destination mac is not learned on any interface, then the packet is sent to all vlan members.
[in]vlanIdvlanId for the frame
[in]priorityThe Dot1p priority to be placed in the frame. Values are from 0 (best effort) to 7 (highest); 1 represents the lowest priority.
Return values
OPEN_E_NONETransmission success.
OPEN_E_FAILFailed to send packets.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
tx_pkt_example.c.