| 1 | /* $Id: ioctl.cpp,v 1.2 2001-10-10 22:42:30 phaller 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 | #include <os2sel.h> | 
|---|
| 30 |  | 
|---|
| 31 |  | 
|---|
| 32 | #define INCL_BASE | 
|---|
| 33 | #include <os2wrap.h> | 
|---|
| 34 | #include <stdio.h> | 
|---|
| 35 | #include <string.h> | 
|---|
| 36 | #include <misc.h> | 
|---|
| 37 | #include <win32api.h> | 
|---|
| 38 |  | 
|---|
| 39 | #define DBG_LOCALLOG    DBG_wsa | 
|---|
| 40 | #include "dbglocal.h" | 
|---|
| 41 |  | 
|---|
| 42 | // PH: ugly ... | 
|---|
| 43 | #include "../wsock32/wsock32.h" | 
|---|
| 44 |  | 
|---|
| 45 |  | 
|---|
| 46 | ODINDEBUGCHANNEL(WS2_32-IOCTL) | 
|---|
| 47 |  | 
|---|
| 48 |  | 
|---|
| 49 | typedef LPVOID LPWSAOVERLAPPED; | 
|---|
| 50 | typedef LPVOID LPWSAOVERLAPPED_COMPLETION_ROUTINE; | 
|---|
| 51 |  | 
|---|
| 52 |  | 
|---|
| 53 | /***************************************************************************** | 
|---|
| 54 | * Name      : int WSAIoctl | 
|---|
| 55 | * Purpose   : direct socket / stack ioctls | 
|---|
| 56 | * Parameters: SOCKET  s | 
|---|
| 57 | *             DWORD   dwIoControlCode | 
|---|
| 58 | *             LPVOID  lpvInBuffer | 
|---|
| 59 | *             DWORD   cbInBuffer | 
|---|
| 60 | *             LPVOID  lpvOutBuffer | 
|---|
| 61 | *             DWORD   cbOutBuffer | 
|---|
| 62 | *             LPDWORD lpcbBytesReturned | 
|---|
| 63 | *             LPWSAOVERLAPPED lpOverlapped (unsupported, must be NULL) | 
|---|
| 64 | *             LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine (unsupported, must be NULL) | 
|---|
| 65 | * Variables : | 
|---|
| 66 | * Result    : 0 indicates success, SOCKET_ERROR indicates failure in case | 
|---|
| 67 | *             WSAGetLastError provides closer information | 
|---|
| 68 | * Remark    : | 
|---|
| 69 | * Status    : UNTESTED | 
|---|
| 70 | * | 
|---|
| 71 | * Author    : Patrick Haller [2001-09-17] | 
|---|
| 72 | *****************************************************************************/ | 
|---|
| 73 |  | 
|---|
| 74 | ODINFUNCTION9(int,     WSAIoctl, | 
|---|
| 75 | SOCKET,  s, | 
|---|
| 76 | DWORD,   dwIoControlCode, | 
|---|
| 77 | LPVOID,  lpvInBuffer, | 
|---|
| 78 | DWORD,   cbInBuffer, | 
|---|
| 79 | LPVOID,  lpvOutBuffer, | 
|---|
| 80 | DWORD,   cbOutBuffer, | 
|---|
| 81 | LPDWORD, lpcbBytesReturned, | 
|---|
| 82 | LPWSAOVERLAPPED, lpOverlapped, | 
|---|
| 83 | LPWSAOVERLAPPED_COMPLETION_ROUTINE, lpCompletionRoutine) | 
|---|
| 84 | { | 
|---|
| 85 | dprintf(("not implemented")); | 
|---|
| 86 |  | 
|---|
| 87 | WSASetLastError(ERROR_NOT_SUPPORTED); | 
|---|
| 88 | return SOCKET_ERROR; | 
|---|
| 89 | } | 
|---|