1 /* $Id: stubs.c,v 1.3 2003/08/07 04:03:24 royce Exp $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS WinSock DLL
6 * PURPOSE: Stub functions
7 * PROGRAMMERS: Ge van Geldorp (ge@gse.nl)
19 AcceptEx(SOCKET ListenSocket
,
22 DWORD ReceiveDataLength
,
23 DWORD LocalAddressLength
,
24 DWORD RemoteAddressLength
,
25 LPDWORD BytesReceived
,
26 LPOVERLAPPED Overlapped
)
28 OutputDebugStringW(L
"w32sock AcceptEx stub called\n");
39 EnumProtocolsA(LPINT ProtocolCount
,
40 LPVOID ProtocolBuffer
,
43 OutputDebugStringW(L
"w32sock EnumProtocolsA stub called\n");
54 EnumProtocolsW(LPINT ProtocolCount
,
55 LPVOID ProtocolBuffer
,
58 OutputDebugStringW(L
"w32sock EnumProtocolsW stub called\n");
69 GetAcceptExSockaddrs(PVOID OutputBuffer
,
70 DWORD ReceiveDataLength
,
71 DWORD LocalAddressLength
,
72 DWORD RemoteAddressLength
,
73 LPSOCKADDR
* LocalSockaddr
,
74 LPINT LocalSockaddrLength
,
75 LPSOCKADDR
* RemoteSockaddr
,
76 LPINT RemoteSockaddrLength
)
78 OutputDebugStringW(L
"w32sock GetAcceptExSockaddrs stub called\n");
87 GetAddressByNameA(DWORD NameSpace
,
92 LPVOID
/* really LPSERVICE_ASYNC_INFO */ ServiceAsyncInfo
,
96 LPDWORD AliasBufferLength
)
98 OutputDebugStringW(L
"w32sock GetAddressByNameA stub called\n");
109 GetAddressByNameW(DWORD NameSpace
,
114 LPVOID
/* really LPSERVICE_ASYNC_INFO */ ServiceAsyncInfo
,
116 LPDWORD BufferLength
,
118 LPDWORD AliasBufferLength
)
120 OutputDebugStringW(L
"w32sock GetAddressByNameW stub called\n");
131 GetNameByTypeA(LPGUID ServiceType
,
135 OutputDebugStringW(L
"w32sock GetNameByTypeA stub called\n");
146 GetNameByTypeW(LPGUID ServiceType
,
150 OutputDebugStringW(L
"w32sock GetNameByTypeW stub called\n");
161 GetServiceA(DWORD NameSpace
,
167 LPVOID
/* Really LPSERVICE_ASYNC_INFO */ ServiceAsyncInfo
)
169 OutputDebugStringW(L
"w32sock GetServiceA stub called\n");
180 GetServiceW(DWORD NameSpace
,
186 LPVOID
/* Really LPSERVICE_ASYNC_INFO */ ServiceAsyncInfo
)
188 OutputDebugStringW(L
"w32sock GetServiceW stub called\n");
199 GetTypeByNameA(LPSTR ServiceName
,
202 OutputDebugStringW(L
"w32sock GetTypeByNameA stub called\n");
213 GetTypeByNameW(LPWSTR ServiceName
,
216 OutputDebugStringW(L
"w32sock GetTypeByNameW stub called\n");
227 SetServiceA(DWORD NameSpace
,
230 LPVOID
/* Really LPSERVICE_INFO */ ServiceInfo
,
231 LPVOID
/* Really LPSERVICE_ASYNC_INFOA */ ServiceAsyncInfo
,
232 LPDWORD dwStatusFlags
)
234 OutputDebugStringW(L
"w32sock SetServiceA stub called\n");
245 SetServiceW(DWORD NameSpace
,
248 LPVOID
/* Really LPSERVICE_INFO */ ServiceInfo
,
249 LPVOID
/* Really LPSERVICE_ASYNC_INFOW */ ServiceAsyncInfo
,
250 LPDWORD dwStatusFlags
)
252 OutputDebugStringW(L
"w32sock SetServiceW stub called\n");
263 TransmitFile(SOCKET Socket
,
265 DWORD NumberOfBytesToWrite
,
266 DWORD NumberOfBytesPerSend
,
267 LPOVERLAPPED Overlapped
,
268 LPVOID
/* really LPTRANSMIT_FILE_BUFFERS */ TransmitBuffers
,
271 OutputDebugStringW(L
"w32sock TransmitFile stub called\n");
282 WSAAsyncGetHostByAddr(HWND Wnd
,
290 OutputDebugStringW(L
"w32sock WSAAsyncGetHostByAddr stub called\n");
301 WSAAsyncGetHostByName(HWND Wnd
,
307 OutputDebugStringW(L
"w32sock WSAAsyncGetHostByName stub called\n");
318 WSAAsyncGetProtoByName(HWND Wnd
,
324 OutputDebugStringW(L
"w32sock WSAAsyncGetProtoByName stub called\n");
335 WSAAsyncGetProtoByNumber(HWND Wnd
,
341 OutputDebugStringW(L
"w32sock WSAAsyncGetProtoByNumber stub called\n");
352 WSAAsyncGetServByName(HWND Wnd
,
359 OutputDebugStringW(L
"w32sock WSAAsyncGetServByName stub called\n");
370 WSAAsyncGetServByPort(HWND Wnd
,
377 OutputDebugStringW(L
"w32sock WSAAsyncGetServByPort stub called\n");
388 WSAAsyncSelect(SOCKET Sock
,
393 OutputDebugStringW(L
"w32sock WSAAsyncSelect stub called\n");
404 WSACancelAsyncRequest(HANDLE AsyncTaskHandle
)
406 OutputDebugStringW(L
"w32sock WSACancelAsyncRequest stub called\n");
417 WSACancelBlockingCall()
419 OutputDebugStringW(L
"w32sock WSACancelBlockingCall stub called\n");
432 OutputDebugStringW(L
"w32sock WSACleanup stub called\n");
443 WSAGetLastError(void)
445 OutputDebugStringW(L
"w32sock WSAGetLastError stub called\n");
447 return WSANOTINITIALISED
;
458 OutputDebugStringW(L
"w32sock WSAIsBlocking stub called\n");
469 WSARecvEx(SOCKET Sock
,
474 OutputDebugStringW(L
"w32sock WSARecvEx stub called\n");
485 WSASetBlockingHook(FARPROC BlockFunc
)
487 OutputDebugStringW(L
"w32sock WSASetBlockingHook stub called\n");
497 STDCALL
WSASetLastError(int Error
)
499 OutputDebugStringW(L
"w32sock WSASetLastError stub called\n");
508 WSAStartup(WORD VersionRequested
,
511 OutputDebugStringW(L
"w32sock WSAStartup stub called\n");
513 return WSASYSNOTREADY
;
522 WSAUnhookBlockingHook(void)
524 OutputDebugStringW(L
"w32sock WSAUnhookBlockingHook stub called\n");
535 WSApSetPostRoutine(LPVOID
/* really LPWPUPOSTMESSAGE */ PostRoutine
)
537 OutputDebugStringW(L
"w32sock WSApSetPostRoutine stub called\n");
548 __WSAFDIsSet(SOCKET Sock
,
551 OutputDebugStringW(L
"w32sock __WSAFDIsSet stub called\n");
563 struct sockaddr
*Addr
,
566 OutputDebugStringW(L
"w32sock accept stub called\n");
568 return INVALID_SOCKET
;
578 CONST LPSOCKADDR Name
,
581 OutputDebugStringW(L
"w32sock bind stub called\n");
592 closesocket(SOCKET Sock
)
594 OutputDebugStringW(L
"w32sock closesocket stub called\n");
606 CONST LPSOCKADDR Name
,
609 OutputDebugStringW(L
"w32sock connect stub called\n");
620 dn_expand(unsigned char *MessagePtr
,
621 unsigned char *EndofMesOrig
,
622 unsigned char *CompDomNam
,
623 unsigned char *ExpandDomNam
,
626 OutputDebugStringW(L
"w32sock dn_expand stub called\n");
637 gethostbyaddr(CONST CHAR
*Addr
,
641 OutputDebugStringW(L
"w32sock gethostbyaddr stub called\n");
652 gethostbyname(const char *Name
)
654 OutputDebugStringW(L
"w32sock gethostbyname stub called\n");
665 gethostname(char *Name
,
668 OutputDebugStringW(L
"w32sock gethostname stub called\n");
679 getnetbyname(char *Name
)
681 OutputDebugStringW(L
"w32sock getnetbyname stub called\n");
692 getpeername(SOCKET Sock
,
693 struct sockaddr
*Name
,
696 OutputDebugStringW(L
"w32sock getpeername stub called\n");
707 getprotobyname(CONST CHAR
*Name
)
709 OutputDebugStringW(L
"w32sock getprotobyname stub called\n");
720 getprotobynumber(INT Number
)
722 OutputDebugStringW(L
"w32sock getprotobynumber stub called\n");
733 getservbyname(const char *Name
,
736 OutputDebugStringW(L
"w32sock getservbyname stub called\n");
747 getservbyport(int Port
,
750 OutputDebugStringW(L
"w32sock getservbyport stub called\n");
761 getsockname(SOCKET Sock
,
762 struct sockaddr
*Name
,
765 OutputDebugStringW(L
"w32sock getsockname stub called\n");
776 getsockopt(SOCKET Sock
,
782 OutputDebugStringW(L
"w32sock getsockopt stub called\n");
793 htonl(ULONG HostLong
)
795 return (((HostLong
<< 24) & 0xff000000) |
796 ((HostLong
<< 8) & 0x00ff0000) |
797 ((HostLong
>> 8) & 0x0000ff00) |
798 ((HostLong
>> 24) & 0x000000ff));
807 htons(USHORT HostShort
)
809 return (((HostShort
<< 8) & 0xff00) |
810 ((HostShort
>> 8) & 0x00ff));
819 inet_addr(CONST CHAR
*cp
)
821 OutputDebugStringW(L
"w32sock inet_addr stub called\n");
832 inet_network(const char *cp
)
834 OutputDebugStringW(L
"w32sock inet_network stub called\n");
845 inet_ntoa(struct in_addr in
)
847 OutputDebugStringW(L
"w32sock inet_ntoa stub called\n");
858 ioctlsocket(SOCKET Sock
,
862 OutputDebugStringW(L
"w32sock ioctlsocket stub called\n");
876 OutputDebugStringW(L
"w32sock listen stub called\n");
889 return (((NetLong
<< 24) & 0xff000000) |
890 ((NetLong
<< 8) & 0x00ff0000) |
891 ((NetLong
>> 8) & 0x0000ff00) |
892 ((NetLong
>> 24) & 0x000000ff));
901 ntohs(USHORT NetShort
)
903 return (((NetShort
<< 8) & 0xff00) |
904 ((NetShort
>> 8) & 0x00ff));
920 OutputDebugStringW(L
"w32sock rcmd stub called\n");
922 return INVALID_SOCKET
;
936 OutputDebugStringW(L
"w32sock recv stub called\n");
947 recvfrom(SOCKET Sock
,
951 struct sockaddr
*From
,
954 OutputDebugStringW(L
"w32sock recvfrom stub called\n");
972 OutputDebugStringW(L
"w32sock rexec stub called\n");
974 return INVALID_SOCKET
;
985 OutputDebugStringW(L
"w32sock rresvport stub called\n");
987 return INVALID_SOCKET
;
996 s_perror(const char *str
)
998 OutputDebugStringW(L
"w32sock s_perror stub called\n");
1011 CONST LPTIMEVAL TimeOut
)
1013 OutputDebugStringW(L
"w32sock select stub called\n");
1015 return SOCKET_ERROR
;
1029 OutputDebugStringW(L
"w32sock send stub called\n");
1031 return SOCKET_ERROR
;
1044 CONST LPSOCKADDR To
,
1047 OutputDebugStringW(L
"w32sock sendto stub called\n");
1049 return SOCKET_ERROR
;
1058 sethostname(char *Name
, int NameLen
)
1060 OutputDebugStringW(L
"w32sock sethostname stub called\n");
1062 return SOCKET_ERROR
;
1071 setsockopt(SOCKET Sock
,
1077 OutputDebugStringW(L
"w32sock setsockopt stub called\n");
1079 return SOCKET_ERROR
;
1088 shutdown(SOCKET Sock
,
1091 OutputDebugStringW(L
"w32sock shutdown stub called\n");
1093 return SOCKET_ERROR
;
1106 OutputDebugStringW(L
"w32sock socket stub called\n");
1108 return INVALID_SOCKET
;
1117 DllMain(HINSTANCE InstDLL
,