Fixed some issues found by winapi_check.
[wine] / dlls / wsock32 / socket.c
1 /*
2  * WSOCK32 specific functions
3  *
4  * Copyright (C) 1993,1994,1996,1997 John Brezak, Erik Bos, Alex Korobka.
5  */
6
7 #include "windef.h"
8 #include "debugtools.h"
9
10 DEFAULT_DEBUG_CHANNEL(winsock);
11
12 /* TCP/IP action codes */
13 #define WSCNTL_TCPIP_QUERY_INFO             0x00000000
14 #define WSCNTL_TCPIP_SET_INFO               0x00000001
15 #define WSCNTL_TCPIP_ICMP_ECHO              0x00000002
16 #define WSCNTL_TCPIP_TEST                   0x00000003
17
18 /***********************************************************************
19  *      WsControl
20  */
21 DWORD WINAPI WsControl(DWORD protocoll,DWORD action,
22                       LPVOID inbuf,LPDWORD inbuflen,
23                       LPVOID outbuf,LPDWORD outbuflen) 
24 {
25
26   switch (action) {
27   case WSCNTL_TCPIP_ICMP_ECHO:
28     {
29       unsigned int addr = *(unsigned int*)inbuf;
30 #if 0
31       int timeout= *(unsigned int*)(inbuf+4);
32       short x1 = *(unsigned short*)(inbuf+8);
33       short sendbufsize = *(unsigned short*)(inbuf+10);
34       char x2 = *(unsigned char*)(inbuf+12);
35       char ttl = *(unsigned char*)(inbuf+13);
36       char service = *(unsigned char*)(inbuf+14);
37       char type= *(unsigned char*)(inbuf+15); /* 0x2: don't fragment*/
38 #endif      
39       
40       FIXME("(ICMP_ECHO) to 0x%08x stub \n", addr);
41       break;
42     }
43   default:
44     FIXME("(%lx,%lx,%p,%p,%p,%p) stub\n",
45           protocoll,action,inbuf,inbuflen,outbuf,outbuflen);
46   }
47   return FALSE;
48 }
49
50 /***********************************************************************
51  *       WS_s_perror         (WSOCK32.1108)
52  */
53 void WINAPI WS_s_perror(LPCSTR message)
54 {
55     FIXME("(%s): stub\n",message);
56     return;
57 }