Windows kernel's WskSocket function fails to receive UDP from physical interface

50 Views Asked by At

I am using Winsock (WskSocket, WskBind and WskReceiveFrom) in my driver to receive UDP packets on port 4000. Code is based on Windows-driver-samples (wsksample) and it works but only when I send the data locally on loopback interface. Driver do not receive the data when I send packet from other machine thought physical Ethernet interface. In other hand I am able to receive those packet in userpace by for e.g. Hercules app. I'm using clean Windows 10 installation without any antivirus. Before I will include the code, I want to ask is it proper approach to use WskSocket for receive UDP data in driver or should I maybe use Ndis? Are there some additional steps required like filtering settings?

I tried various socket flags, including changing INADDR_ANY to specific IP.

0

There are 0 best solutions below