Sync with trunk rev.61910 to get latest improvements and bugfixes.
[reactos.git] / dll / win32 / mswsock / stubs.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS WinSock DLL
4 * FILE: stubs.c
5 * PURPOSE: Stub functions
6 * PROGRAMMERS: Ge van Geldorp (ge@gse.nl)
7 * REVISIONS:
8 */
9
10 #include "precomp.h"
11
12 #include <ws2spi.h>
13 #include <nspapi.h>
14
15 typedef DWORD (* LPFN_NSPAPI)(VOID);
16 typedef struct _NS_ROUTINE {
17 DWORD dwFunctionCount;
18 LPFN_NSPAPI *alpfnFunctions;
19 DWORD dwNameSpace;
20 DWORD dwPriority;
21 } NS_ROUTINE, *PNS_ROUTINE, * FAR LPNS_ROUTINE;
22
23 /*
24 * @unimplemented
25 */
26 BOOL
27 WINAPI
28 AcceptEx(SOCKET ListenSocket,
29 SOCKET AcceptSocket,
30 PVOID OutputBuffer,
31 DWORD ReceiveDataLength,
32 DWORD LocalAddressLength,
33 DWORD RemoteAddressLength,
34 LPDWORD BytesReceived,
35 LPOVERLAPPED Overlapped)
36 {
37 OutputDebugStringW(L"w32sock AcceptEx stub called\n");
38
39 return FALSE;
40 }
41
42
43 /*
44 * @unimplemented
45 */
46 INT
47 WINAPI
48 EnumProtocolsA(LPINT ProtocolCount,
49 LPVOID ProtocolBuffer,
50 LPDWORD BufferLength)
51 {
52 OutputDebugStringW(L"w32sock EnumProtocolsA stub called\n");
53
54 return SOCKET_ERROR;
55 }
56
57
58 /*
59 * @unimplemented
60 */
61 INT
62 WINAPI
63 EnumProtocolsW(LPINT ProtocolCount,
64 LPVOID ProtocolBuffer,
65 LPDWORD BufferLength)
66 {
67 OutputDebugStringW(L"w32sock EnumProtocolsW stub called\n");
68
69 return SOCKET_ERROR;
70 }
71
72
73 /*
74 * @unimplemented
75 */
76 VOID
77 WINAPI
78 GetAcceptExSockaddrs(PVOID OutputBuffer,
79 DWORD ReceiveDataLength,
80 DWORD LocalAddressLength,
81 DWORD RemoteAddressLength,
82 LPSOCKADDR* LocalSockaddr,
83 LPINT LocalSockaddrLength,
84 LPSOCKADDR* RemoteSockaddr,
85 LPINT RemoteSockaddrLength)
86 {
87 OutputDebugStringW(L"w32sock GetAcceptExSockaddrs stub called\n");
88 }
89
90
91 /*
92 * @unimplemented
93 */
94 INT
95 WINAPI
96 GetAddressByNameA(DWORD NameSpace,
97 LPGUID ServiceType,
98 LPSTR ServiceName,
99 LPINT Protocols,
100 DWORD Resolution,
101 LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
102 LPVOID CsaddrBuffer,
103 LPDWORD BufferLength,
104 LPSTR AliasBuffer,
105 LPDWORD AliasBufferLength)
106 {
107 OutputDebugStringW(L"w32sock GetAddressByNameA stub called\n");
108
109 return SOCKET_ERROR;
110 }
111
112
113 /*
114 * @unimplemented
115 */
116 INT
117 WINAPI
118 GetAddressByNameW(DWORD NameSpace,
119 LPGUID ServiceType,
120 LPWSTR ServiceName,
121 LPINT Protocols,
122 DWORD Resolution,
123 LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
124 LPVOID CsaddrBuffer,
125 LPDWORD BufferLength,
126 LPWSTR AliasBuffer,
127 LPDWORD AliasBufferLength)
128 {
129 OutputDebugStringW(L"w32sock GetAddressByNameW stub called\n");
130
131 return SOCKET_ERROR;
132 }
133
134
135 /*
136 * @unimplemented
137 */
138 INT
139 WINAPI
140 GetServiceA(DWORD NameSpace,
141 LPGUID Guid,
142 LPSTR ServiceName,
143 DWORD Properties,
144 LPVOID Buffer,
145 LPDWORD BufferSize,
146 LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
147 {
148 OutputDebugStringW(L"w32sock GetServiceA stub called\n");
149
150 return SOCKET_ERROR;
151 }
152
153
154 /*
155 * @unimplemented
156 */
157 INT
158 WINAPI
159 GetServiceW(DWORD NameSpace,
160 LPGUID Guid,
161 LPWSTR ServiceName,
162 DWORD Properties,
163 LPVOID Buffer,
164 LPDWORD BufferSize,
165 LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
166 {
167 OutputDebugStringW(L"w32sock GetServiceW stub called\n");
168
169 return SOCKET_ERROR;
170 }
171
172
173 /*
174 * @unimplemented
175 */
176 INT
177 WINAPI
178 GetTypeByNameA(LPSTR ServiceName,
179 LPGUID ServiceType)
180 {
181 OutputDebugStringW(L"w32sock GetTypeByNameA stub called\n");
182
183 return SOCKET_ERROR;
184 }
185
186
187 /*
188 * @unimplemented
189 */
190 INT
191 WINAPI
192 GetTypeByNameW(LPWSTR ServiceName,
193 LPGUID ServiceType)
194 {
195 OutputDebugStringW(L"w32sock GetTypeByNameW stub called\n");
196
197 return SOCKET_ERROR;
198 }
199
200
201 /*
202 * @unimplemented
203 */
204 INT
205 WINAPI
206 MigrateWinsockConfiguration(DWORD Unknown1,
207 DWORD Unknown2,
208 DWORD Unknown3)
209 {
210 OutputDebugStringW(L"w32sock MigrateWinsockConfiguration stub called\n");
211
212 return SOCKET_ERROR;
213 }
214
215
216 /*
217 * @unimplemented
218 */
219 INT
220 WINAPI
221 SetServiceA(DWORD NameSpace,
222 DWORD Operation,
223 DWORD Flags,
224 LPSERVICE_INFOA ServiceInfo,
225 LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
226 LPDWORD dwStatusFlags)
227 {
228 OutputDebugStringW(L"w32sock SetServiceA stub called\n");
229
230 return SOCKET_ERROR;
231 }
232
233
234 /*
235 * @unimplemented
236 */
237 INT
238 WINAPI
239 SetServiceW(DWORD NameSpace,
240 DWORD Operation,
241 DWORD Flags,
242 LPSERVICE_INFOW ServiceInfo,
243 LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
244 LPDWORD dwStatusFlags)
245 {
246 OutputDebugStringW(L"w32sock SetServiceW stub called\n");
247
248 return SOCKET_ERROR;
249 }
250
251
252 /*
253 * @unimplemented
254 */
255 int
256 WINAPI
257 WSARecvEx(SOCKET Sock,
258 char *Buf,
259 int Len,
260 int *Flags)
261 {
262 OutputDebugStringW(L"w32sock WSARecvEx stub called\n");
263
264 return SOCKET_ERROR;
265 }
266
267
268 /*
269 * @unimplemented
270 */
271 int
272 WINAPI
273 dn_expand(unsigned char *MessagePtr,
274 unsigned char *EndofMesOrig,
275 unsigned char *CompDomNam,
276 unsigned char *ExpandDomNam,
277 int Length)
278 {
279 OutputDebugStringW(L"w32sock dn_expand stub called\n");
280
281 return SOCKET_ERROR;
282 }
283
284
285 /*
286 * @unimplemented
287 */
288 struct netent *
289 WINAPI
290 getnetbyname(const char *name)
291 {
292 OutputDebugStringW(L"w32sock getnetbyname stub called\n");
293
294 return NULL;
295 }
296
297
298 /*
299 * @unimplemented
300 */
301 UINT
302 WINAPI
303 inet_network(const char *cp)
304 {
305 OutputDebugStringW(L"w32sock inet_network stub called\n");
306
307 return INADDR_NONE;
308 }
309
310
311 /*
312 * @unimplemented
313 */
314 SOCKET
315 WINAPI
316 rcmd(char **AHost,
317 USHORT InPort,
318 char *LocUser,
319 char *RemUser,
320 char *Cmd,
321 int *Fd2p)
322 {
323 OutputDebugStringW(L"w32sock rcmd stub called\n");
324
325 return INVALID_SOCKET;
326 }
327
328
329 /*
330 * @unimplemented
331 */
332 SOCKET
333 WINAPI
334 rexec(char **AHost,
335 int InPort,
336 char *User,
337 char *Passwd,
338 char *Cmd,
339 int *Fd2p)
340 {
341 OutputDebugStringW(L"w32sock rexec stub called\n");
342
343 return INVALID_SOCKET;
344 }
345
346
347 /*
348 * @unimplemented
349 */
350 SOCKET
351 WINAPI
352 rresvport(int *port)
353 {
354 OutputDebugStringW(L"w32sock rresvport stub called\n");
355
356 return INVALID_SOCKET;
357 }
358
359
360 /*
361 * @unimplemented
362 */
363 void
364 WINAPI
365 s_perror(const char *str)
366 {
367 OutputDebugStringW(L"w32sock s_perror stub called\n");
368 }
369
370
371 /*
372 * @unimplemented
373 */
374 int
375 WINAPI
376 sethostname(char *Name, int NameLen)
377 {
378 OutputDebugStringW(L"w32sock sethostname stub called\n");
379
380 return SOCKET_ERROR;
381 }
382
383
384 /*
385 * @unimplemented
386 */
387 BOOL
388 WINAPI
389 DllMain(HINSTANCE InstDLL,
390 DWORD Reason,
391 LPVOID Reserved)
392 {
393 return TRUE;
394 }
395
396
397 /*
398 * @unimplemented
399 */
400 INT
401 WINAPI
402 GetNameByTypeA(LPGUID lpServiceType,LPSTR lpServiceName,DWORD dwNameLength)
403 {
404 OutputDebugStringW(L"w32sock GetNameByTypeA stub called\n");
405 return TRUE;
406 }
407
408
409 /*
410 * @unimplemented
411 */
412 INT
413 WINAPI
414 GetNameByTypeW(LPGUID lpServiceType,LPWSTR lpServiceName,DWORD dwNameLength)
415 {
416 OutputDebugStringW(L"w32sock GetNameByTypeW stub called\n");
417 return TRUE;
418 }
419
420
421 /*
422 * @unimplemented
423 */
424 INT
425 WINAPI
426 NSPStartup(
427 LPGUID lpProviderId,
428 LPNSP_ROUTINE lpnspRoutines
429 )
430 {
431 return TRUE;
432 }
433
434
435 /*
436 * @unimplemented
437 */
438 int
439 WINAPI
440 WSPStartup(
441 IN WORD wVersionRequested,
442 OUT LPWSPDATA lpWSPData,
443 IN LPWSAPROTOCOL_INFOW lpProtocolInfo,
444 IN WSPUPCALLTABLE UpcallTable,
445 OUT LPWSPPROC_TABLE lpProcTable
446 )
447 {
448 return TRUE;
449 }
450
451
452 /*
453 * @unimplemented
454 */
455 INT
456 WINAPI
457 NPLoadNameSpaces(
458 IN OUT LPDWORD lpdwVersion,
459 IN OUT LPNS_ROUTINE nsrBuffer,
460 IN OUT LPDWORD lpdwBufferLength
461 )
462 {
463 OutputDebugStringW(L"mswsock NPLoadNameSpaces stub called\n");
464
465 *lpdwVersion = 1;
466
467 return TRUE;
468 }
469
470
471 /*
472 * @unimplemented
473 */
474 VOID
475 WINAPI
476 StartWsdpService()
477 {
478 OutputDebugStringW(L"mswsock StartWsdpService stub called\n");
479 }
480
481
482 /*
483 * @unimplemented
484 */
485 VOID
486 WINAPI
487 StopWsdpService()
488 {
489 OutputDebugStringW(L"mswsock StopWsdpService stub called\n");
490 }
491
492
493 /*
494 * @unimplemented
495 */
496 DWORD
497 WINAPI
498 SvchostPushServiceGlobals(DWORD Value)
499 {
500 OutputDebugStringW(L"mswsock SvchostPushServiceGlobals stub called\n");
501
502 return 0;
503 }
504
505
506 /*
507 * @unimplemented
508 */
509 VOID
510 WINAPI
511 ServiceMain(DWORD Unknown1, DWORD Unknown2)
512 {
513 OutputDebugStringW(L"mswsock ServiceMain stub called\n");
514 }