FILTER_SYNCHRONOUS_OID_REQUEST_COMPLETE function

NDIS calls a filter driver’s FilterSynchronousOidRequestComplete function after a Synchronous OID request has been completed from an underlying driver.

This function is supported in NDIS 6.81 and later.

Syntax

void FILTER_SYNCHRONOUS_OID_REQUEST_COMPLETE(
  NDIS_HANDLE      FilterModuleContext,
  NDIS_OID_REQUEST *OidRequest,
  NDIS_STATUS      *Status,
  PVOID            CallContext
);

Parameters

FilterModuleContext

A handle to the context area for the filter module that is the target of this request. The filter driver created and initialized this context area in the FilterAttach function.

OidRequest

A pointer to an NDIS_OID_REQUEST structure that specifies the operation being completed.

Status

A pointer to the resulting status code of the request being completed.

CallContext

A PVOID-sized storage slot for the filter driver to share state between its FilterSynchronousOidRequest and FilterSynchronousOidRequestComplete handlers. If the filter driver implements a FilterSynchronousOidRequest handler, this parameter contains the context value that the FilterSynchronousOidRequest handler returned. Otherwise, if the filter driver does not implement a FilterSynchronousOidRequest handler, this value is zero.

Return Value

This callback function does not return a value.

Remarks

FilterSynchronousOidRequestComplete is an optional function. If a filter driver does not need to observe or modify Synchronous OID requests completed from the miniport driver, the filter driver should set the entry point for this function to NULL when it calls NdisFRegisterFilterDriver.

NDIS calls the filter driver’s FilterSynchronousOidRequestComplete function to process Synchronous OID requests that are completed by underlying drivers. Filter drivers can read or modify some fields in the NDIS_OID_REQUEST structure as follows:

Field Filter access
Header Read-only
RequestType Read/write
PortNumber Read/write
Timeout Do not access
RequestId Do not access
RequestHandle Read/write
DATA Read/write
NdisReserved Do not access
MiniportReserved Do not access
SourceReserved Do not access
SupportedRevision Read/write
Reserved1, Reserved2 Do not access
SwitchId Read/write
VPortId Read/write
Flags Read/write

In addition to modifying the NDIS_OID_REQUEST structure, filter drivers can read or modify the status code with which the operation completed. The filter driver can write a new value to the *Status parameter. Filter drivers must not write NDIS_STATUS_PENDING or NDIS_STATUS_ALREADY_COMPLETE to the *Status parameter.

If the filter driver also registers a FilterSynchronousOidRequest handler, NDIS guarantees that the FilterSynchronousOidRequestComplete handler will be called if and only if the FilterSynchronousOidRequest handler returns NDIS_STATUS_SUCCESS.

Filter drivers are expected to return from their FilterSynchronousOidRequestComplete handler quickly, without blocking, waiting, or sleeping. Synchronous OID requests are only used for low-latency operations, and filter drivers should strive to continue or complete them within several milliseconds.

NDIS does not serialize Synchronous OID requests against each other, against other OID requests, or against FilterPause. It is the responsibility of the filter driver to implement any needed synchronization.

NDIS does serialize Synchronous OID requests against FilterDetach: NDIS guarantees that no Synchronous OID requests will be active once FilterDetach is invoked.

Filter drivers must not call NdisAllocateCloneOidRequest or NdisCancelOidRequest on a Synchronous OID request. Filter drivers must not call NdisFSynchronousOidRequest on an OID request that is received through a FilterSynchronousOidRequestComplete handler.

Requirements

   
Minimum supported client Windows 10, version 1709
Target Platform Windows
Header ndis.h (include Ndis.h)
IRQL "<= DISPATCH_LEVEL"

See Also

FilterSynchronousOidRequest

NdisFSynchronousOidRequest

Synchronous OID Request Interface in NDIS 6.80