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
c58541e2
Commit
c58541e2
authored
Dec 08, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Implement WSAIoctl(SIO_KEEPALIVE_VALS).
Based on a patch by Philippe Rétornaz.
parent
40447e80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
0 deletions
+107
-0
socket.c
dlls/ws2_32/socket.c
+44
-0
Makefile.in
include/Makefile.in
+1
-0
mstcpip.h
include/mstcpip.h
+62
-0
No files found.
dlls/ws2_32/socket.c
View file @
c58541e2
...
...
@@ -132,6 +132,7 @@
#include "ws2tcpip.h"
#include "ws2spi.h"
#include "wsipx.h"
#include "mstcpip.h"
#include "winnt.h"
#include "iphlpapi.h"
#include "wine/server.h"
...
...
@@ -2317,6 +2318,49 @@ INT WINAPI WSAIoctl(SOCKET s,
WSASetLastError
(
WSAEOPNOTSUPP
);
return
SOCKET_ERROR
;
case
WS_SIO_KEEPALIVE_VALS
:
{
int
fd
;
struct
tcp_keepalive
*
k
=
lpvInBuffer
;
int
keepalive
=
k
->
onoff
?
1
:
0
;
int
keepidle
=
k
->
keepalivetime
/
1000
;
int
keepintvl
=
k
->
keepaliveinterval
/
1000
;
if
(
!
lpvInBuffer
)
{
WSASetLastError
(
WSAEINVAL
);
return
SOCKET_ERROR
;
}
TRACE
(
"onoff: %d, keepalivetime: %d, keepaliveinterval: %d
\n
"
,
keepalive
,
keepidle
,
keepintvl
);
fd
=
get_sock_fd
(
s
,
0
,
NULL
);
if
(
setsockopt
(
fd
,
SOL_SOCKET
,
SO_KEEPALIVE
,
(
void
*
)
&
keepalive
,
sizeof
(
int
))
==
-
1
)
{
release_sock_fd
(
s
,
fd
);
WSASetLastError
(
WSAEINVAL
);
return
SOCKET_ERROR
;
}
#if defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTVL)
if
(
setsockopt
(
fd
,
IPPROTO_TCP
,
TCP_KEEPIDLE
,
(
void
*
)
&
keepidle
,
sizeof
(
int
))
==
-
1
)
{
release_sock_fd
(
s
,
fd
);
WSASetLastError
(
WSAEINVAL
);
return
SOCKET_ERROR
;
}
if
(
setsockopt
(
fd
,
IPPROTO_TCP
,
TCP_KEEPINTVL
,
(
void
*
)
&
keepintvl
,
sizeof
(
int
))
==
-
1
)
{
release_sock_fd
(
s
,
fd
);
WSASetLastError
(
WSAEINVAL
);
return
SOCKET_ERROR
;
}
#else
FIXME
(
"ignoring keepalive interval and timeout
\n
"
);
#endif
release_sock_fd
(
s
,
fd
);
break
;
}
default:
FIXME
(
"unsupported WS_IOCTL cmd (%08x)
\n
"
,
dwIoControlCode
);
WSASetLastError
(
WSAEOPNOTSUPP
);
...
...
include/Makefile.in
View file @
c58541e2
...
...
@@ -287,6 +287,7 @@ SRCDIR_INCLUDES = \
msidefs.h
\
msiquery.h
\
mssip.h
\
mstcpip.h
\
msvcrt/conio.h
\
msvcrt/crtdbg.h
\
msvcrt/ctype.h
\
...
...
include/mstcpip.h
0 → 100644
View file @
c58541e2
/*
* Copyright 2008 Hans Leidekker for CodeWeavers.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
struct
tcp_keepalive
{
u_long
onoff
;
u_long
keepalivetime
;
u_long
keepaliveinterval
;
};
#ifndef USE_WS_PREFIX
#define SIO_RCVALL _WSAIOW(IOC_VENDOR, 1)
#define SIO_RCVALL_MCAST _WSAIOW(IOC_VENDOR, 2)
#define SIO_RCVALL_IGMPMCAST _WSAIOW(IOC_VENDOR, 3)
#define SIO_KEEPALIVE_VALS _WSAIOW(IOC_VENDOR, 4)
#define SIO_ABSORB_RTRALERT _WSAIOW(IOC_VENDOR, 5)
#define SIO_UCAST_IF _WSAIOW(IOC_VENDOR, 6)
#define SIO_LIMIT_BROADCASTS _WSAIOW(IOC_VENDOR, 7)
#define SIO_INDEX_BIND _WSAIOW(IOC_VENDOR, 8)
#define SIO_INDEX_MCASTIF _WSAIOW(IOC_VENDOR, 9)
#define SIO_INDEX_ADD_MCAST _WSAIOW(IOC_VENDOR, 10)
#define SIO_INDEX_DEL_MCAST _WSAIOW(IOC_VENDOR, 11)
#define RCVALL_OFF 0
#define RCVALL_ON 1
#define RCVALL_SOCKETLEVELONLY 2
#else
#define WS_SIO_RCVALL _WSAIOW(WS_IOC_VENDOR, 1)
#define WS_SIO_RCVALL_MCAST _WSAIOW(WS_IOC_VENDOR, 2)
#define WS_SIO_RCVALL_IGMPMCAST _WSAIOW(WS_IOC_VENDOR, 3)
#define WS_SIO_KEEPALIVE_VALS _WSAIOW(WS_IOC_VENDOR, 4)
#define WS_SIO_ABSORB_RTRALERT _WSAIOW(WS_IOC_VENDOR, 5)
#define WS_SIO_UCAST_IF _WSAIOW(WS_IOC_VENDOR, 6)
#define WS_SIO_LIMIT_BROADCASTS _WSAIOW(WS_IOC_VENDOR, 7)
#define WS_SIO_INDEX_BIND _WSAIOW(WS_IOC_VENDOR, 8)
#define WS_SIO_INDEX_MCASTIF _WSAIOW(WS_IOC_VENDOR, 9)
#define WS_SIO_INDEX_ADD_MCAST _WSAIOW(WS_IOC_VENDOR, 10)
#define WS_SIO_INDEX_DEL_MCAST _WSAIOW(WS_IOC_VENDOR, 11)
#define WS_RCVALL_OFF 0
#define WS_RCVALL_ON 1
#define WS_RCVALL_SOCKETLEVELONLY 2
#endif
/* USE_WS_PREFIX */
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