RttcpipFrameTransmitInterface

RttcpipFrameTransmitInterface is used by a filter driver or an application to transmit an Ethernet frame for the device pointed by ndp.

Syntax

Copy
BOOL RttcpipFrameTransmitInterface(
    PVOID ndp,
    PVOID pEthernetFrame,
    ULONG ulDataSize
);

Parameters

ndp

The network device pointer.

pEthernetFrame

A pointer to a formatted Ethernet frame that includes an Ethernet header.

ulDataSize

The size of Ethernet frame, in bytes.

Return Value

If this function succeeds, it returns TRUE. If this function fails, it returns FALSE. Call WSAGetLastError for information on failure. The possible error codes are:

Error code Meaning

ERROR_DEVICE_NO_RESOURCES

A DMA buffer is not available.

ERROR_IO_DEVICE

The Ethernet link is down.

WSAEMSGSIZE

The frame is too large to fit in a driver or network buffer, or too small to send over Ethernet.

WSAEOPNOTSUPP

Not supported on Loop-back interface.

WSAENETDOWN

Invalid device pointer or the network interface is not configured by the TCP/IP Stack

WSAEINVAL

The pointer argument is NULL.

WSASYSNOTREADY

The TCP/IP Stack has not initialized.

Remarks

This function can be called in a filter driver or in an application that uses the TCP/IP Stack.

The network device pointer might be obtained by calling RttcpipGetDevicePtr.

The Frame Ethernet header must contain the destination MAC address and Ethernet type.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

RttcpipApi.h

RtTcpipApi.lib

See Also: