RtnGetPacket
RtnGetPacket returns a pointer to an RT-TCP/IP Stack packet structure. RtnGetPacket is used to obtain a packet from the driver receive packet pool.
Syntax
void * RtnGetPacket(
void *ndp,
long length
);
Parameters
ndp
Network Device Pointer. Opaque network device identifier (pointer).
length
Length required for the packet.
Return Value
A pointer to the RT-TCP/IP Stack packet structure. NULL on failure.
Remarks
The length of the packet is guaranteed to be long enough to contain length bytes of data (it may be longer). RtnGetPacket is normally used in the driver receive thread to obtain a packet to place received data into. The RtnDecodePacket routine is used to access the data area, length and ndp fields of the packet.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | rtnapi.h |
Library | RtTcpip.lib |