Something went wrong. Try again.
Reactos
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307/* * PROJECT: ReactOS API Tests * LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+) * PURPOSE: Test for AFD_INFO_RECEIVE_WINDOW_SIZE/AFD_INFO_SEND_WINDOW_SIZE * COPYRIGHT: Copyright 2019 Pierre Schweitzer (pierre@reactos.org) */
#include "precomp.h"
staticvoidTestTcp(void){ NTSTATUS Status; HANDLE SocketHandle; struct sockaddr_in addr; ULONG OrigReceiveSize, OrigSendSize, ReceiveSize, SendSize;
Status = AfdCreateSocket(&SocketHandle, AF_INET, SOCK_STREAM, IPPROTO_TCP); ok(Status == STATUS_SUCCESS, "AfdCreateSocket failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &OrigReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(OrigReceiveSize == 0x1000 || OrigReceiveSize == 0x2000, "Invalid size: %lu\n", OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &OrigSendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(OrigSendSize == 0x1000 || OrigSendSize == 0x2000, "Invalid size: %lu\n", OrigSendSize);
ReceiveSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status); SendSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status);
ReceiveSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status); SendSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = OrigReceiveSize; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status); SendSize = OrigSendSize; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status);
memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr("0.0.0.0"); addr.sin_port = htons(0);
Status = AfdBind(SocketHandle, (const struct sockaddr *)&addr, sizeof(addr)); ok(Status == STATUS_SUCCESS, "AfdBind failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status); SendSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status);
ReceiveSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status); SendSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = OrigReceiveSize; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status); SendSize = OrigSendSize; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_INVALID_PARAMETER, "AfdSetInformation failed with %lx\n", Status);
memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr("8.8.8.8"); addr.sin_port = htons(53);
Status = AfdConnect(SocketHandle, (const struct sockaddr *)&addr, sizeof(addr)); ok(Status == STATUS_SUCCESS, "AfdConnect failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = OrigReceiveSize + 1; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = OrigSendSize + 1; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = OrigReceiveSize - 1; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = OrigSendSize - 1; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
NtClose(SocketHandle);}
staticvoidTestUdp(void){ NTSTATUS Status; HANDLE SocketHandle; struct sockaddr_in addr; ULONG OrigReceiveSize, OrigSendSize, ReceiveSize, SendSize;
Status = AfdCreateSocket(&SocketHandle, AF_INET, SOCK_DGRAM, IPPROTO_UDP); ok(Status == STATUS_SUCCESS, "AfdCreateSocket failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &OrigReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(OrigReceiveSize == 0x1000 || OrigReceiveSize == 0x2000, "Invalid size: %lu\n", OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &OrigSendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(OrigSendSize == 0x1000 || OrigSendSize == 0x2000, "Invalid size: %lu\n", OrigSendSize);
ReceiveSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = OrigReceiveSize; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = OrigSendSize; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = inet_addr("0.0.0.0"); addr.sin_port = htons(0);
Status = AfdBind(SocketHandle, (const struct sockaddr *)&addr, sizeof(addr)); ok(Status == STATUS_SUCCESS, "AfdBind failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = 0; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = (ULONG)-1L; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = OrigReceiveSize + 1; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = OrigSendSize + 1; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
ReceiveSize = OrigReceiveSize - 1; Status = AfdSetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status); SendSize = OrigSendSize - 1; Status = AfdSetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdSetInformation failed with %lx\n", Status);
Status = AfdGetInformation(SocketHandle, AFD_INFO_RECEIVE_WINDOW_SIZE, NULL, &ReceiveSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(ReceiveSize == OrigReceiveSize, "Invalid size: %lu %lu\n", ReceiveSize, OrigReceiveSize); Status = AfdGetInformation(SocketHandle, AFD_INFO_SEND_WINDOW_SIZE, NULL, &SendSize, NULL); ok(Status == STATUS_SUCCESS, "AfdGetInformation failed with %lx\n", Status); ok(SendSize == OrigSendSize, "Invalid size: %lu %lu\n", SendSize, OrigSendSize);
NtClose(SocketHandle);}
START_TEST(windowsize){ TestTcp(); TestUdp();}