1 | /* $Id: ioctl.cpp,v 1.3 2001-11-18 14:32:13 sandervl Exp $ */
|
---|
2 | /*
|
---|
3 | * based on Windows Sockets 1.1 specs
|
---|
4 | * (ftp.microsoft.com:/Advsys/winsock/spec11/WINSOCK.TXT)
|
---|
5 | *
|
---|
6 | * (C) 1993,1994,1996,1997 John Brezak, Erik Bos, Alex Korobka.
|
---|
7 | *
|
---|
8 | * NOTE: If you make any changes to fix a particular app, make sure
|
---|
9 | * they don't break something else like Netscape or telnet and ftp
|
---|
10 | * clients and servers (www.winsite.com got a lot of those).
|
---|
11 | *
|
---|
12 | * NOTE 2: Many winsock structs such as servent, hostent, protoent, ...
|
---|
13 | * are used with 1-byte alignment for Win16 programs and 4-byte alignment
|
---|
14 | * for Win32 programs in winsock.h. winsock2.h uses forced 4-byte alignment.
|
---|
15 | * So we have non-forced (just as MSDN) ws_XXXXent (winsock.h), 4-byte forced
|
---|
16 | * ws_XXXXent32 (winsock2.h) and 1-byte forced ws_XXXXent16 (winsock16.h).
|
---|
17 | */
|
---|
18 |
|
---|
19 |
|
---|
20 | /*****************************************************************************
|
---|
21 | * Includes *
|
---|
22 | *****************************************************************************/
|
---|
23 |
|
---|
24 | // Note: this file is currently incompatible with performance tracing
|
---|
25 | #undef PROFILE
|
---|
26 |
|
---|
27 | #include <odin.h>
|
---|
28 | #include <odinwrap.h>
|
---|
29 |
|
---|
30 | #include <windows.h>
|
---|
31 | #include <winsock2.h>
|
---|
32 | #include <misc.h>
|
---|
33 |
|
---|
34 |
|
---|
35 | #define DBG_LOCALLOG DBG_wsa
|
---|
36 | #include "dbglocal.h"
|
---|
37 |
|
---|
38 |
|
---|
39 | ODINDEBUGCHANNEL(WS2_32-IOCTL)
|
---|
40 |
|
---|
41 |
|
---|
42 | /*****************************************************************************
|
---|
43 | * Name : int WSAIoctl
|
---|
44 | * Purpose : direct socket / stack ioctls
|
---|
45 | * Parameters: SOCKET s
|
---|
46 | * DWORD dwIoControlCode
|
---|
47 | * LPVOID lpvInBuffer
|
---|
48 | * DWORD cbInBuffer
|
---|
49 | * LPVOID lpvOutBuffer
|
---|
50 | * DWORD cbOutBuffer
|
---|
51 | * LPDWORD lpcbBytesReturned
|
---|
52 | * LPWSAOVERLAPPED lpOverlapped (unsupported, must be NULL)
|
---|
53 | * LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine (unsupported, must be NULL)
|
---|
54 | * Variables :
|
---|
55 | * Result : 0 indicates success, SOCKET_ERROR indicates failure in case
|
---|
56 | * WSAGetLastError provides closer information
|
---|
57 | * Remark :
|
---|
58 | * Status : UNTESTED
|
---|
59 | *
|
---|
60 | * Author : Patrick Haller [2001-09-17]
|
---|
61 | *****************************************************************************/
|
---|
62 |
|
---|
63 | ODINFUNCTION9(int, WSAIoctl,
|
---|
64 | SOCKET, s,
|
---|
65 | DWORD, dwIoControlCode,
|
---|
66 | LPVOID, lpvInBuffer,
|
---|
67 | DWORD, cbInBuffer,
|
---|
68 | LPVOID, lpvOutBuffer,
|
---|
69 | DWORD, cbOutBuffer,
|
---|
70 | LPDWORD, lpcbBytesReturned,
|
---|
71 | LPWSAOVERLAPPED, lpOverlapped,
|
---|
72 | LPWSAOVERLAPPED_COMPLETION_ROUTINE, lpCompletionRoutine)
|
---|
73 | {
|
---|
74 | dprintf(("not implemented"));
|
---|
75 |
|
---|
76 | WSASetLastError(ERROR_NOT_SUPPORTED);
|
---|
77 | return SOCKET_ERROR;
|
---|
78 | }
|
---|