RtNalReceiveWithCallback

RtNalReceiveWithCallback allows an application to receive an Ethernet packet in a callback called directly by driver. The receive packet callback of RTN_FN_PKT_CALLBACK type is provided in the RTNAL_QUEUE_CAPABILITIES structure in RtNalConfigureQueue.

Syntax

BOOL RtNalReceiveWithCallback(
	RTNAL_QUEUE_HANDLE queueHandle
);

Parameters

queueHandle

Queue handle returned by RtNalAcquireQueue.

Return Value

Returns TRUE if the driver has processed any number of DMA buffers, Returns FALSE if no DMA buffers were processed. Call GetLastError to obtain an error code. The possible error codes are listed below:

Error Code Meaning
ERROR_IO_DEVICE The device received a bad packet on this queue.
ERROR_NO_DATA No packets were received by the device on this queue.
ERROR_NOT_SUPPORTED Called for a transmit queue or the driver does not support RtndReceiveWithCallbackEx.
ERROR_NOT_READY RtNalConfigureQueue has not completed successfully.
ERROR_INVALID_HANDLE queueHandle is invalid. This might be occur if the queue was released in another thread or on process exit, as if by RtssKill.
ERROR_INVALID_PARAMETER queueHandle is a NULL pointer.

Remarks

This function does not copy data. An application must process a receive packet completely in a callback. Unlike RtNalReceive, this function dos not call RTN_FN_GETPACKET and RTN_FN_DECODEPACKET callbacks.

This function requires RtndReceiveWithCallback to be exported by the driver.

RtndReceiveWithCallback is not supported by the RtE1000 driver.

For the devices listed below, timestamps are retrieved from the packet descriptor, not the registers:

Requirements

Minimum Supported Version (NAL) RTX64 Network Abstraction Layer 2.0
Minimum Supported Version (RTX64) RTX64 3.4
Header rtnapi.h, RtNalApi.h
Library RtNal.lib

See Also: