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
8b7ec05b
Commit
8b7ec05b
authored
Jul 18, 2010
by
Howell Tam
Committed by
Alexandre Julliard
Jul 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Wrapped WSASendTo/WSARecvFrom with a different function name.
parent
2c1e8dec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
21 deletions
+63
-21
socket.c
dlls/ws2_32/socket.c
+63
-21
No files found.
dlls/ws2_32/socket.c
View file @
8b7ec05b
...
...
@@ -169,6 +169,24 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
winsock
);
WINE_DECLARE_DEBUG_CHANNEL
(
winediag
);
/*
* The actual definition of WSASendTo/WSARecvFrom, wrapped in a different
* function name, so that internal calls from ws2_32 itself will not trigger
* programs like Garena, which hooks WSASendTo/WSARecvFrom calls.
*/
static
int
WS2_sendto
(
SOCKET
s
,
LPWSABUF
lpBuffers
,
DWORD
dwBufferCount
,
LPDWORD
lpNumberOfBytesSent
,
DWORD
dwFlags
,
const
struct
WS_sockaddr
*
to
,
int
tolen
,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
);
static
int
WS2_recvfrom
(
SOCKET
s
,
LPWSABUF
lpBuffers
,
DWORD
dwBufferCount
,
LPDWORD
lpNumberOfBytesRecvd
,
LPDWORD
lpFlags
,
struct
WS_sockaddr
*
lpFrom
,
LPINT
lpFromlen
,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
);
/* critical section to protect some non-reentrant net function */
static
CRITICAL_SECTION
csWSgetXXXbyYYY
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
...
...
@@ -2922,7 +2940,7 @@ int WINAPI WS_recv(SOCKET s, char *buf, int len, int flags)
wsabuf
.
len
=
len
;
wsabuf
.
buf
=
buf
;
if
(
WS
ARecvF
rom
(
s
,
&
wsabuf
,
1
,
&
n
,
&
dwFlags
,
NULL
,
NULL
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
if
(
WS
2_recvf
rom
(
s
,
&
wsabuf
,
1
,
&
n
,
&
dwFlags
,
NULL
,
NULL
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
return
SOCKET_ERROR
;
else
return
n
;
...
...
@@ -2940,7 +2958,7 @@ int WINAPI WS_recvfrom(SOCKET s, char *buf, INT len, int flags,
wsabuf
.
len
=
len
;
wsabuf
.
buf
=
buf
;
if
(
WS
ARecvF
rom
(
s
,
&
wsabuf
,
1
,
&
n
,
&
dwFlags
,
from
,
fromlen
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
if
(
WS
2_recvf
rom
(
s
,
&
wsabuf
,
1
,
&
n
,
&
dwFlags
,
from
,
fromlen
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
return
SOCKET_ERROR
;
else
return
n
;
...
...
@@ -3127,7 +3145,7 @@ int WINAPI WS_send(SOCKET s, const char *buf, int len, int flags)
wsabuf
.
len
=
len
;
wsabuf
.
buf
=
(
char
*
)
buf
;
if
(
WS
ASendT
o
(
s
,
&
wsabuf
,
1
,
&
n
,
flags
,
NULL
,
0
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
if
(
WS
2_sendt
o
(
s
,
&
wsabuf
,
1
,
&
n
,
flags
,
NULL
,
0
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
return
SOCKET_ERROR
;
else
return
n
;
...
...
@@ -3141,7 +3159,7 @@ INT WINAPI WSASend( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
)
{
return
WS
ASendT
o
(
s
,
lpBuffers
,
dwBufferCount
,
lpNumberOfBytesSent
,
dwFlags
,
return
WS
2_sendt
o
(
s
,
lpBuffers
,
dwBufferCount
,
lpNumberOfBytesSent
,
dwFlags
,
NULL
,
0
,
lpOverlapped
,
lpCompletionRoutine
);
}
...
...
@@ -3154,14 +3172,11 @@ INT WINAPI WSASendDisconnect( SOCKET s, LPWSABUF lpBuffers )
}
/***********************************************************************
* WSASendTo (WS2_32.74)
*/
INT
WINAPI
WSASendTo
(
SOCKET
s
,
LPWSABUF
lpBuffers
,
DWORD
dwBufferCount
,
LPDWORD
lpNumberOfBytesSent
,
DWORD
dwFlags
,
const
struct
WS_sockaddr
*
to
,
int
tolen
,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
)
static
int
WS2_sendto
(
SOCKET
s
,
LPWSABUF
lpBuffers
,
DWORD
dwBufferCount
,
LPDWORD
lpNumberOfBytesSent
,
DWORD
dwFlags
,
const
struct
WS_sockaddr
*
to
,
int
tolen
,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
)
{
unsigned
int
i
,
options
;
int
n
,
fd
,
err
;
...
...
@@ -3337,6 +3352,21 @@ error:
}
/***********************************************************************
* WSASendTo (WS2_32.74)
*/
INT
WINAPI
WSASendTo
(
SOCKET
s
,
LPWSABUF
lpBuffers
,
DWORD
dwBufferCount
,
LPDWORD
lpNumberOfBytesSent
,
DWORD
dwFlags
,
const
struct
WS_sockaddr
*
to
,
int
tolen
,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
)
{
return
WS2_sendto
(
s
,
lpBuffers
,
dwBufferCount
,
lpNumberOfBytesSent
,
dwFlags
,
to
,
tolen
,
lpOverlapped
,
lpCompletionRoutine
);
}
/***********************************************************************
* sendto (WS2_32.20)
*/
int
WINAPI
WS_sendto
(
SOCKET
s
,
const
char
*
buf
,
int
len
,
int
flags
,
...
...
@@ -3348,7 +3378,7 @@ int WINAPI WS_sendto(SOCKET s, const char *buf, int len, int flags,
wsabuf
.
len
=
len
;
wsabuf
.
buf
=
(
char
*
)
buf
;
if
(
WS
ASendT
o
(
s
,
&
wsabuf
,
1
,
&
n
,
flags
,
to
,
tolen
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
if
(
WS
2_sendt
o
(
s
,
&
wsabuf
,
1
,
&
n
,
flags
,
to
,
tolen
,
NULL
,
NULL
)
==
SOCKET_ERROR
)
return
SOCKET_ERROR
;
else
return
n
;
...
...
@@ -4932,17 +4962,14 @@ int WINAPI WSARecv(SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
)
{
return
WS
ARecvF
rom
(
s
,
lpBuffers
,
dwBufferCount
,
NumberOfBytesReceived
,
lpFlags
,
return
WS
2_recvf
rom
(
s
,
lpBuffers
,
dwBufferCount
,
NumberOfBytesReceived
,
lpFlags
,
NULL
,
NULL
,
lpOverlapped
,
lpCompletionRoutine
);
}
/***********************************************************************
* WSARecvFrom (WS2_32.69)
*/
INT
WINAPI
WSARecvFrom
(
SOCKET
s
,
LPWSABUF
lpBuffers
,
DWORD
dwBufferCount
,
LPDWORD
lpNumberOfBytesRecvd
,
LPDWORD
lpFlags
,
struct
WS_sockaddr
*
lpFrom
,
LPINT
lpFromlen
,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
)
static
int
WS2_recvfrom
(
SOCKET
s
,
LPWSABUF
lpBuffers
,
DWORD
dwBufferCount
,
LPDWORD
lpNumberOfBytesRecvd
,
LPDWORD
lpFlags
,
struct
WS_sockaddr
*
lpFrom
,
LPINT
lpFromlen
,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
)
{
unsigned
int
i
,
options
;
...
...
@@ -5096,6 +5123,21 @@ error:
}
/***********************************************************************
* WSARecvFrom (WS2_32.69)
*/
INT
WINAPI
WSARecvFrom
(
SOCKET
s
,
LPWSABUF
lpBuffers
,
DWORD
dwBufferCount
,
LPDWORD
lpNumberOfBytesRecvd
,
LPDWORD
lpFlags
,
struct
WS_sockaddr
*
lpFrom
,
LPINT
lpFromlen
,
LPWSAOVERLAPPED
lpOverlapped
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
lpCompletionRoutine
)
{
return
WS2_recvfrom
(
s
,
lpBuffers
,
dwBufferCount
,
lpNumberOfBytesRecvd
,
lpFlags
,
lpFrom
,
lpFromlen
,
lpOverlapped
,
lpCompletionRoutine
);
}
/***********************************************************************
* WSCInstallProvider (WS2_32.88)
*/
INT
WINAPI
WSCInstallProvider
(
const
LPGUID
lpProviderId
,
...
...
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