microsoft / Network-Adapter-Class-Extension

Network Adapter Class Extension to WDF (NetAdapter Cx) makes it easy to write high quality and high speed drivers for Network Interface Controllers
MIT License
54 stars 17 forks source link

[NetAdapterCx][Client Driver]Can't see wake up packet(from the wireshark view) #23

Open gg040431204 opened 4 weeks ago

gg040431204 commented 4 weeks ago

In NetAdapterCx Client Driver, I can use magic packet or patter packet to wake my system. but from wireshak, I can't see magic packet in wireshark view when I send magic packet in link partner. you can see the following picture Image But If I use NDIS driver, It can show the magic packet.

I add the NetAdapterReportWakeReasonPacket in the EvtDeviceWakeFromSxTriggered function. you can see the following picture Image

I see NDIS driver has two steps, the first step is to indicate wake reason, the second step is to indicate the wake-up packet when NIC link up. But I see netadapterCx driver does not have the two steps. And I find that the EvtDeviceDisarmWakeFromSx Event happen before NIC link up. I know that NetAdapterReportWakeReasonPacket must place between EvtDeviceWakeFromSxTriggered and EvtDeviceDisarmWakeFromSx. So I think it can not place NetAdapterReportWakeReasonPacket after NIC link up.

So anybody can give me suggestion to how to realize this feature for NetAdapterCx Driver.