NdisEnumerateFilterModules (Compact 2013)

3/26/2014

This function enumerates all the filters modules and filter intermediate driver instances in a filter stack.

Syntax

NDIS_STATUS
NdisEnumerateFilterModules (
    IN  NDIS_HANDLE  NdisHandle,
    IN  PVOID  InterfaceBuffer,
    IN  ULONG  InterfaceBufferLength,
    IN  OUT PULONG  BytesNeeded,
    IN  OUT PULONG  BytesWritten
    );

Parameters

  • NdisHandle
    An NDIS handle that was obtained during caller initialization.

    If the handle is an NDIS miniport adapter handle, NDIS returns information about all the interface modules that are currently attached to the miniport adapter, starting with the top-most filter module.

    If the handle is an NDIS binding handle, NDIS returns information about all the filter modules that are currently attached to the underlying miniport adapter, starting with the top-most filter module.

    If the handle is an NDIS filter module handle, NDIS returns information about all the filter modules that are currently attached to the underlying miniport adapter to which the specified filter module is attached, starting with the top-most filter module.

  • InterfaceBuffer
    A pointer to a caller-allocated memory block in which NDIS returns the information for all the filter modules in a filter stack, starting with top-most filter. This buffer contains an NDIS_ENUM_FILTERS structure that is followed by zero or more NDIS_FILTER_INTERFACE structures, one for each filter module in the stack.
  • InterfaceBufferLength
    The length, in bytes, of the caller-supplied memory block at the InterfaceBuffer member.
  • BytesNeeded
    A pointer to a caller-supplied variable where NDIS writes the total number of bytes that NDIS requires to successfully return the interface information for all the filters in the filter stack.
  • BytesWritten
    A pointer to a caller-supplied variable where NDIS writes the total bytes that NDIS wrote in the memory at InterfaceBuffer.

Return Value

NdisEnumerateFilterModules returns one of the following status values:

Value

Description

NDIS_STATUS_SUCCESS

The operation completed successfully.

NDIS_STATUS_INVALID_PARAMETER

NdisEnumerateFilterModules failed because the NdisHandle parameter was not a valid NDIS miniport adapter, protocol binding, or filter module handle.

NDIS_STATUS_BUFFER_TOO_SHORT

NdisEnumerateFilterModules failed because the buffer that was supplied at the InterfaceBuffer parameter was too short for NDIS to return all the information. If a partial result was written at InterfaceBuffer, the value at the BytesWritten parameter contains the length of the partial results.

Remarks

An NDIS miniport driver, protocol driver, or filter driver can call the NdisEnumerateFilterModules function to enumerate all the filters in a filter stack.

NdisEnumerateFilterModules returns the list of filter modules and filter intermediate drivers from the top to the bottom of the driver stack. For example, if filter modules (F1 and F2) are attached to miniport adapter (M1) and if F2 is above F1, NdisEnumerateFilterModules returns the list in the following order: F2, F1. If there is also a filter intermediate driver (M2) that is bound to M1, if M2 is above F2, and if another filter (F3) is attached to M2, NdisEnumerateFilterModules returns the filter list in the following order: F3, M2, F2, F1.

Requirements

Header

ndis.h

See Also

Reference

NDIS Functions for Filter Drivers
NDIS_ENUM_FILTERS
NDIS_FILTER_INTERFACE
NDIS Filter Driver Functions