Jump to main content

##

# DRV_GMAC_PacketTx Function

## C

    TCPIP_MAC_RES DRV_GMAC_PacketTx(DRV_HANDLE hMac, TCPIP_MAC_PACKET * ptrPacket);

## Returns

- TCPIP_MAC_RES_OK if success

- a TCPIP_MAC_RES error value if failed

## Description

This is the MAC transmit function. Using this function a packet is submitted to the MAC driver for transmission.

## Remarks

- The MAC driver supports internal queuing. A packet is rejected only if it's not properly formatted. Otherwise it will be scheduled for transmission and queued internally if needed.

- Once the packet is scheduled for transmission the MAC driver will set the TCPIP_MAC_PKT_FLAG_QUEUED flag so that the stack is aware that this packet is under processing and cannot be modified.

- Once the packet is transmitted, the TCPIP_MAC_PKT_FLAG_QUEUED will be cleared, the proper packet acknowledgment result (ackRes) will be set and the packet acknowledgment function (ackFunc) will be called.

## Preconditions

DRV_GMAC_Initialize() should have been called. DRV_GMAC_Open() should have been called to obtain a valid handle.

## Example Function

    TCPIP_MAC_RES DRV_GMAC_PacketTx(DRV_HANDLE hMac, TCPIP_MAC_PACKET * ptrPacket);