2000-09-17 09:36:01 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS WinSock 2 DLL
|
|
|
|
* FILE: misc/stubs.c
|
|
|
|
* PURPOSE: Stubs
|
|
|
|
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
|
|
|
|
* REVISIONS:
|
|
|
|
* CSH 01/09-2000 Created
|
|
|
|
*/
|
|
|
|
#include <ws2_32.h>
|
2003-10-30 13:29:38 +00:00
|
|
|
#include <catalog.h>
|
|
|
|
#include <handle.h>
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
/*
|
2003-10-30 13:29:38 +00:00
|
|
|
* @implemented
|
2003-07-10 21:28:17 +00:00
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
getpeername(IN SOCKET s,
|
|
|
|
OUT LPSOCKADDR name,
|
|
|
|
IN OUT INT FAR* namelen)
|
|
|
|
{
|
|
|
|
int Error;
|
|
|
|
INT Errno;
|
|
|
|
PCATALOG_ENTRY Provider;
|
|
|
|
|
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2010-03-25 01:06:20 +00:00
|
|
|
if (!ReferenceProviderByHandle((HANDLE)(ULONG_PTR)(s), &Provider))
|
2006-08-14 17:26:36 +00:00
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
Error = Provider->ProcTable.lpWSPGetPeerName(s,
|
|
|
|
name,
|
|
|
|
namelen,
|
|
|
|
&Errno);
|
|
|
|
|
|
|
|
DereferenceProviderByPointer(Provider);
|
|
|
|
|
|
|
|
if (Error == SOCKET_ERROR)
|
|
|
|
{
|
|
|
|
WSASetLastError(Errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Error;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
/*
|
2003-10-30 13:29:38 +00:00
|
|
|
* @implemented
|
2003-07-10 21:28:17 +00:00
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
getsockname(IN SOCKET s,
|
|
|
|
OUT LPSOCKADDR name,
|
|
|
|
IN OUT INT FAR* namelen)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
2006-08-14 17:26:36 +00:00
|
|
|
int Error;
|
|
|
|
INT Errno;
|
|
|
|
PCATALOG_ENTRY Provider;
|
|
|
|
|
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s,
|
|
|
|
&Provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
Error = Provider->ProcTable.lpWSPGetSockName(s,
|
|
|
|
name,
|
|
|
|
namelen,
|
|
|
|
&Errno);
|
|
|
|
|
|
|
|
DereferenceProviderByPointer(Provider);
|
|
|
|
|
|
|
|
if (Error == SOCKET_ERROR)
|
|
|
|
{
|
|
|
|
WSASetLastError(Errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Error;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
2003-10-30 13:29:38 +00:00
|
|
|
* @implemented
|
2003-07-10 21:28:17 +00:00
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
getsockopt(IN SOCKET s,
|
|
|
|
IN INT level,
|
|
|
|
IN INT optname,
|
|
|
|
OUT CHAR FAR* optval,
|
|
|
|
IN OUT INT FAR* optlen)
|
|
|
|
{
|
|
|
|
PCATALOG_ENTRY Provider;
|
|
|
|
INT Errno;
|
|
|
|
int Error;
|
|
|
|
|
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s,
|
|
|
|
&Provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
Error = Provider->ProcTable.lpWSPGetSockOpt(s,
|
|
|
|
level,
|
|
|
|
optname,
|
|
|
|
optval,
|
|
|
|
optlen,
|
|
|
|
&Errno);
|
|
|
|
|
|
|
|
DereferenceProviderByPointer(Provider);
|
|
|
|
|
|
|
|
if (Error == SOCKET_ERROR)
|
|
|
|
{
|
|
|
|
WSASetLastError(Errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Error;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
2003-10-30 13:29:38 +00:00
|
|
|
* @implemented
|
2003-07-10 21:28:17 +00:00
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
2004-11-25 23:32:54 +00:00
|
|
|
EXPORT __stdcall
|
2006-08-14 17:26:36 +00:00
|
|
|
setsockopt(IN SOCKET s,
|
|
|
|
IN INT level,
|
|
|
|
IN INT optname,
|
|
|
|
IN CONST CHAR FAR* optval,
|
|
|
|
IN INT optlen)
|
|
|
|
{
|
|
|
|
PCATALOG_ENTRY Provider;
|
|
|
|
INT Errno;
|
|
|
|
int Error;
|
|
|
|
|
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2008-12-30 13:37:31 +00:00
|
|
|
if(IS_INTRESOURCE(optval))
|
|
|
|
{
|
|
|
|
SetLastError(WSAEFAULT);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s, &Provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
Error = Provider->ProcTable.lpWSPSetSockOpt(s,
|
|
|
|
level,
|
|
|
|
optname,
|
|
|
|
optval,
|
|
|
|
optlen,
|
|
|
|
&Errno);
|
|
|
|
|
|
|
|
DereferenceProviderByPointer(Provider);
|
|
|
|
|
|
|
|
if (Error == SOCKET_ERROR)
|
|
|
|
{
|
|
|
|
WSASetLastError(Errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Error;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
2003-10-30 13:29:38 +00:00
|
|
|
* @implemented
|
2003-07-10 21:28:17 +00:00
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
shutdown(IN SOCKET s,
|
|
|
|
IN INT how)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
2006-08-14 17:26:36 +00:00
|
|
|
PCATALOG_ENTRY Provider;
|
|
|
|
INT Errno;
|
|
|
|
int Error;
|
|
|
|
|
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s, &Provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
Error = Provider->ProcTable.lpWSPShutdown(s,
|
|
|
|
how,
|
|
|
|
&Errno);
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
DereferenceProviderByPointer(Provider);
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
if (Error == SOCKET_ERROR)
|
|
|
|
{
|
|
|
|
WSASetLastError(Errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Error;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
2003-10-30 13:29:38 +00:00
|
|
|
* @implemented
|
2003-07-10 21:28:17 +00:00
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAAsyncSelect(IN SOCKET s,
|
|
|
|
IN HWND hWnd,
|
|
|
|
IN UINT wMsg,
|
|
|
|
IN LONG lEvent)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
2006-08-14 17:26:36 +00:00
|
|
|
PCATALOG_ENTRY Provider;
|
|
|
|
INT Errno;
|
|
|
|
int Error;
|
|
|
|
|
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s, &Provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
Error = Provider->ProcTable.lpWSPAsyncSelect(s,
|
|
|
|
hWnd,
|
|
|
|
wMsg,
|
|
|
|
lEvent,
|
|
|
|
&Errno);
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
DereferenceProviderByPointer(Provider);
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
if (Error == SOCKET_ERROR)
|
|
|
|
{
|
|
|
|
WSASetLastError(Errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Error;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
|
|
|
WSACancelBlockingCall(VOID)
|
|
|
|
{
|
2003-10-30 13:29:38 +00:00
|
|
|
#if 0
|
2006-08-14 17:26:36 +00:00
|
|
|
INT Errno;
|
|
|
|
int Error;
|
|
|
|
PCATALOG_ENTRY Provider;
|
|
|
|
|
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s, &Provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
Error = Provider->ProcTable.lpWSPCancelBlockingCall(&Errno);
|
|
|
|
|
|
|
|
DereferenceProviderByPointer(Provider);
|
|
|
|
|
|
|
|
if (Error == SOCKET_ERROR)
|
|
|
|
{
|
|
|
|
WSASetLastError(Errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Error;
|
2003-10-30 13:29:38 +00:00
|
|
|
#endif
|
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSADuplicateSocketA(IN SOCKET s,
|
|
|
|
IN DWORD dwProcessId,
|
|
|
|
OUT LPWSAPROTOCOL_INFOA lpProtocolInfo)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
2003-10-30 13:29:38 +00:00
|
|
|
#if 0
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAPROTOCOL_INFOA ProtocolInfoU;
|
|
|
|
|
|
|
|
Error = WSADuplicateSocketW(s,
|
2003-10-30 13:29:38 +00:00
|
|
|
dwProcessId,
|
|
|
|
&ProtocolInfoU);
|
2006-08-14 17:26:36 +00:00
|
|
|
|
|
|
|
if (Error == NO_ERROR)
|
|
|
|
{
|
|
|
|
UnicodeToAnsi(lpProtocolInfo,
|
|
|
|
ProtocolInfoU,
|
|
|
|
sizeof(
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return Error;
|
2003-10-30 13:29:38 +00:00
|
|
|
#endif
|
2006-08-14 17:26:36 +00:00
|
|
|
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
/*
|
2003-10-30 13:29:38 +00:00
|
|
|
* @implemented
|
2003-07-10 21:28:17 +00:00
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSADuplicateSocketW(IN SOCKET s,
|
|
|
|
IN DWORD dwProcessId,
|
|
|
|
OUT LPWSAPROTOCOL_INFOW lpProtocolInfo)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
2006-08-14 17:26:36 +00:00
|
|
|
INT Errno;
|
|
|
|
int Error;
|
|
|
|
PCATALOG_ENTRY Provider;
|
|
|
|
|
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s, &Provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
Error = Provider->ProcTable.lpWSPDuplicateSocket(s,
|
|
|
|
dwProcessId,
|
|
|
|
lpProtocolInfo,
|
|
|
|
&Errno);
|
|
|
|
DereferenceProviderByPointer(Provider);
|
2003-10-30 13:29:38 +00:00
|
|
|
|
2006-08-14 17:26:36 +00:00
|
|
|
if (Error == SOCKET_ERROR)
|
|
|
|
{
|
|
|
|
WSASetLastError(Errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Error;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAEnumProtocolsA(IN LPINT lpiProtocols,
|
|
|
|
OUT LPWSAPROTOCOL_INFOA lpProtocolBuffer,
|
|
|
|
IN OUT LPDWORD lpdwBufferLength)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAEnumProtocolsW(IN LPINT lpiProtocols,
|
|
|
|
OUT LPWSAPROTOCOL_INFOW lpProtocolBuffer,
|
|
|
|
IN OUT LPDWORD lpdwBufferLength)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
2003-10-30 13:29:38 +00:00
|
|
|
* @implemented
|
2003-07-10 21:28:17 +00:00
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
BOOL
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAGetOverlappedResult(IN SOCKET s,
|
|
|
|
IN LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
OUT LPDWORD lpcbTransfer,
|
|
|
|
IN BOOL fWait,
|
|
|
|
OUT LPDWORD lpdwFlags)
|
|
|
|
{
|
|
|
|
INT Errno;
|
|
|
|
BOOL Success;
|
|
|
|
PCATALOG_ENTRY Provider;
|
|
|
|
|
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s, &Provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
Success = Provider->ProcTable.lpWSPGetOverlappedResult(s,
|
|
|
|
lpOverlapped,
|
|
|
|
lpcbTransfer,
|
|
|
|
fWait,
|
|
|
|
lpdwFlags,
|
|
|
|
&Errno);
|
|
|
|
DereferenceProviderByPointer(Provider);
|
|
|
|
|
|
|
|
if (Success == FALSE)
|
|
|
|
{
|
|
|
|
WSASetLastError(Errno);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Success;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
BOOL
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAGetQOSByName(IN SOCKET s,
|
|
|
|
IN OUT LPWSABUF lpQOSName,
|
|
|
|
OUT LPQOS lpQOS)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
2000-09-17 09:36:01 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAHtonl(IN SOCKET s,
|
|
|
|
IN ULONG hostLONG,
|
|
|
|
OUT ULONG FAR* lpnetlong)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAHtons(IN SOCKET s,
|
|
|
|
IN USHORT hostshort,
|
|
|
|
OUT USHORT FAR* lpnetshort)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
2009-08-02 17:38:27 +00:00
|
|
|
PCATALOG_ENTRY provider;
|
2009-07-20 18:30:30 +00:00
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2000-09-17 09:36:01 +00:00
|
|
|
|
2009-07-20 18:30:30 +00:00
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s, &provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (provider->ProtocolInfo.iNetworkByteOrder)
|
|
|
|
{
|
|
|
|
case BIGENDIAN:
|
|
|
|
*lpnetshort = htons(hostshort);
|
|
|
|
break;
|
|
|
|
case LITTLEENDIAN:
|
|
|
|
#ifdef LE
|
|
|
|
*lpnetshort = hostshort;
|
|
|
|
#else
|
|
|
|
*lpnetshort = (((hostshort & 0xFF00) >> 8) | ((hostshort & 0x00FF) << 8));
|
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return 0;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
BOOL
|
|
|
|
EXPORT
|
|
|
|
WSAIsBlocking(VOID)
|
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
SOCKET
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAJoinLeaf(IN SOCKET s,
|
|
|
|
IN CONST struct sockaddr *name,
|
|
|
|
IN INT namelen,
|
|
|
|
IN LPWSABUF lpCallerData,
|
|
|
|
OUT LPWSABUF lpCalleeData,
|
|
|
|
IN LPQOS lpSQOS,
|
|
|
|
IN LPQOS lpGQOS,
|
|
|
|
IN DWORD dwFlags)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
2000-09-17 09:36:01 +00:00
|
|
|
return INVALID_SOCKET;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSANtohl(IN SOCKET s,
|
|
|
|
IN ULONG netlong,
|
|
|
|
OUT ULONG FAR* lphostlong)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSANtohs(IN SOCKET s,
|
|
|
|
IN USHORT netshort,
|
|
|
|
OUT USHORT FAR* lphostshort)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
2009-08-02 17:38:27 +00:00
|
|
|
PCATALOG_ENTRY provider;
|
2009-07-20 18:30:30 +00:00
|
|
|
if (!WSAINITIALIZED)
|
|
|
|
{
|
|
|
|
WSASetLastError(WSANOTINITIALISED);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
2000-09-17 09:36:01 +00:00
|
|
|
|
2009-07-20 18:30:30 +00:00
|
|
|
if (!ReferenceProviderByHandle((HANDLE)s, &provider))
|
|
|
|
{
|
|
|
|
WSASetLastError(WSAENOTSOCK);
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (provider->ProtocolInfo.iNetworkByteOrder)
|
|
|
|
{
|
|
|
|
case BIGENDIAN:
|
|
|
|
*lphostshort = ntohs(netshort);
|
|
|
|
break;
|
|
|
|
case LITTLEENDIAN:
|
|
|
|
#ifdef LE
|
|
|
|
*lphostshort = netshort;
|
|
|
|
#else
|
|
|
|
*lphostshort = (((netshort & 0xFF00) >> 8) | ((netshort & 0x00FF) << 8));
|
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return 0;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
FARPROC
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSASetBlockingHook(IN FARPROC lpBlockFunc)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
|
|
|
return (FARPROC)0;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
|
|
|
WSAUnhookBlockingHook(VOID)
|
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSAProviderConfigChange(IN OUT LPHANDLE lpNotificationHandle,
|
|
|
|
IN LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSACancelAsyncRequest(IN HANDLE hAsyncTaskHandle)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* WinSock Service Provider support functions */
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WPUCompleteOverlappedRequest(IN SOCKET s,
|
|
|
|
IN LPWSAOVERLAPPED lpOverlapped,
|
|
|
|
IN DWORD dwError,
|
|
|
|
IN DWORD cbTransferred,
|
|
|
|
OUT LPINT lpErrno)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSCDeinstallProvider(IN LPGUID lpProviderId,
|
|
|
|
OUT LPINT lpErrno)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSCEnumProtocols(IN LPINT lpiProtocols,
|
|
|
|
OUT LPWSAPROTOCOL_INFOW lpProtocolBuffer,
|
|
|
|
IN OUT LPDWORD lpdwBufferLength,
|
|
|
|
OUT LPINT lpErrno)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSCGetProviderPath(IN LPGUID lpProviderId,
|
|
|
|
OUT LPWSTR lpszProviderDllPath,
|
|
|
|
IN OUT LPINT lpProviderDllPathLen,
|
|
|
|
OUT LPINT lpErrno)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2009-07-21 08:59:30 +00:00
|
|
|
WSCInstallProvider(IN LPGUID lpProviderId,
|
|
|
|
IN CONST WCHAR* lpszProviderDllPath,
|
2006-08-14 17:26:36 +00:00
|
|
|
IN CONST LPWSAPROTOCOL_INFOW lpProtocolInfoList,
|
|
|
|
IN DWORD dwNumberOfEntries,
|
|
|
|
OUT LPINT lpErrno)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSCEnableNSProvider(IN LPGUID lpProviderId,
|
|
|
|
IN BOOL fEnable)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSCInstallNameSpace(IN LPWSTR lpszIdentifier,
|
|
|
|
IN LPWSTR lpszPathName,
|
|
|
|
IN DWORD dwNameSpace,
|
|
|
|
IN DWORD dwVersion,
|
|
|
|
IN LPGUID lpProviderId)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSCUnInstallNameSpace(IN LPGUID lpProviderId)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-07-10 21:28:17 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2000-09-17 09:36:01 +00:00
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSCWriteProviderOrder(IN LPDWORD lpwdCatalogEntryId,
|
|
|
|
IN DWORD dwNumberOfEntries)
|
2000-09-17 09:36:01 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
return WSASYSCALLFAILURE;
|
2000-09-17 09:36:01 +00:00
|
|
|
}
|
|
|
|
|
2003-09-08 09:56:57 +00:00
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSANSPIoctl(HANDLE hLookup,
|
|
|
|
DWORD dwControlCode,
|
|
|
|
LPVOID lpvInBuffer,
|
|
|
|
DWORD cbInBuffer,
|
|
|
|
LPVOID lpvOutBuffer,
|
|
|
|
DWORD cbOutBuffer,
|
|
|
|
LPDWORD lpcbBytesReturned,
|
|
|
|
LPWSACOMPLETION lpCompletion)
|
2003-09-08 09:56:57 +00:00
|
|
|
{
|
2008-07-16 12:49:15 +00:00
|
|
|
UNIMPLEMENTED
|
2003-09-08 09:56:57 +00:00
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2003-09-08 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSCUpdateProvider(LPGUID lpProviderId,
|
|
|
|
const WCHAR FAR * lpszProviderDllPath,
|
|
|
|
const LPWSAPROTOCOL_INFOW lpProtocolInfoList,
|
|
|
|
DWORD dwNumberOfEntries,
|
|
|
|
LPINT lpErrno)
|
2003-09-08 09:56:57 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2003-09-08 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
WSCWriteNameSpaceOrder(LPGUID lpProviderId,
|
|
|
|
DWORD dwNumberOfEntries)
|
2003-09-08 09:56:57 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
return WSASYSCALLFAILURE;
|
2003-09-08 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
|
|
|
EXPORT
|
2006-08-14 17:26:36 +00:00
|
|
|
getnameinfo(const struct sockaddr FAR * sa,
|
|
|
|
socklen_t salen,
|
|
|
|
char FAR * host,
|
|
|
|
DWORD hostlen,
|
|
|
|
char FAR * serv,
|
|
|
|
DWORD servlen,
|
|
|
|
INT flags)
|
2003-09-08 09:56:57 +00:00
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
WSASetLastError(WSASYSCALLFAILURE);
|
|
|
|
return SOCKET_ERROR;
|
2003-09-08 09:56:57 +00:00
|
|
|
}
|
|
|
|
|
2003-09-12 17:51:48 +00:00
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
VOID EXPORT WEP()
|
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
BOOL EXPORT WSApSetPostRoutine(PVOID Routine)
|
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
2008-07-16 12:49:15 +00:00
|
|
|
return FALSE;
|
2003-09-12 17:51:48 +00:00
|
|
|
}
|
|
|
|
|
2009-09-20 22:20:16 +00:00
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
|
|
|
EXPORT
|
|
|
|
GetAddrInfoW(IN PCWSTR pszNodeName,
|
|
|
|
IN PCWSTR pszServiceName,
|
|
|
|
IN const ADDRINFOW *ptHints,
|
|
|
|
OUT PADDRINFOW *pptResult)
|
|
|
|
{
|
|
|
|
UNIMPLEMENTED
|
|
|
|
|
|
|
|
WSASetLastError(EAI_FAIL);
|
|
|
|
return EAI_FAIL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-09-17 09:36:01 +00:00
|
|
|
/* EOF */
|