mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
ntdll: Introduce IOCTL_AFD_WINE_SIOCATMARK.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
800a42b90b
commit
27609da351
2 changed files with 40 additions and 0 deletions
|
@ -1316,6 +1316,45 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
|
|||
break;
|
||||
}
|
||||
|
||||
case IOCTL_AFD_WINE_SIOCATMARK:
|
||||
{
|
||||
int value, ret;
|
||||
socklen_t len = sizeof(value);
|
||||
|
||||
if ((status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL )))
|
||||
return status;
|
||||
|
||||
if (out_size < sizeof(int))
|
||||
{
|
||||
status = STATUS_BUFFER_TOO_SMALL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (getsockopt( fd, SOL_SOCKET, SO_OOBINLINE, &value, &len ) < 0)
|
||||
{
|
||||
status = sock_errno_to_status( errno );
|
||||
break;
|
||||
}
|
||||
|
||||
if (value)
|
||||
{
|
||||
*(int *)out_buffer = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((ret = ioctl( fd, SIOCATMARK, &value )) < 0)
|
||||
{
|
||||
status = sock_errno_to_status( errno );
|
||||
break;
|
||||
}
|
||||
/* windows is reversed with respect to unix */
|
||||
*(int *)out_buffer = !value;
|
||||
}
|
||||
status = STATUS_SUCCESS;
|
||||
complete_async( handle, event, apc, apc_user, io, status, 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
if ((code >> 16) == FILE_DEVICE_NETWORK)
|
||||
|
|
|
@ -99,6 +99,7 @@ struct afd_poll_params
|
|||
#define IOCTL_AFD_WINE_FIONBIO CTL_CODE(FILE_DEVICE_NETWORK, 209, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_WINE_COMPLETE_ASYNC CTL_CODE(FILE_DEVICE_NETWORK, 210, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_WINE_FIONREAD CTL_CODE(FILE_DEVICE_NETWORK, 211, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
#define IOCTL_AFD_WINE_SIOCATMARK CTL_CODE(FILE_DEVICE_NETWORK, 212, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||
|
||||
struct afd_create_params
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue