Redesign the WinDivert IOCTL interface.

The idea is to make future versions of the
WinDivert DLL compatible with older SYS and vice
versa.

The interface has also been streamlined so less
system calls are required when the handle is first
opened.
This commit is contained in:
basil00
2019-02-23 09:38:18 +08:00
parent e33cc74527
commit 32c5aa90f4
5 changed files with 447 additions and 421 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ int __cdecl main(int argc, char **argv)
// Main loop:
while (TRUE)
{
if (WinDivertRecv(handle, packet, sizeof(packet), &addr, &packet_len))
if (!WinDivertRecv(handle, packet, sizeof(packet), &addr, &packet_len))
{
warning("failed to read packet (%d)", GetLastError());
continue;