mirror of
https://github.com/reactos/reactos.git
synced 2024-11-06 22:52:46 +00:00
680d69d373
The initial tests in send.c validate correct behavior of send/sendto on disconnected sockets (CORE-9810), fixed in r68129. However, the helper functions are generic, so they can be used for additional tests against AFD. Because AFD's create packet structure changes between Windows versions, the functions check the OS version to determine the right layout. Tests succeed on Win2003 as well as Win10.
41 lines
922 B
C
41 lines
922 B
C
/*
|
|
* PROJECT: ReactOS API Tests
|
|
* LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+)
|
|
* PURPOSE: Utility function declarations for calling AFD
|
|
* COPYRIGHT: Copyright 2015 Thomas Faber (thomas.faber@reactos.org)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
NTSTATUS
|
|
AfdCreateSocket(
|
|
_Out_ PHANDLE SocketHandle,
|
|
_In_ int AddressFamily,
|
|
_In_ int SocketType,
|
|
_In_ int Protocol);
|
|
|
|
NTSTATUS
|
|
AfdBind(
|
|
_In_ HANDLE SocketHandle,
|
|
_In_ const struct sockaddr *Address,
|
|
_In_ ULONG AddressLength);
|
|
|
|
NTSTATUS
|
|
AfdConnect(
|
|
_In_ HANDLE SocketHandle,
|
|
_In_ const struct sockaddr *Address,
|
|
_In_ ULONG AddressLength);
|
|
|
|
NTSTATUS
|
|
AfdSend(
|
|
_In_ HANDLE SocketHandle,
|
|
_In_ const void *Buffer,
|
|
_In_ ULONG BufferLength);
|
|
|
|
NTSTATUS
|
|
AfdSendTo(
|
|
_In_ HANDLE SocketHandle,
|
|
_In_ const void *Buffer,
|
|
_In_ ULONG BufferLength,
|
|
_In_ const struct sockaddr *Address,
|
|
_In_ ULONG AddressLength);
|