RtndTransmit

RtndTransmit transmits a single packet on a driver’s transmit queue. It copies data from the application packet to the driver buffer. The packet buffer is available to the caller as soon as RtndTransmit returns.

Syntax

INT RtndTransmit(
    VOID *mp
);

Parameters

mp

Pointer to a Packet to transmit

Return Value

A return value of 0 indicates Success, -1 indicates Failure. The possible error codes are:

Error Code Meaning
ERROR_BAD_ARGUMENTS mp or retrieved device pointer is NULL or retrieved interface index or queue number is invalid.
ERROR_INVALID_ADDRESS The retrieved data pointer is NULL.
ERROR_INCORRECT_SIZE The retrieved packet size is 0 or exceeds maximum.
ERROR_IO_DEVICE The Ethernet link is down.
ERROR_DEVICE_NO_RESOURCES There is no available DMA buffer.

Process Context

RtndTransmit is used by RtNalTransmit in a context of a NAL client application. Process context is not pre-defined.

Remarks

The packet, pointed to by the parameter mp, is in a NAL client application format, which the driver does not need to know. The driver must use the RtnDecodePacket routine to obtain the network device (ndp), data pointer and data length for the packet.

The driver should call RtnGetDataLong with offset 0 to get the driver interface index and RtnGetDataLong with offset 1 to get the transmit queue number.

See Transmitting Packets by the NIC Driver.

Requirements

Minimum Supported Version RTX64 4.0
Header RtnApi.h
Library RTX64Nal.lib