RttcpipFrameTransmit

RttcpipFrameTransmit can be called when a filter or eRTOS application wants to transmit a frame pointed to by the parameter EthernetFrame. The frame must be in a format required by the standard Ethernet format.

The source physical address must match the physical address of one of the enabled eRTOS interfaces. It is used to select an interface from which to transmit a frame.

Syntax

Copy
BOOL RttcpipFrameTransmit(
   PVOID *pEthernetFrame,
   ULONG ulDataSize,
   UINT uLayer
);

Parameters

pEthernetFrame

Pointer to an Ethernet frame header.

ulDataSize

Size of the Ethernet payload data.

uLayer

Not supported.

Return Value

If this function succeeds, it returns TRUE, which means the frame is being transmitted. If this function fails, it returns FALSE, which means the frame is being dropped. You can retrieve an error code by calling WSAGetLastError. The possible error codes are:

Error code Meaning

WSAENETDOWN

The stack has not started or has not yet initialized the specified interface.

WSAEMSGSIZE

ulDataSize is < 46 or too large for the device MTU.

WSAEFAULT

pEthernetFrame is a NULL pointer.

ERROR_DEV_NOT_EXIST

The specified interface does not exist or has not initialized.

ERROR_IO_DEVICE

The Ethernet link is down.

ERROR_DEVICE_NO_RESOURCES

A DMA buffer is not available.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

RttcpipApi.h

RtTcpipApi.lib

See Also: