Commit Graph

166 Commits

Author SHA1 Message Date
Christoph Frick 983088a03b Force (WS_)SO_REUSEADDR before binding to a socket; ignore
(WS_)SO_DONTROUTE; Network games in Grand Prix Legends and Nascar 2002
are possible now.
2002-12-06 23:19:21 +00:00
Martin Wilck 4577875c4e Correct 2 bugs connected to asynchronous shutdown():
- Cannot call WSAGetOverlappedResult() because completion function
  destroys the overlapped structure.
- ws2_async_cleanup() called twice in case of failure.
2002-12-05 19:02:55 +00:00
Mike McCormack 947a74f40d Add stubs and declarations for WSAInstallServiceClassA/W. 2002-11-13 19:42:23 +00:00
Patrik Stridvall 9cec0a57b0 Fixed some issues found by winapi_check. 2002-11-11 19:55:33 +00:00
Alexandre Julliard 1e1313d54c Made the dll entry point default to DllMain and removed most of the
'init' spec file declarations.
2002-11-04 23:53:41 +00:00
Martin Wilck 9fc8b115c2 - Define SOCKET as UINT_PTR for Win64 (thanks to P. Stridvall).
- Make winsock compile without WINE_NO_STRICT.
2002-10-30 20:26:32 +00:00
Hagen Heiduck 97db7b45e4 Added WSASendDisconnect. 2002-10-29 21:27:20 +00:00
Alexandre Julliard 0ca051e555 Fixed wownt32.h to make it usable from inside Wine, and use it to
avoid some duplication of the handle conversion macros.
2002-10-17 16:43:42 +00:00
Greg Turner e6d8fdb081 - fixed up some semantic misunderstandings using the helpful advice of
Rein Klazes
- added SO_SNDTIMEO support
- added ifdef's for consistency with rest of socket.c
2002-09-26 03:21:54 +00:00
Greg Turner 96e3e928a2 Accept time_t argument in WS_setsockopt/WS_SO_RCVTIMEO; translate to
struct timeval for edification of setsockopt.
2002-09-25 00:15:43 +00:00
Martin Wilck 2b54cf91fc Fix the behavior of GetOverlappedResult() and WSAGetOverlappedResult()
with non-manual-reset (auto-reset) events in the OVERLAPPED structures.
2002-09-12 17:56:30 +00:00
Michael Stefaniuc e149b37f3a Finish the conversion of HWND to a void*. 2002-09-06 20:40:42 +00:00
Martin Wilck 9dccb29447 WS2_register_async_shutdown(): Try immediate completion, in case an
app never waits for anything.
WS_accept(): Avoid crash if addr parameter is NULL.
2002-09-06 19:35:45 +00:00
Martin Wilck c01cb754c3 Fixed typo in check_buffer_se(). 2002-09-06 18:35:04 +00:00
Rein Klazes 3ad35f8a66 In WSAStartup() don't touch the lpVendorInfo field of the WSADATA
structure.
2002-08-29 01:48:55 +00:00
Patrik Stridvall d016f819f1 Added include protection for unistd.h and sys/time.h. 2002-08-17 00:43:16 +00:00
Alexandre Julliard cd6b50e732 Moved the #ifdefs for the getnetby* etc. functions directly into the
winsock implementation to avoid having to redefine the data structures
in port.h.
2002-07-31 23:20:47 +00:00
Gregg Mattinson bac71315d2 Removed non-static structure initializers. 2002-07-03 21:06:58 +00:00
Alexandre Julliard 083bf18019 Authors: Peter Hunnisett <peter@transgaming.com>, Ove Kaaven <ovek@transgaming.com>
- check for sockaddr being NULL.
- hackish implementation of WSADuplicateSocket.
2002-06-13 19:09:55 +00:00
Vincent Béron 9a62491660 Removed trailing whitespace. 2002-05-31 23:06:46 +00:00
Patrik Stridvall 5e6943f421 Fixed some issues found by winapi_check. 2002-05-22 01:55:18 +00:00
Alexandre Julliard d8d313d110 Fixed struct msghdr access for platforms that have msg_accrights
(reported by Warren Baird).
2002-05-16 23:12:03 +00:00
Martin Wilck cf518bcd6d SO_OPENTYPE has to be a per-thread setting. 2002-04-27 01:05:35 +00:00
Martin Wilck ff1f320ac8 Fixed some bugs in my recently submitted patch series. 2002-04-26 18:31:19 +00:00
Martin Wilck af16c98f71 Implemented overlapped WSARecvFrom(), WSASendTo(), and
WSAGetOverlappedResult().
Fixed shutdown() to work correctly for overlapped sockets (do not
actually do a shutdown() system call as long as there are pending
overlapped requests).
Also added correct error reporting when trying to read or write on a
shut down connection, also for ReadFile()/WriteFile() calls.
2002-04-25 21:34:24 +00:00
Martin Wilck d15bf1c0fe Fixed handling of deferred connections in WSAAccept(). 2002-04-23 22:03:42 +00:00
Martin Wilck aba594712b _get_sock_fd_type: New function, retrieve fd type and flags like
FILE_GetUnixHandleType().
WSASendTo/WSARecvFrom: Use  _get_sock_fd_type().
2002-04-17 16:46:49 +00:00
Stefan Leichter f25efa0660 Compile fixes for gcc 2.7.2.3. 2002-04-11 17:34:46 +00:00
Gerald Pfeifer 37e87f7408 Also #include <sys/uio.h>. 2002-04-08 20:14:58 +00:00
Martin Wilck 58854430fa Make the recv() and send() family of functions use WSARecvFrom() and
WSASendTo().
2002-04-05 21:22:55 +00:00
Mike McCormack ee77955a6c Add stub for WSAEnumProtocols(A/W) functions. 2002-04-03 20:04:50 +00:00
Marcus Meissner 5a82fa1902 Added missing header. 2002-03-25 20:51:48 +00:00
Alexandre Julliard 81f2a7307b Send message for WSAAsyncSelect sockets directly from the server,
instead of using the service thread. Finished separation of ws2_32.
2002-03-23 20:43:52 +00:00
Alexandre Julliard 0799c1a780 Added LGPL standard comment, and copyright notices where necessary.
Global replacement of debugtools.h by wine/debug.h.
2002-03-09 23:29:33 +00:00
Lawson Whitney f6a3a52180 Protect against NULL wsaddrlen in ws_sockaddr_alloc. 2002-02-14 19:20:12 +00:00
Rein Klazes e2a55be486 Correct optlen when WS_setsockopt is called with SO_LINGER. 2002-01-29 17:06:11 +00:00
Francois Gouget f885024344 Rename s_addr to src_addr to avoid a conflict on Solaris.
Rename d_addr to dst_addr for symmetry.
2002-01-29 02:55:24 +00:00
Francois Gouget e6ebf42c2b Fix a couple of warnings and a typo. 2002-01-21 17:59:38 +00:00
Patrik Stridvall 9ff202e65c Fixed some issues found by winapi_check. 2002-01-18 18:57:43 +00:00
Michael C. Maggio f3b01aa790 Code used AF_IPX in some places where it should have used WS_AF_IPX. 2002-01-15 20:26:28 +00:00
Daniel Walker 40491ecc62 Implemented WSAAccept(). 2002-01-14 18:33:44 +00:00
Francois Gouget 8549821b7f Fix previous patch: the ws_sockaddr_u2ws return value was wrong.
Make ws_sockaddr_{ws2u,u2ws} static.
2002-01-10 18:18:43 +00:00
Martin Wilck 65b7e64c1f Moved the functionality of WS_socket() to WSASocketA().
Made WSASocketA() account for WSA_FLAG_OVERLAPPED.
2002-01-09 21:17:16 +00:00
Paul Rupe 06ffc1aba3 Return length of WS_sockaddr structure in ws_sockaddr_u2ws. 2002-01-09 20:29:17 +00:00
Alexandre Julliard 851297919b Use MapLS/UnMapLS instead of SEGPTR_* macros. 2001-12-24 20:30:24 +00:00
Paul Rupe 99ed342df0 Very simple support for SO_OPENTYPE in getsockopt and setsockopt. 2001-12-14 22:48:38 +00:00
Paul Rupe 8111f043ff Fixed WS_getpeername parameter in WS_accept.
Changed order of event processing in WINSOCK_DoAsyncEvent.
2001-11-30 23:12:13 +00:00
Alexandre Julliard 9caa71eef4 Redesign of the server communication protocol to allow arbitrary sized
data to be exchanged.
Split request and reply structures to make backwards compatibility
easier.
Moved many console functions to dlls/kernel, added code page support,
changed a few requests to behave properly with the new protocol.
2001-11-30 18:46:42 +00:00
Francois Gouget 272023190e Make winsock.h and winsock2.h independent from the Unix headers.
Make them compatible with both the Unix C headers and the MSVCRT
headers.
Ensure compatibility with the Unix headers via the USE_WS_PREFIX
macro.
Add WINE_NOWINSOCK: prevents winsock.h from being included from
windows.h when defined.
Add ws2tcpip.h, move definitions to the right header.
2001-11-14 21:26:23 +00:00
François Gouget 1425941e29 Fix the #include order for config.h.
Add #include "config.h" directives where needed.
2001-11-06 20:57:11 +00:00
Gerard Patel 033137412b Test for ws_timeout=NULL in winsock select(). 2001-11-05 23:53:16 +00:00
Francois Gouget 386cf6e342 When including 'wine/port.h', include it first.
Remove redundant 'config.h' includes.
2001-10-14 16:25:47 +00:00
Francois Gouget 76f6ffaf1b Fix the SOCKADDR_IPX declaration.
Centralize all sockaddr_xxx conversions in ws_sockaddr_ws2u and
ws_sockaddr_u2ws.
Remove ugly casts in TRACEs.
2001-10-08 20:36:03 +00:00
Andreas Mohr ab968455cd Added WSC*InstallProvider stubs. 2001-10-02 17:46:59 +00:00
David Hammerton 75b525149d Fixed typos. 2001-09-21 21:39:37 +00:00
Francois Gouget d97fe2655b Fix the WSAStartup prototype.
Fix handling of timeout parameter in select.
2001-09-14 00:19:52 +00:00
Francois Gouget 27eaac6a34 Convert the socket type (necessary on Solaris). 2001-09-07 15:26:18 +00:00
Francois Gouget 14b06d40e6 Added WSASTARTUP16 a 1 byte alignment version of WSASTARTUP for win16. 2001-08-24 21:33:58 +00:00
Francois Gouget 126e6b8175 Rename the regular WS_FD_XXX macros to FD_XXX.
Rename the Wine specific WS_FD_XXX macros to FD_WINE_XXX.
2001-08-24 19:14:56 +00:00
Daniel Walker c86517fcb6 - Fix for nonblocking sockets using WSAEventSelect() (patch from Ove
Kaaven).
- Changed WSAEnumNetworkEvents() so it only returns events that the
  application is looking for.
- Changed sock_poll_event() to interpret a POLLIN event with zero
  bytes waiting to be read as a POLLHUP.
2001-08-23 23:25:33 +00:00
Alexandre Julliard e994d5036e Added Interlocked*Pointer functions.
Fixed InterlockedCompareExchange prototype.
2001-08-09 21:21:13 +00:00
Alexandre Julliard 37e9503ae8 Moved server.h to include/wine. 2001-07-19 00:39:09 +00:00
Patrik Stridvall e9782fa1fc Documentation fixes. 2001-07-12 22:33:51 +00:00
Patrik Stridvall 044855c6ec Documentation fixes. 2001-07-11 18:56:41 +00:00
Peter Hunnisett 7736876afd Implemented a stub for WSARecvFrom. 2001-07-10 19:09:59 +00:00
Patrik Stridvall 01d5e5b071 Documentation fixes. 2001-07-02 19:59:40 +00:00
Patrik Stridvall 3ca9823941 Documentation ordinal fixes. 2001-06-20 23:03:14 +00:00
Patrik Stridvall 8b216b3d02 Documentation ordinal fixes. 2001-06-19 18:20:47 +00:00
Francois Gouget 9a8a106f2b Fixed incorrect cast in WSOCK32_send and WSOCK32_recvfrom. 2001-05-07 18:14:35 +00:00
Peter Hunnisett de962afa56 Added stub for WSASend. 2001-04-10 21:22:34 +00:00
Alexandre Julliard 67a749999a New set of macros for server calls; makes requests without variable
part somewhat faster.
2001-02-27 02:09:16 +00:00
Alexandre Julliard 641c7ae109 Got rid of the WSINFO structure. Fixed a couple of bugs. 2001-02-20 01:57:13 +00:00
Andreas Mohr dacdb9c4c6 Cosmetics. 2001-02-14 00:29:16 +00:00
James Hatheway 4bed8266e0 In WsControl, don't mix Linux and Wine socket calls. Always use Wine calls.
Added hack for missing WINAPI in Unix socket() definition.
2001-01-17 20:19:14 +00:00
Gerard Patel 4756b088c1 Change WSACleanup - wsinfo is a static structure now. 2001-01-17 01:47:47 +00:00
Alexandre Julliard 7d5bc5c3f9 Removed some direct accesses to the 16-bit task structure. 2001-01-15 20:09:09 +00:00
Alexandre Julliard 8081e5a1e5 Added handle_t type to server interface so that we can make handles
pointers later on.
Always use 0 to signal invalid handle in server requests.
2001-01-05 04:08:07 +00:00
Marcus Meissner 23e271488c A socket becomes readable after connect in Linux 2.4 (even for
connection refused).
2001-01-02 20:35:41 +00:00
Patrik Stridvall 2b3aa616e8 Added/modified documentation for function arguments. 2000-12-01 23:58:28 +00:00
Alexandre Julliard 3a0f8b7953 Finished separation of shell32 and wsock32. 2000-12-01 20:48:41 +00:00
Alexandre Julliard 62469b21b6 Fixed SEGPTR_GET usage. 2000-11-27 22:02:08 +00:00
Marcus Meissner 3c379ddc6b Ignore SOL_SOCKET/SO_DEBUG setsockopt() calls. 2000-11-26 22:36:38 +00:00
Hidenori Takeshima 5d1a6385e1 Added checking for netdb.h.
Don't include arpa/inet.h and sys/socket.h if system doesn't have these headers.
2000-11-26 04:00:53 +00:00
Dimitrie O. Paun 0b7a7bbc06 Include config.h in files that test for constants defined in it. 2000-11-25 01:31:17 +00:00
Rein Klazes 9dd32508f6 Convert the value of level when setsockopt is called with
WS_SO_DONTLINGER.
2000-10-24 21:25:21 +00:00
Rein Klazes 81f7771972 Ignore setsockopt calls that make the size of the receive buffer too
small.
2000-10-13 17:05:35 +00:00
Alexandre Julliard 83f52d11c1 Moved all Win16 definitions out of the standard Windows headers. 2000-09-26 22:20:14 +00:00
Rein Klazes ff7a61f8d3 Make calls to gethostbyname, gethostbyaddr, getservbyname,
getservbyport, getprotobyname and getprotobynumber thread-safe.
2000-09-24 19:41:57 +00:00
John Gilmore 5180d5635d Cleaned it up so that code paths which have unsupported WS_SO values
never actually pass them to Unix system calls.
2000-09-16 20:51:40 +00:00
Stephane Lussier ec6f37bf3e When checking the socket return by the server request, we should do a
"signed" check.
2000-09-01 01:21:42 +00:00
Alexandre Julliard 92643003cf Converted a lot of server requests to the new exception handling
mechanism.
2000-08-31 01:59:51 +00:00
Alexandre Julliard 5ab9d860f2 Removed some unnecessary #includes and dll dependencies. 2000-08-09 22:35:05 +00:00
Andreas Mohr ae50941ae5 Fixed the Win16/Win32 structure size/alignment differences of
ws_hostent, ws_protoent, ws_servent, ws_netent.
2000-08-03 22:19:09 +00:00
Uwe Bonnes 6e5f3c759f We always have strerror, so no need to ifdef HAVE_STRERROR. 2000-07-29 11:32:07 +00:00
James Hatheway bf3e2e9fb0 Portability fixes. 2000-07-25 17:45:50 +00:00
James Hatheway c9d258274d Adds an initial WSAIoctl function with support for only the
SIO_GET_INTERFACE_LIST command.  Adds initial code to WsControl
function to support the WSCNTL_TCPIP_QUERY_INFO command.
2000-07-23 19:28:24 +00:00
Gerard Patel 0b42d3ce5b Fakes a negotiation of the winsock version. 2000-07-10 10:57:46 +00:00
Alexandre Julliard c607532ae4 Created separate libraries for dplay, shfolder, shlwapi, wow32 and
wsock32 so that we have at most one Win32 dll in each .so library.
2000-07-09 11:19:35 +00:00
Patrik Stridvall b167d4b21c Fixed some issues found by winapi_check. 2000-06-23 15:47:36 +00:00
James Hatheway 829405af93 Created an initial Winsock 2 (ws2_32) DLL. Makes use of the Winsock 1
functions already implemented.
2000-06-18 17:23:17 +00:00