Expand Minimize

FwpsCloneStreamData0 function

The FwpsCloneStreamData0 function allocates a clone of an existing FWPS_STREAM_DATA0 data stream.

Note  FwpsCloneStreamData0 is a specific version of FwpsCloneStreamData. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information.

Syntax


NTSTATUS NTAPI FwpsCloneStreamData0(
  _Inout_   FWPS_STREAM_DATA0 *calloutStreamData,
  _In_opt_  NDIS_HANDLE netBufferListPoolHandle,
  _In_opt_  NDIS_HANDLE netBufferPoolHandle,
  _In_      ULONG allocateCloneFlags,
  _Out_     NET_BUFFER_LIST **netBufferListChain
);

Parameters

calloutStreamData [in, out]

A pointer to the original FWPS_STREAM_DATA0 structure that is to have its NET_BUFFER_LIST structure cloned.

netBufferListPoolHandle [in, optional]

A NET_BUFFER_LIST pool handle that was obtained from a previous call to the NdisAllocateNetBufferListPool function. This parameter is optional and can be NULL.

netBufferPoolHandle [in, optional]

A NET_BUFFER pool handle that was obtained from a previous call to the NdisAllocateNetBufferPool function. This parameter is optional and can be NULL.

allocateCloneFlags [in]

There are currently no flags defined for this function. Callout drivers should set this parameter to zero.

netBufferListChain [out]

A pointer to a location that receives a pointer to a chain of NET_BUFFER_LIST structures that describe all of the cloned stream data.

Return value

The FwpsCloneStreamData0 function returns one of the following NTSTATUS codes.

Return codeDescription
STATUS_SUCCESS

The clone FWPS_STREAM_DATA0 structure was successfully allocated.

Other status codes

An error occurred.

 

Remarks

This cloned stream data can be injected by a callout driver into the TCP/IP network stack at a later time.

The FwpsCloneStreamData0 function clones the entire chain of NET_BUFFER_LIST structures contained in the existing FWPS_STREAM_DATA0 data stream. The function trims unused data such that a callout driver can successfully pass the cloned chain to the FwpsStreamInjectAsync0 function.

After stream data in the clone NET_BUFFER_LIST structure chain has been successfully injected into the network stack, the completionFn callout function is called for each clone NET_BUFFER_LIST structure, and a callout should call FwpsFreeCloneNetBufferList0 to free the clone NET_BUFFER_LIST structure.

A callout should call the FwpsDiscardClonedStreamData0 function if the cloned stream data is to be discarded without being reinjected.

Requirements

Version

Available starting with Windows Vista.

Header

Fwpsk.h (include Fwpsk.h)

Library

Fwpkclnt.lib

IRQL

<= DISPATCH_LEVEL

See also

FWPS_STREAM_DATA0
FwpsDiscardClonedStreamData0
FwpsFreeCloneNetBufferList0
FwpsStreamInjectAsync0
NET_BUFFER
NET_BUFFER_LIST

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft