RTN_FN_DECODEPACKET

RTN_FN_DECODEPACKET is a pointer to an application function that is used to access various fields in the application-defined packet structure.

Syntax

VOID (*RTN_FN_DECODEPACKET)(
	PVOID pAppPacket,
	PVOID * ppAppContext,
	PULONG * ppData,
	PULONG * pLength
);

Parameters

pAppPacket

Pointer to the packet to decode.

ppAppContext

Pointer to the location to place the application context pointer used as an argument in RtNalConfigureQueue.

ppData

Pointer to the location to place the pointer to the data area for this packet.

pLength

Pointer to the location to place the maximum length (in bytes) of this packet.

Return Value

None

Remarks

An application that uses RtNalReceive and RtNalTransmit defines its own internal packet format. In order to access fields required by the driver, the driver should use RtnDecodePacket, which will call an application callback RTN_FN_DECODEPACKET. RTN_FN_DECODEPACKET returns the application context, the data area pointer (in ppData), and the maximum data area length (in pLength) of the packet.

When the driver reads data from the NIC, it copies the data to the data area pointed to by the data area pointer (ppData). The size of the received packet is the pLength requested in RTN_FN_GET_PACKET.

When RTN_FN_DECODEPACKET is called on transmit, the returned data pointer (ppData) must point to data to copy to the driver’s buffer. The returned length (pLength) is the size of the packet to send in bytes.

Requirements

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

See Also: