次の方法で共有


FwpsCloneStreamData0 (Compact 2013)

3/26/2014

This function allocates a clone of an existing FWPS_STREAM_DATA0**data stream.

Syntax

NTSTATUS NTAPI
  FwpsCloneStreamData0(
    IN OUT FWPS_STREAM_DATA0  *calloutStreamData,
    IN OPTIONAL NDIS_HANDLE  netBufferListPoolHandle,
    IN OPTIONAL NDIS_HANDLE  netBufferPoolHandle,
    IN ULONG  allocateCloneFlags,
    OUT NET_BUFFER_LIST  **netBufferListChain
    );

Parameters

  • calloutStreamData
    A pointer to the original FWPS_STREAM_DATA0 structure that is to have its NET_BUFFER_LIST structure cloned
  • netBufferListPoolHandle
    A NET_BUFFER_LIST pool handle that was obtained from a previous NdisAllocateNetBufferListPool function call. This parameter is optional and can be NULL
  • allocateCloneFlags
    No flags are currently defined for this function. Callout drivers should set this parameter to zero.
  • netBufferListChain
    A pointer to a location that receives a pointer to a chain of NET_BUFFER_LIST structures, that describe all the cloned stream data.

Return Value

The FwpsCloneStreamData0 function returns one of the following NTSTATUS codes:

Value

Description

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 later.

The FwpsCloneStreamData0 function clones the complete chain of NET_BUFFER_LIST structures contained in the existing FWPS_STREAM_DATA0 data stream. The function trims unused data so 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 is 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

Header

fwpsk.h

See Also

Reference

Functions Called by Callout Drivers
FWPS_STREAM_DATA0
NET_BUFFER_LIST
NdisAllocateNetBufferListPool
NET_BUFFER
NdisAllocateNetBufferPool
FwpsDiscardClonedStreamData0
FwpsFreeCloneNetBufferList0
FwpsStreamInjectAsync0
WFP Callout Driver Functions