nf_tcpPostReceive

Indicate the buffer to local process via TCP connection with specified id.
NF_STATUS nf_tcpPostReceive(ENDPOINT_ID id, const char * buf, int len)

Parameters

id
Connection identifier
buf
Pointer to data buffer
len
Buffer length

Return Values

NF_STATUS_SUCCESS on success, or other NF_STATUS error code on fail.

Remarks

The library splits the buffer to packets and tries to indicate them to local socket. The method NF_EventHandler::tcpCanReceive is called when the internal packet buffer is empty. The function always returns NF_STATUS_SUCCESS after buffering the data. To optimize the usage of memory split large buffers to chunks and indicate each chunk after receiving tcpCanReceive. There is no need to wait for tcpCanReceive before indicating the first chunk.

If len is zero, the driver sends a controlled disconnect request to local process for the specified TCP connection.

Requirements

Driver type WFP, TDI
Header nfapi.h
Library nfapi.lib