Add support for pseudo IP/TCP/UDP checksums.

Most NIC cards support checksum offloading,
meaning that it is not necessary to calculate the
full IP/TCP/UDP checksums for injected packets.
WINDIVERT_ADDRESS has been extended to include 3
extra flags that indicate if the packet has full
or pseudo checksums.  This is a WIP.
This commit is contained in:
basil00
2017-11-09 22:11:13 +08:00
parent bbf6a34aa6
commit aea3a3a858
8 changed files with 194 additions and 252 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
/*
* streamdump.c
* (C) 2016 basil, all rights reserved,
* (C) 2017 basil, all rights reserved,
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -278,7 +278,7 @@ read_failed:
break;
}
WinDivertHelperCalcChecksums(packet, packet_len, 0);
WinDivertHelperCalcChecksums(packet, packet_len, &addr, 0);
poverlapped = (OVERLAPPED *)malloc(sizeof(OVERLAPPED));
if (poverlapped == NULL)
{