Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a43c000a
Commit
a43c000a
authored
Jun 07, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Introduce IOCTL_WINE_AFD_KEEPALIVE_VALS.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2afb4356
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
socket.c
dlls/ntdll/unix/socket.c
+59
-0
afd.h
include/wine/afd.h
+1
-0
No files found.
dlls/ntdll/unix/socket.c
View file @
a43c000a
...
...
@@ -41,6 +41,9 @@
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif
#ifdef HAVE_NETIPX_IPX_H
# include <netipx/ipx.h>
...
...
@@ -72,6 +75,7 @@
#define USE_WS_PREFIX
#include "winsock2.h"
#include "mswsock.h"
#include "mstcpip.h"
#include "ws2tcpip.h"
#include "wsipx.h"
#include "af_irda.h"
...
...
@@ -79,6 +83,11 @@
#include "unix_private.h"
#if !defined(TCP_KEEPIDLE) && defined(TCP_KEEPALIVE)
/* TCP_KEEPALIVE is the Mac OS name for TCP_KEEPIDLE */
#define TCP_KEEPIDLE TCP_KEEPALIVE
#endif
WINE_DEFAULT_DEBUG_CHANNEL
(
winsock
);
#define FILE_USE_FILE_POINTER_POSITION ((LONGLONG)-2)
...
...
@@ -1448,6 +1457,56 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
break
;
}
case
IOCTL_AFD_WINE_KEEPALIVE_VALS
:
{
struct
tcp_keepalive
*
k
=
in_buffer
;
int
keepalive
;
if
(
!
in_buffer
||
in_size
<
sizeof
(
struct
tcp_keepalive
))
return
STATUS_BUFFER_TOO_SMALL
;
keepalive
=
!!
k
->
onoff
;
if
((
status
=
server_get_unix_fd
(
handle
,
0
,
&
fd
,
&
needs_close
,
NULL
,
NULL
)))
return
status
;
if
(
setsockopt
(
fd
,
SOL_SOCKET
,
SO_KEEPALIVE
,
&
keepalive
,
sizeof
(
int
)
)
<
0
)
{
status
=
STATUS_INVALID_PARAMETER
;
break
;
}
if
(
keepalive
)
{
#ifdef TCP_KEEPIDLE
int
idle
=
max
(
1
,
(
k
->
keepalivetime
+
500
)
/
1000
);
if
(
setsockopt
(
fd
,
IPPROTO_TCP
,
TCP_KEEPIDLE
,
&
idle
,
sizeof
(
int
)
)
<
0
)
{
status
=
STATUS_INVALID_PARAMETER
;
break
;
}
#else
FIXME
(
"ignoring keepalive timeout
\n
"
);
#endif
}
if
(
keepalive
)
{
#ifdef TCP_KEEPINTVL
int
interval
=
max
(
1
,
(
k
->
keepaliveinterval
+
500
)
/
1000
);
if
(
setsockopt
(
fd
,
IPPROTO_TCP
,
TCP_KEEPINTVL
,
&
interval
,
sizeof
(
int
)
)
<
0
)
status
=
STATUS_INVALID_PARAMETER
;
#else
FIXME
(
"ignoring keepalive interval
\n
"
);
#endif
}
status
=
STATUS_SUCCESS
;
complete_async
(
handle
,
event
,
apc
,
apc_user
,
io
,
status
,
0
);
break
;
}
default:
{
if
((
code
>>
16
)
==
FILE_DEVICE_NETWORK
)
...
...
include/wine/afd.h
View file @
a43c000a
...
...
@@ -101,6 +101,7 @@ struct afd_poll_params
#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)
#define IOCTL_AFD_WINE_GET_INTERFACE_LIST CTL_CODE(FILE_DEVICE_NETWORK, 213, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_AFD_WINE_KEEPALIVE_VALS CTL_CODE(FILE_DEVICE_NETWORK, 214, METHOD_BUFFERED, FILE_ANY_ACCESS)
struct
afd_create_params
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment