EVT_NET_ADAPTER_PREVIEW_PROTOCOL_OFFLOAD callback function

Warning

Some information in this topic relates to prereleased product, which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

NetAdapterCx is preview only in Windows 10, version 1903.

Implement this optional callback to reject protocol offloads that are not compatible with your hardware.

Syntax

EVT_NET_ADAPTER_PREVIEW_PROTOCOL_OFFLOAD EvtNetAdapterPreviewProtocolOffload;

NTSTATUS EvtNetAdapterPreviewProtocolOffload(
  NETADAPTER Adapter,
  NETPOWERSETTINGS ExistingPowerSettings,
  NDIS_PM_PROTOCOL_OFFLOAD_TYPE ProtocolOffloadType,
  PNDIS_PM_PROTOCOL_OFFLOAD ProtocolOffloadToBeAdded
)
{...}

Parameters

Adapter

The network adapter object that the client created in a prior call to NetAdapterCreate.

ExistingPowerSettings

A handle to the net power settings object.

ProtocolOffloadType

An NDIS_PM_PROTOCOL_OFFLOAD_TYPE enumeration value that specifies the type of protocol offload.

ProtocolOffloadToBeAdded

A pointer to a structure of type NDIS_PM_PROTOCOL_OFFLOAD that specifies the protocol offload to accept or reject.

Return Value

To accept the protocol offload, the callback function must return STATUS_SUCCESS.

To reject the protocol offload, return STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL.

Remarks

Drivers are not required to implement EvtNetAdapterPreviewProtocolOffload, as NetAdapter already blocks protocol offloads that are not compatible with the driver's NET_ADAPTER_POWER_CAPABILITIES. However, if your hardware has additional limitations that cannot be expressed in the NET_ADAPTER_POWER_CAPABILITIES structure, you can provide EvtNetAdapterPreviewProtocolOffload to enforce those additional limitations.

Register your implementation of this callback function by setting the appropriate member of NET_ADAPTER_POWER_CAPABILITIES, then calling NetAdapterSetPowerCapabilities. Client drivers typically call NetAdapterSetPowerCapabilities when starting a net adapter, before calling NetAdapterStart.

In this callback, the driver typically iterates through the ExistingPowerSettings to determine whether to accept or reject ProtocolOffloadToBeAdded.

The client driver can use the pointer to examine the NDIS_PM_PROTOCOL_OFFLOAD structure, but should not retain it. NetAdapterCx will destroy the protocol offload structure once the driver's EvtNetAdapterPreviewProtocolOffload returns.

For more info, see Configuring Power Management.

Requirements

   
Target Platform Universal
Minimum KMDF version 1.21
Header netadapter.h
IRQL PASSIVE_LEVEL

See Also

EVT_NET_ADAPTER_PREVIEW_WAKE_PATTERN

NetAdapterSetPowerCapabilities