Hi,
Is it possible to generate executables based on ndisapi framework via CYGWIN ?
I tried to compile PerfTest, by replacing C++ api calls with C api ones; then simply generating “perftest.exe” with the following command in Cygwin command shell:
$ /usr/bin/c++ perftest.cpp stdafx.cpp -o PerfTest.exe ndisapi.dll -I../ndisapi/Include
I installed “Windows Packet Filter v3.4.8” on my Windows 10 Pro environment.
When I run the application;
1. NDISRD device is opened successfully ( via OpenFilterDriver call )
2. Adapter list is obtained successfully ( via GetTcpipBoundAdaptersInfo )
3. SetPacketEvent fails. When I debug, I see that;
3.1 CNdisApi::SetPacketEvent calls “CNdisApi::DeviceIoControl”.
3.2 “CNdisApi::DeviceIoControl” calls DeviceIOControl from “ioapiset.h” which always returns “87: INVALID_PARAMETER” error.
Is there any additional configuration task to be applied in order to not experience this error ?
Visual Studio uses “‘C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ioapiset.h'”
while cygwin uses its own w32api header: “/usr/include/w32api/ioapiset.h”
I didn’t see any difference between DeviceIoControl definitions. GetTcpipBoundAdaptersInfo calls same function without any error.
Is there a document describing how to compile and run ndisapi or ndisapi based apps ( dnstrace etc. ) on Cygwin?
Thanks.