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 an Ethernet packet was received. Returns FALSE if there was an error receiving a packet. 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 RtndReceiveWithCallback.
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

For a list of supported functions for specific drivers, see Matrix of Supported Real-Time NAL Functions by NIC Driver.

The RtNalE1000 driver does not support this function.

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.

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

Requirements

Minimum Supported Version RTX64 4.0
Header rtnapi.h, RtNalApi.h
Library RtNal.lib

See Also: