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
774c88a2
Commit
774c88a2
authored
Feb 28, 2004
by
Patrik Stridvall
Committed by
Alexandre Julliard
Feb 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More stubs and better headers for mswsock.dll.
parent
88e1f4e9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
262 additions
and
53 deletions
+262
-53
mswsock.c
dlls/mswsock/mswsock.c
+88
-39
mswsock.spec
dlls/mswsock/mswsock.spec
+30
-0
async.c
dlls/winsock/async.c
+1
-0
socket.c
dlls/winsock/socket.c
+1
-0
mswsock.h
include/mswsock.h
+142
-8
winsock.h
include/winsock.h
+0
-6
No files found.
dlls/mswsock/mswsock.c
View file @
774c88a2
...
...
@@ -18,70 +18,119 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winsock2.h"
#include "mswsock.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mswsock
);
/***********************************************************************
*******
*
This structure is used with the TransmitFile() function.
/***********************************************************************
*
AcceptEx (MSWSOCK.@)
*
*/
typedef
struct
_TRANSMIT_FILE_BUFFERS
{
PVOID
Head
;
DWORD
HeadLength
;
PVOID
Tail
;
DWORD
TailLength
;
}
TRANSMIT_FILE_BUFFERS
;
typedef
TRANSMIT_FILE_BUFFERS
*
LPTRANSMIT_FILE_BUFFERS
;
/******************************************************************************
* TransmitFile (MSWSOCK.@)
*
* This function is used to transmit a file over socket.
* This function is used to accept a new connection, get the local and remote
* address, and receive the initial block of data sent by the client.
*
* TODO
* This function is currently implemented as a stub.
*/
void
WINAPI
TransmitFile
(
SOCKET
s
,
HANDLE
f
,
DWORD
size
,
DWORD
numpersend
,
LPOVERLAPPED
overlapped
,
LPTRANSMIT_FILE_BUFFERS
trans
,
DWORD
flags
)
BOOL
WINAPI
AcceptEx
(
SOCKET
sListenSocket
,
/* [in] Descriptor identifying a socket that
has already been called with the listen
function */
SOCKET
sAcceptSocket
,
/* [in] Descriptor identifying a socket on
which to accept an incoming connection */
PVOID
lpOutputBuffer
,
/* [in] Pointer to a buffer */
DWORD
dwReceiveDataLength
,
/* [in] Number of bytes in lpOutputBuffer
that will be used for actual receive data
at the beginning of the buffer */
DWORD
dwLocalAddressLength
,
/* [in] Number of bytes reserved for the
local address information */
DWORD
dwRemoteAddressLength
,
/* [in] Number of bytes reserved for the
remote address information */
LPDWORD
lpdwBytesReceived
,
/* [out] Pointer to a DWORD that receives
the count of bytes received */
LPOVERLAPPED
lpOverlapped
)
/* [in] Specify in order to achieve an
overlapped (asynchronous) I/O
operation */
{
FIXME
(
"not implemented
\n
"
);
FIXME
(
"not implemented
\n
"
);
return
FALSE
;
}
/***********************************************************************
* GetAcceptExSockaddrs (MSWSOCK.@)
*/
VOID
WINAPI
GetAcceptExSockaddrs
(
PVOID
lpOutputBuffer
,
/* [in] Pointer to a buffer */
DWORD
dwReceiveDataLength
,
/* [in] Number of bytes in the buffer used
for receiving the first data */
DWORD
dwLocalAddressLength
,
/* [in] Number of bytes reserved for the
local address information */
DWORD
dwRemoteAddressLength
,
/* [in] Number of bytes reserved for the
remote address information */
struct
sockaddr
**
LocalSockaddr
,
/* [out] Pointer to the sockaddr
structure that receives the local
address of the connection */
LPINT
LocalSockaddrLength
,
/* [out] Size in bytes of the local
address */
struct
sockaddr
**
RemoteSockaddr
,
/* [out] Pointer to the sockaddr
structure that receives the remote
address of the connection */
LPINT
RemoteSockaddrLength
)
/* [out] Size in bytes of the remote address */
{
FIXME
(
"not implemented
\n
"
);
}
/***********************************************************************
*******
*
AcceptEx
(MSWSOCK.@)
/***********************************************************************
*
TransmitFile
(MSWSOCK.@)
*
* This function is used to accept a new connection, get the local and remote
* address, and receive the initial block of data sent by the client.
* This function is used to transmit a file over socket.
*
* TODO
* This function is currently implemented as a stub.
*/
void
WINAPI
AcceptEx
(
SOCKET
listener
,
SOCKET
acceptor
,
PVOID
oput
,
DWORD
recvlen
,
DWORD
locaddrlen
,
DWORD
remaddrlen
,
LPDWORD
bytesrecv
,
LPOVERLAPPED
overlapped
)
BOOL
WINAPI
TransmitFile
(
SOCKET
hSocket
,
/* [in] Handle to a connected socket */
HANDLE
hFile
,
/* [in] Handle to the open file that should be
transmited */
DWORD
nNumberOfBytesToWrite
,
/* [in] Number of file bytes to
transmit */
DWORD
nNumberOfBytesPerSend
,
/* [in] Size in bytes of each block of
data sent in each send operation */
LPOVERLAPPED
lpOverlapped
,
/* [in] Specify in order to achieve an
overlapped (asynchronous) I/O
operation */
LPTRANSMIT_FILE_BUFFERS
lpTransmitBuffers
,
/* [in] Contains pointers to data to send before and after
the file data is sent */
DWORD
dwFlags
)
/* [in] Flags */
{
FIXME
(
"not implemented
\n
"
);
return
FALSE
;
}
/***********************************************************************
* WSARecvEx (MSWSOCK.@)
*/
INT
WINAPI
WSARecvEx
(
SOCKET
s
,
/* [in] Descriptor identifying a connected socket */
char
*
buf
,
/* [out] Buffer for the incoming data */
INT
len
,
/* [in] Length of buf, in bytes */
INT
*
flags
)
/* [in/out] Indicator specifying whether the message is
fully or partially received for datagram sockets */
{
FIXME
(
"not implemented
\n
"
);
FIXME
(
"not implemented
\n
"
);
return
SOCKET_ERROR
;
}
dlls/mswsock/mswsock.spec
View file @
774c88a2
@ stdcall AcceptEx(long long ptr long long long ptr ptr)
@ stub EnumProtocolsA
@ stub EnumProtocolsW
@ stub GetAcceptExSockaddrs
@ stub GetAddressByNameA
@ stub GetAddressByNameW
@ stub GetNameByTypeA
@ stub GetNameByTypeW
@ stub GetServiceA
@ stub GetServiceW
@ stub GetTypeByNameA
@ stub GetTypeByNameW
@ stub MigrateWinsockConfiguration
@ stub NPLoadNameSpaces
@ stub NSPStartup
@ stub ServiceMain
@ stub SetServiceA
@ stub SetServiceW
@ stub StartWsdpService
@ stub StopWsdpService
@ stub SvchostPushServiceGlobals
@ stdcall TransmitFile(long long long long ptr ptr long)
@ stub WSARecvEx
@ stub WSPStartup
@ stub dn_expand
@ stub getnetbyname
@ stub inet_network
@ stub rcmd
@ stub rexec
@ stub rresvport
@ stub s_perror
@ stub sethostname
dlls/winsock/async.c
View file @
774c88a2
...
...
@@ -104,6 +104,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "winsock2.h"
#include "mswsock.h"
#include "ws2spi.h"
#include "wownt32.h"
#include "wine/winsock16.h"
...
...
dlls/winsock/socket.c
View file @
774c88a2
...
...
@@ -119,6 +119,7 @@
#include "winuser.h"
#include "winerror.h"
#include "winsock2.h"
#include "mswsock.h"
#include "ws2tcpip.h"
#include "wsipx.h"
#include "winnt.h"
...
...
include/mswsock.h
View file @
774c88a2
...
...
@@ -18,26 +18,160 @@
#ifndef _MSWSOCK_
#define _MSWSOCK_
#ifdef __cplusplus
extern
"C"
{
#endif
/* defined(__cplusplus) */
#ifndef USE_WS_PREFIX
#define SO_CONNDATA 0x7000
#define SO_CONNOPT 0x7001
#define SO_DISCDATA 0x7002
#define SO_DISCOPT 0x7003
#define SO_CONNDATALEN 0x7004
#define SO_CONNOPTLEN 0x7005
#define SO_DISCDATALEN 0x7006
#define SO_DISCOPTLEN 0x7007
#else
#define WS_SO_CONNDATA 0x7000
#define WS_SO_CONNOPT 0x7001
#define WS_SO_DISCDATA 0x7002
#define WS_SO_DISCOPT 0x7003
#define WS_SO_CONNDATALEN 0x7004
#define WS_SO_CONNOPTLEN 0x7005
#define WS_SO_DISCDATALEN 0x7006
#define WS_SO_DISCOPTLEN 0x7007
#endif
#ifndef USE_WS_PREFIX
#define SO_OPENTYPE 0x7008
#else
#define WS_SO_OPENTYPE 0x7008
#endif
#
define SO_OPENTYPE 0x7008
#
ifndef USE_WS_PREFIX
#define SO_SYNCHRONOUS_ALERT 0x10
#define SO_SYNCHRONOUS_NONALERT 0x20
#else
#define WS_SO_OPENTYPE 0x7008
#define WS_SO_SYNCHRONOUS_ALERT 0x10
#define WS_SO_SYNCHRONOUS_NONALERT 0x20
#endif
#ifndef USE_WS_PREFIX
#define SO_MAXDG 0x7009
#define SO_MAXPATHDG 0x700A
#define SO_UPDATE_ACCEPT_CONTEXT 0x700B
#define SO_CONNECT_TIME 0x700C
#define SO_UPDATE_CONNECT_CONTEXT 0x7010
#else
#define WS_SO_MAXDG 0x7009
#define WS_SO_MAXPATHDG 0x700A
#define WS_SO_UPDATE_ACCEPT_CONTEXT 0x700B
#define WS_SO_CONNECT_TIME 0x700C
#define WS_SO_UPDATE_CONNECT_CONTEXT 0x7010
#endif
#ifndef USE_WS_PREFIX
#define TCP_BSDURGENT 0x7000
#else
#define WS_TCP_BSDURGENT 0x7000
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
/* defined(__cplusplus) */
#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR,12)
#define DE_REUSE_SOCKET TF_REUSE_SOCKET
#ifndef USE_WS_PREFIX
#define MSG_TRUNC 0x0100
#define MSG_CTRUNC 0x0200
#define MSG_BCAST 0x0400
#define MSG_MCAST 0x0800
#else
#define WS_MSG_TRUNC 0x0100
#define WS_MSG_CTRUNC 0x0200
#define WS_MSG_BCAST 0x0400
#define WS_MSG_MCAST 0x0800
#endif
#define TF_DISCONNECT 0x01
#define TF_REUSE_SOCKET 0x02
#define TF_WRITE_BEHIND 0x04
#define TF_USE_DEFAULT_WORKER 0x00
#define TF_USE_SYSTEM_THREAD 0x10
#define TF_USE_KERNEL_APC 0x20
#define TP_DISCONNECT TF_DISCONNECT
#define TP_REUSE_SOCKET TF_REUSE_SOCKET
#define TP_USE_DEFAULT_WORKER TF_USE_DEFAULT_WORKER
#define TP_USE_SYSTEM_THREAD TF_USE_SYSTEM_THREAD
#define TP_USE_KERNEL_APC TF_USE_KERNEL_APC
#define TP_ELEMENT_MEMORY 1
#define TP_ELEMENT_FILE 2
#define TP_ELEMENT_EOP 4
#define WSAID_ACCEPTEX \
{0xb5367df1,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
#define WSAID_CONNECTEX \
{0x25a207b9,0xddf3,0x4660,{0x8e,0xe9,0x76,0xe5,0x8c,0x74,0x06,0x3e}}
#define WSAID_DISCONNECTEX \
{0x7fda2e11,0x8630,0x436f,{0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}}
#define WSAID_GETACCEPTEXSOCKADDRS \
{0xb5367df2,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
#define WSAID_TRANSMITFILE \
{0xb5367df0,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
#define WSAID_TRANSMITPACKETS \
{0xd9689da0,0x1f90,0x11d3,{0x99,0x71,0x00,0xc0,0x4f,0x68,0xc8,0x76}}
#define WSAID_WSARECVMSG \
{0xf689d7c8,0x6f1f,0x436b,{0x8a,0x53,0xe5,0x4f,0xe3,0x51,0xc3,0x22}}
typedef
struct
_TRANSMIT_FILE_BUFFERS
{
LPVOID
Head
;
DWORD
HeadLength
;
LPVOID
Tail
;
DWORD
TailLength
;
}
TRANSMIT_FILE_BUFFERS
,
*
PTRANSMIT_FILE_BUFFERS
,
*
LPTRANSMIT_FILE_BUFFERS
;
typedef
struct
_TRANSMIT_PACKETS_ELEMENT
{
ULONG
dwElFlags
;
ULONG
cLength
;
union
{
struct
{
LARGE_INTEGER
nFileOffset
;
HANDLE
hFile
;
}
DUMMYSTRUCTNAME
;
PVOID
pBuffer
;
}
DUMMYUNIONNAME
;
}
TRANSMIT_PACKETS_ELEMENT
,
*
PTRANSMIT_PACKETS_ELEMENT
,
*
LPTRANSMIT_PACKETS_ELEMENT
;
typedef
struct
_WSAMSG
{
LPSOCKADDR
name
;
INT
namelen
;
LPWSABUF
lpBuffers
;
DWORD
dwBufferCount
;
WSABUF
Control
;
DWORD
dwFlags
;
}
WSAMSG
,
*
PWSAMSG
,
*
LPWSAMSG
;
typedef
struct
_WSACMSGHDR
{
SIZE_T
cmsg_len
;
INT
cmsg_level
;
INT
cmsg_type
;
/* followed by UCHAR cmsg_data[] */
}
WSACMSGHDR
,
*
PWSACMSGHDR
,
*
LPWSACMSGHDR
;
typedef
BOOL
(
WINAPI
*
LPFN_ACCEPTEX
)(
SOCKET
,
SOCKET
,
PVOID
,
DWORD
,
DWORD
,
DWORD
,
LPDWORD
,
LPOVERLAPPED
);
typedef
BOOL
(
WINAPI
*
LPFN_CONNECTEX
)(
SOCKET
,
const
struct
sockaddr
*
,
int
,
PVOID
,
DWORD
,
LPDWORD
,
LPOVERLAPPED
);
typedef
BOOL
(
WINAPI
*
LPFN_DISCONNECTEX
)(
SOCKET
,
LPOVERLAPPED
,
DWORD
,
DWORD
);
typedef
VOID
(
WINAPI
*
LPFN_GETACCEPTEXSOCKADDRS
)(
PVOID
,
DWORD
,
DWORD
,
DWORD
,
struct
sockaddr
**
,
LPINT
,
struct
sockaddr
**
,
LPINT
);
typedef
BOOL
(
WINAPI
*
LPFN_TRANSMITFILE
)(
SOCKET
,
HANDLE
,
DWORD
,
DWORD
,
LPOVERLAPPED
,
LPTRANSMIT_FILE_BUFFERS
,
DWORD
);
typedef
BOOL
(
WINAPI
*
LPFN_TRANSMITPACKETS
)(
SOCKET
,
LPTRANSMIT_PACKETS_ELEMENT
,
DWORD
,
DWORD
,
LPOVERLAPPED
,
DWORD
);
typedef
INT
(
WINAPI
*
LPFN_WSARECVMSG
)(
SOCKET
,
LPWSAMSG
,
LPDWORD
,
LPWSAOVERLAPPED
,
LPWSAOVERLAPPED_COMPLETION_ROUTINE
);
int
WINAPI
WSARecvEx
(
SOCKET
,
char
*
,
int
,
int
*
);
BOOL
WINAPI
AcceptEx
(
SOCKET
,
SOCKET
,
PVOID
,
DWORD
,
DWORD
,
DWORD
,
LPDWORD
,
LPOVERLAPPED
);
VOID
WINAPI
GetAcceptExSockaddrs
(
PVOID
,
DWORD
,
DWORD
,
DWORD
,
struct
sockaddr
**
,
LPINT
,
struct
sockaddr
**
,
LPINT
);
BOOL
WINAPI
TransmitFile
(
SOCKET
,
HANDLE
,
DWORD
,
DWORD
,
LPOVERLAPPED
,
LPTRANSMIT_FILE_BUFFERS
,
DWORD
);
INT
WINAPI
WSARecvEx
(
SOCKET
,
char
*
,
INT
,
INT
*
);
#ifdef __cplusplus
}
...
...
include/winsock.h
View file @
774c88a2
...
...
@@ -990,12 +990,6 @@ int WINAPI WS(setsockopt)(SOCKET,int,int,const char*,int);
int
WINAPI
WS
(
shutdown
)(
SOCKET
,
int
);
SOCKET
WINAPI
WS
(
socket
)(
int
,
int
,
int
);
#if defined(__WINESRC__) || !defined(__WINE_WINSOCK2__)
/* Stuff specific to winsock.h */
#include <mswsock.h>
#endif
/* __WINE_WINSOCK2__ */
#endif
/* !defined(__WINE_WINSOCK2__) || WS_API_PROTOTYPES */
...
...
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