NET_ADAPTER_WAKE_REASON_MAGIC_PACKET_INIT function (netadaptercx.h)

The client driver calls the NET_ADAPTER_WAKE_REASON_MAGIC_PACKET_INIT function to initialize a NET_ADAPTER_WAKE_REASON_PACKET structure when reporting that a magic packet caused a wake-up event.

Syntax

void NET_ADAPTER_WAKE_REASON_MAGIC_PACKET_INIT(
  [out] NET_ADAPTER_WAKE_REASON_PACKET *Reason
);

Parameters

[out] Reason

A pointer to a driver allocated NET_ADAPTER_WAKE_REASON_PACKET structure.

Return value

None

Remarks

When the NET_WAKE_SOURCE_TYPE is NetWakeSourceTypeMagicPacket, call NET_ADAPTER_WAKE_REASON_MAGIC_PACKET_INIT to initialize the NET_ADAPTER_WAKE_REASON_PACKET structure. Call NetAdapterReportWakeReasonPacket to report this wake reason to NetAdapterCx.

This function zeroes out the memory for the NET_ADAPTER_WAKE_REASON_PACKET structure, sets the Size member, and sets the PatternId member to NetAdapterWakeMagicPatternId.

Requirements

Requirement Value
Minimum supported client Windows 11
Minimum supported server Windows Server 2022
Target Platform Universal
Header netadaptercx.h (include netadaptercx.h)
IRQL Any level as long as target memory is resident

See also

Configuring NetAdapterCx Power Management

NET_ADAPTER_WAKE_REASON_PACKET

NetAdapterReportWakeReasonPacket

NET_WAKE_SOURCE_TYPE