RtndReceive
RtndReceive is called to retrieve a single received packet from a driver’s receive queue.
Syntax
INT RtndReceive( VOID *ndp );
Parameters
ndp
An opaque pointer to a network device.
Return Value
Returns 0 (zero) if the function succeeds. Returns a non-zero value if the function fails. The possible error codes are:
Error Code | Meaning |
---|---|
ERROR_BAD_ARGUMENTS | ndp is NULL or retrieved interface index or queue number is invalid |
ERROR_NO_NETWORK | The device is not up. |
ERROR_NO_DATA | There is no packet waiting to receive. |
ERROR_DEVICE_NOT_CONNECTED | There is no NAL client application attached to the receive queue. |
ERROR_IO_DEVICE | Receive frame error. |
ERROR_INVALID_USER_BUFFER | The NAL client application has not provided a valid packet buffer. The buffer might be too small. |
ERROR_DISCARDED | A receive callback, configured for the receive queue, discarded the packet. |
Remarks
The function must call an application receive packet callback if the callback was configured for the queue and copy packet data to the application data buffer if the callback has not discarded the packet.
If the adapter has stored the timestamp with a packet, the driver should provide the timestamp in a receive packet callback.
The driver should call RtnGetDataLong with offset 0 to get the driver interface index, RtnGetDataLong with offset 1 to get obtain the receive queue number.
RtndReceive must call RtnGetPacket and RtnDecodePacket to get the application packet buffer.
See Receiving Packets by the NIC Driver.
Process Context
Used in a context of NAL client application by RtNalReceive.
Requirements
Minimum Supported Version | RTX64 4.0 |
Header | RtnApi.h |
Library | RTX64Nal.lib |