From ba5e893f8fad7241675040dda25e0d34a4294e73 Mon Sep 17 00:00:00 2001 From: basil00 Date: Tue, 14 Nov 2017 20:41:18 +0800 Subject: [PATCH] Update the test suite. --- include/windivert.h | 1 + test/test.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/windivert.h b/include/windivert.h index 4b4ed5e..702e74b 100644 --- a/include/windivert.h +++ b/include/windivert.h @@ -29,6 +29,7 @@ #ifdef __MINGW32__ #define __in +#define __in_opt #define __out #define __out_opt #define __inout diff --git a/test/test.c b/test/test.c index b5478ea..f1b79f8 100644 --- a/test/test.c +++ b/test/test.c @@ -100,6 +100,8 @@ static struct test tests[] = {"outbound and icmp", &pkt_echo_request, TRUE}, {"outbound", &pkt_echo_request, TRUE}, {"outbound and inbound", &pkt_echo_request, FALSE}, + {"loopback", &pkt_echo_request, FALSE}, + {"impostor", &pkt_echo_request, FALSE}, {"icmp", &pkt_echo_request, TRUE}, {"not icmp", &pkt_echo_request, FALSE}, {"ip or ipv6", &pkt_echo_request, TRUE}, @@ -319,7 +321,7 @@ int main(void) BOOL match = tests[i].match; // Ensure the correct checksum: - WinDivertHelperCalcChecksums(packet, packet_len, 0); + WinDivertHelperCalcChecksums(packet, packet_len, NULL, 0); // Run the test: BOOL res = run_test(upper_handle, filter, packet, packet_len, match); @@ -464,7 +466,7 @@ read_failed: } if (addr.Direction == WINDIVERT_DIRECTION_OUTBOUND) { - WinDivertHelperCalcChecksums(buf, buf_len, 0); + WinDivertHelperCalcChecksums(buf, buf_len, NULL, 0); } // (4) Verify that the packet is the same.