MAC_DRVR_PacketTx Function
C
TCPIP_MAC_RES MAC_DRVR_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
MAC_DRVR_Initialize() should have been called.
MAC_DRVR_Open() should have been called to obtain a valid handle.
Parameters
Parameters | Description |
---|---|
hMac | Ethernet MAC client handle |
ptrPacket | pointer to a TCPIP_MAC_PACKET that's completely formatted and ready to be transmitted over the network |