Bewerken

Delen via


TCP_OFFLOAD_RECEIVE_INDICATE_HANDLER callback function (ndischimney.h)

[The TCP chimney offload feature is deprecated and should not be used.]

NDIS calls a protocol driver's or intermediate driver's ProtocolTcpOffloadReceiveIndicate function to deliver received data that is being indicated by an underlying driver or offload target.

Syntax

TCP_OFFLOAD_RECEIVE_INDICATE_HANDLER TcpOffloadReceiveIndicateHandler;

NDIS_STATUS TcpOffloadReceiveIndicateHandler(
  [in]  IN PVOID OffloadContext,
  [in]  IN PNET_BUFFER_LIST NetBufferList,
  [in]  IN NDIS_STATUS Status,
  [out] OUT PULONG BytesConsumed
)
{...}

Parameters

[in] OffloadContext

A pointer to the protocol or intermediate driver's NDIS_OFFLOAD_HANDLE structure for the TCP connection on which the indication is being made. The protocol or intermediate driver supplied this pointer as an input parameter to the NdisInitiateOffload function when offloading the connection.

[in] NetBufferList

A pointer to a NET_BUFFER_LIST structure. Each NET_BUFFER_LIST structure describes a list of NET_BUFFER structures. Each NET_BUFFER structure in the list maps to a chain of memory descriptor lists (MDLs). The MDLs contain the received data. The MDLs are locked so that they remain resident, but they are not mapped into system memory.

The NET_BUFFER_LIST structure specified by NetBufferList must be a stand-alone structure and cannot be the first structure in a linked list of NET_BUFFER_LIST structures. Offload targets can work around this limitation by chaining as many MDLs as necessary to the same NET_BUFFER in an offload receive indication.

[in] Status

An intermediate driver should propagate this status when calling NdisTcpOffloadReceiveHandler.

[out] BytesConsumed

A pointer to a ULONG-typed variable that receives the number of bytes that were consumed by the client application.

Return value

The ProtocolTcpOffloadReceiveIndicate function can return one of the following values:

Return code Description
NDIS_STATUS_SUCCESS
The client application consumed all the indicated receive data.
NDIS_STATUS_OFFLOAD_DATA_NOT_ACCEPTED
The client application rejected all the indicated receive data.
NDIS_STATUS_OFFLOAD_DATA_PARTIALLY_ACCEPTED
The client application consumed a subset of the indicated receive data. The amount of data, in bytes, that was consumed by the client application is returned in the variable specified by the BytesConsumed parameter.

Remarks

To propagate the indication to the overlying driver or host stack, the intermediate driver calls the NdisTcpOffloadReceiveHandler function. The intermediate driver passes the following parameters to the NdisTcpOffloadReceiveHandler function:

  • The NdisOffloadHandle that the offload target stored in its context for the offloaded TCP connection. For more information, see Referencing Offloaded State Through an Intermediate Driver.
  • The NetBufferList pointer that NDIS passed to the intermediate driver's ProtocolTcpOffloadReceiveIndicate function.
  • The Status that NDIS passed to the intermediate driver's ProtocolTcpOffloadReceiveIndicate function.

Requirements

Requirement Value
Target Platform Windows
Header ndischimney.h (include Ndischimney.h)

See also

MDL

NDIS_OFFLOAD_HANDLE

NET_BUFFER

NET_BUFFER_LIST

NdisInitiateOffload

NdisOffloadTcpReceiveReturn

NdisTcpOffloadReceiveHandler