diff --git a/examples/netdump/netdump.c b/examples/netdump/netdump.c index 43e996c..26ded3c 100644 --- a/examples/netdump/netdump.c +++ b/examples/netdump/netdump.c @@ -76,7 +76,7 @@ int __cdecl main(int argc, char **argv) console = GetStdHandle(STD_OUTPUT_HANDLE); // Divert traffic matching the filter: - handle = DivertOpen(argv[1], 0, priority, DIVERT_FLAG_SNIFF); + handle = DivertOpen(argv[1], (DIVERT_LAYER)0, priority, DIVERT_FLAG_SNIFF); if (handle == INVALID_HANDLE_VALUE) { if (GetLastError() == ERROR_INVALID_PARAMETER) diff --git a/examples/netfilter/netfilter.c b/examples/netfilter/netfilter.c index 581203d..805f39d 100644 --- a/examples/netfilter/netfilter.c +++ b/examples/netfilter/netfilter.c @@ -149,7 +149,7 @@ int __cdecl main(int argc, char **argv) console = GetStdHandle(STD_OUTPUT_HANDLE); // Divert traffic matching the filter: - handle = DivertOpen(argv[1], 0, priority, 0); + handle = DivertOpen(argv[1], (DIVERT_LAYER)0, priority, 0); if (handle == INVALID_HANDLE_VALUE) { if (GetLastError() == ERROR_INVALID_PARAMETER) diff --git a/examples/passthru/passthru.c b/examples/passthru/passthru.c index f14fbd5..0b8adbd 100644 --- a/examples/passthru/passthru.c +++ b/examples/passthru/passthru.c @@ -56,7 +56,7 @@ int __cdecl main(int argc, char **argv) } // Divert traffic matching the filter: - handle = DivertOpen(argv[1], 0, 0, 0); + handle = DivertOpen(argv[1], (DIVERT_LAYER)0, 0, 0); if (handle == INVALID_HANDLE_VALUE) { if (GetLastError() == ERROR_INVALID_PARAMETER) diff --git a/examples/webfilter/webfilter.c b/examples/webfilter/webfilter.c index 826856d..061bcda 100644 --- a/examples/webfilter/webfilter.c +++ b/examples/webfilter/webfilter.c @@ -163,7 +163,7 @@ int __cdecl main(int argc, char **argv) "ip && " // Only IPv4 supported "tcp.DstPort == 80 && " // HTTP (port 80) only "tcp.PayloadLength > 0", // TCP data packets only - 0, priority, 0 + (DIVERT_LAYER)0, priority, 0 ); if (handle == INVALID_HANDLE_VALUE) {