Commit 98d1dc31 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

include: Rename Wine-specific socket ioctls.

parent 21efebbd
......@@ -2341,7 +2341,7 @@ SOCKET WINAPI WS_accept( SOCKET s, struct WS_sockaddr *addr, int *len )
if (!(sync_event = CreateEventW( NULL, TRUE, FALSE, NULL ))) return INVALID_SOCKET;
status = NtDeviceIoControlFile( SOCKET2HANDLE(s), (HANDLE)((ULONG_PTR)sync_event | 0), NULL, NULL, &io,
IOCTL_AFD_ACCEPT, NULL, 0, &accept_handle, sizeof(accept_handle) );
IOCTL_AFD_WINE_ACCEPT, NULL, 0, &accept_handle, sizeof(accept_handle) );
if (status == STATUS_PENDING)
{
if (WaitForSingleObject( sync_event, INFINITE ) == WAIT_FAILED)
......@@ -2416,7 +2416,7 @@ static BOOL WINAPI WS2_AcceptEx( SOCKET listener, SOCKET acceptor, void *dest, D
}
status = NtDeviceIoControlFile( SOCKET2HANDLE(listener), overlapped->hEvent, NULL, cvalue,
(IO_STATUS_BLOCK *)overlapped, IOCTL_AFD_ACCEPT_INTO, &params, sizeof(params),
(IO_STATUS_BLOCK *)overlapped, IOCTL_AFD_WINE_ACCEPT_INTO, &params, sizeof(params),
dest, recv_len + local_len + remote_len );
if (ret_len) *ret_len = overlapped->InternalHigh;
......@@ -4507,7 +4507,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
SetLastError(WSAEOPNOTSUPP);
return SOCKET_ERROR;
case WS_SIO_ADDRESS_LIST_CHANGE:
code = IOCTL_AFD_ADDRESS_LIST_CHANGE;
code = IOCTL_AFD_WINE_ADDRESS_LIST_CHANGE;
status = WSAEOPNOTSUPP;
break;
default:
......@@ -5921,7 +5921,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
create_params.protocol = protocol;
create_params.flags = flags & ~(WSA_FLAG_NO_HANDLE_INHERIT | WSA_FLAG_OVERLAPPED);
if ((status = NtDeviceIoControlFile(handle, NULL, NULL, NULL, &io,
IOCTL_AFD_CREATE, &create_params, sizeof(create_params), NULL, 0)))
IOCTL_AFD_WINE_CREATE, &create_params, sizeof(create_params), NULL, 0)))
{
WARN("Failed to initialize socket, status %#x.\n", status);
err = RtlNtStatusToDosError( status );
......
......@@ -24,11 +24,11 @@
#include <winioctl.h>
#include "wine/server_protocol.h"
#define IOCTL_AFD_CREATE CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_ACCEPT CTL_CODE(FILE_DEVICE_NETWORK, 201, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_ACCEPT_INTO CTL_CODE(FILE_DEVICE_NETWORK, 202, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_WINE_CREATE CTL_CODE(FILE_DEVICE_NETWORK, 200, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_WINE_ACCEPT CTL_CODE(FILE_DEVICE_NETWORK, 201, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_WINE_ACCEPT_INTO CTL_CODE(FILE_DEVICE_NETWORK, 202, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_AFD_ADDRESS_LIST_CHANGE CTL_CODE(FILE_DEVICE_NETWORK, 323, METHOD_BUFFERED, 0)
#define IOCTL_AFD_WINE_ADDRESS_LIST_CHANGE CTL_CODE(FILE_DEVICE_NETWORK, 323, METHOD_BUFFERED, 0)
struct afd_create_params
{
......
......@@ -1357,11 +1357,11 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
assert( sock->obj.ops == &sock_ops );
if (code != IOCTL_AFD_CREATE && get_unix_fd( fd ) < 0) return 0;
if (code != IOCTL_AFD_WINE_CREATE && get_unix_fd( fd ) < 0) return 0;
switch(code)
{
case IOCTL_AFD_CREATE:
case IOCTL_AFD_WINE_CREATE:
{
const struct afd_create_params *params = get_req_data();
......@@ -1374,7 +1374,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 0;
}
case IOCTL_AFD_ACCEPT:
case IOCTL_AFD_WINE_ACCEPT:
{
struct sock *acceptsock;
obj_handle_t handle;
......@@ -1409,7 +1409,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 0;
}
case IOCTL_AFD_ACCEPT_INTO:
case IOCTL_AFD_WINE_ACCEPT_INTO:
{
static const int access = FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES | FILE_READ_DATA;
const struct afd_accept_into_params *params = get_req_data();
......@@ -1459,7 +1459,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return 1;
}
case IOCTL_AFD_ADDRESS_LIST_CHANGE:
case IOCTL_AFD_WINE_ADDRESS_LIST_CHANGE:
if ((sock->state & FD_WINE_NONBLOCKING) && async_is_blocking( async ))
{
set_error( STATUS_DEVICE_NOT_READY );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment