Compartilhar via


FilterNetPnPEvent (Compact 2013)

3/26/2014

NDIS calls a filter driver's FilterNetPnPEvent function to notify the driver of network Plug and Play (PnP) and Power Management events.

Syntax

NDIS_STATUS
  FilterNetPnPEvent(
    IN  NDIS_HANDLE  FilterModuleContext,
    IN  PNET_PNP_EVENT_NOTIFICATION  NetPnPEvent
    );

Parameters

  • FilterModuleContext
    A handle to the context area for the filter module. The filter driver created and initialized this context area in the FilterAttach function.
  • NetPnPEvent
    A pointer to a NET_PNP_EVENT_NOTIFICATION structure, which describes the PnP event or Power Management event being indicated to the filter driver.

Return Value

FilterNetPnPEvent can return either of the following:

Value

Description

NDIS_STATUS_SUCCESS

The driver successfully processed the PnP event.

NDIS_STATUS_FAILURE

The driver failed the PnP event.

The return value is significant only when the propagated event is a NetEventQueryPower or a NetEventQueryRemove event. For all other propagated events, the return value is always NDIS_STATUS_SUCCESS.

Remarks

FilterNetPnPEvent is an optional function. If a filter driver does not handle network PnP events, it can set the entry point for this function to NULL when it calls the NdisFRegisterFilterDriver function.

FilterNetPnPEvent resembles a protocol driver's ProtocolNetPnPEvent function. A filter driver can forward these notifications to overlying drivers or it can handle them itself and not forward them. To forward a notification, call the NdisFNetPnPEvent function. Do not confuse this function with the FilterDevicePnPEventNotify function, which filters notifications that are directed down the stack to underlying drivers.

NDIS calls FilterNetPnPEvent to notify a filter driver of a PnP or Power Management event that was issued for an underlying network driver. NDIS calls the FilterNetPnPEvent function of each filter driver overlying a network driver, and then calls the ProtocolNetPnPEvent function of each overlying protocol driver.

When a filter module is inserted into or deleted from a driver stack, the characteristics of the stack might change. NDIS sends a PnP event to all affected protocol bindings and filter modules to notify them about this change. Filter drivers should handle such changes appropriately.

NDIS calls FilterNetPnPEvent at IRQL = PASSIVE_LEVEL.

Requirements

Header

filter.h

See Also

Reference

NDIS Filter Driver Functions
FilterAttach
FilterDevicePnPEventNotify
NdisFNetPnPEvent
NdisFRegisterFilterDriver
NET_PNP_EVENT_NOTIFICATION
ProtocolNetPnPEvent