sync shlwapi with wine 1.1.13
[reactos.git] / reactos / include / psdk / winsock.h
1 /*
2
3 Definitions for winsock 1.1
4
5 Portions Copyright (c) 1980, 1983, 1988, 1993
6 The Regents of the University of California. All rights reserved.
7
8 Portions Copyright (c) 1993 by Digital Equipment Corporation.
9 */
10
11 #ifndef _WINSOCK_H
12 #define _WINSOCK_H
13
14 #if !defined(__ROS_LONG64__)
15 #ifdef __WINESRC__
16 #define __ROS_LONG64__
17 #endif
18 #endif
19
20 #define _GNU_H_WINDOWS32_SOCKETS
21 #include <windows.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #if !defined ( _BSDTYPES_DEFINED )
28 /* also defined in gmon.h and in cygwin's sys/types */
29 typedef unsigned char u_char;
30 typedef unsigned short u_short;
31 typedef unsigned int u_int;
32 #ifndef __ROS_LONG64__
33 typedef unsigned long u_long;
34 #else
35 typedef unsigned int u_long;
36 #endif
37 #define _BSDTYPES_DEFINED
38 #endif /* !defined _BSDTYPES_DEFINED */
39 typedef u_int SOCKET;
40 #ifndef FD_SETSIZE
41 #define FD_SETSIZE 64
42 #endif
43
44 /* shutdown() how types */
45 #define SD_RECEIVE 0x00
46 #define SD_SEND 0x01
47 #define SD_BOTH 0x02
48
49 #ifndef _SYS_TYPES_FD_SET
50 /* fd_set may have be defined by the newlib <sys/types.h>
51 * if __USE_W32_SOCKETS not defined.
52 */
53 #ifdef fd_set
54 #undef fd_set
55 #endif
56 typedef struct fd_set {
57 u_int fd_count;
58 SOCKET fd_array[FD_SETSIZE];
59 } fd_set;
60 int PASCAL __WSAFDIsSet(SOCKET,fd_set*);
61 #ifndef FD_CLR
62 #define FD_CLR(fd,set) do { u_int __i;\
63 for (__i = 0; __i < ((fd_set *)(set))->fd_count ; __i++) {\
64 if (((fd_set *)(set))->fd_array[__i] == (fd)) {\
65 while (__i < ((fd_set *)(set))->fd_count-1) {\
66 ((fd_set*)(set))->fd_array[__i] = ((fd_set*)(set))->fd_array[__i+1];\
67 __i++;\
68 }\
69 ((fd_set*)(set))->fd_count--;\
70 break;\
71 }\
72 }\
73 } while (0)
74 #endif
75 #ifndef FD_SET
76 #define FD_SET(fd, set) do { \
77 if (((fd_set *)(set))->fd_count < FD_SETSIZE) \
78 ((fd_set *)(set))->fd_array[((fd_set *)(set))->fd_count++]=(fd);\
79 }while (0)
80 #endif
81 #ifndef FD_ZERO
82 #define FD_ZERO(set) (((fd_set *)(set))->fd_count=0)
83 #endif
84 #ifndef FD_ISSET
85 #define FD_ISSET(fd, set) __WSAFDIsSet((SOCKET)(fd), (fd_set *)(set))
86 #endif
87 #elif !defined(USE_SYS_TYPES_FD_SET)
88 #warning "fd_set and associated macros have been defined in sys/types. \
89 This can cause runtime problems with W32 sockets"
90 #endif /* ndef _SYS_TYPES_FD_SET */
91
92 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
93 #ifndef _TIMEVAL_DEFINED /* also in sys/time.h */
94 #define _TIMEVAL_DEFINED
95 struct timeval {
96 LONG tv_sec;
97 LONG tv_usec;
98 };
99 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
100 #define timercmp(tvp, uvp, cmp) \
101 (((tvp)->tv_sec != (uvp)->tv_sec) ? \
102 ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
103 ((tvp)->tv_usec cmp (uvp)->tv_usec))
104 #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
105 #endif /* _TIMEVAL_DEFINED */
106 struct hostent {
107 char *h_name;
108 char **h_aliases;
109 short h_addrtype;
110 short h_length;
111 char **h_addr_list;
112 #define h_addr h_addr_list[0]
113 };
114 struct linger {
115 u_short l_onoff;
116 u_short l_linger;
117 };
118 #endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
119 #define IOCPARM_MASK 0x7f
120 #define IOC_VOID 0x20000000
121 #define IOC_OUT 0x40000000
122 #define IOC_IN 0x80000000
123 #define IOC_INOUT (IOC_IN|IOC_OUT)
124
125 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
126 #define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
127 #define _IOR(x,y,t) (IOC_OUT|(((LONG)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
128 #define _IOW(x,y,t) (IOC_IN|(((LONG)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
129 #define FIONBIO _IOW('f', 126, u_long)
130 #endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
131
132 #define FIONREAD _IOR('f', 127, u_long)
133 #define FIOASYNC _IOW('f', 125, u_long)
134 #define SIOCSHIWAT _IOW('s', 0, u_long)
135 #define SIOCGHIWAT _IOR('s', 1, u_long)
136 #define SIOCSLOWAT _IOW('s', 2, u_long)
137 #define SIOCGLOWAT _IOR('s', 3, u_long)
138 #define SIOCATMARK _IOR('s', 7, u_long)
139
140 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
141 struct netent {
142 char * n_name;
143 char **n_aliases;
144 short n_addrtype;
145 u_long n_net;
146 };
147 struct servent {
148 char *s_name;
149 char **s_aliases;
150 short s_port;
151 char *s_proto;
152 };
153 struct protoent {
154 char *p_name;
155 char **p_aliases;
156 short p_proto;
157 };
158 #endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
159
160 #define IPPROTO_IP 0
161 #define IPPROTO_ICMP 1
162 #define IPPROTO_IGMP 2
163 #define IPPROTO_GGP 3
164 #define IPPROTO_TCP 6
165 #define IPPROTO_PUP 12
166 #define IPPROTO_UDP 17
167 #define IPPROTO_IDP 22
168 #define IPPROTO_ND 77
169 #define IPPROTO_RAW 255
170 #define IPPROTO_MAX 256
171 #define IPPORT_ECHO 7
172 #define IPPORT_DISCARD 9
173 #define IPPORT_SYSTAT 11
174 #define IPPORT_DAYTIME 13
175 #define IPPORT_NETSTAT 15
176 #define IPPORT_FTP 21
177 #define IPPORT_TELNET 23
178 #define IPPORT_SMTP 25
179 #define IPPORT_TIMESERVER 37
180 #define IPPORT_NAMESERVER 42
181 #define IPPORT_WHOIS 43
182 #define IPPORT_MTP 57
183 #define IPPORT_TFTP 69
184 #define IPPORT_RJE 77
185 #define IPPORT_FINGER 79
186 #define IPPORT_TTYLINK 87
187 #define IPPORT_SUPDUP 95
188 #define IPPORT_EXECSERVER 512
189 #define IPPORT_LOGINSERVER 513
190 #define IPPORT_CMDSERVER 514
191 #define IPPORT_EFSSERVER 520
192 #define IPPORT_BIFFUDP 512
193 #define IPPORT_WHOSERVER 513
194 #define IPPORT_ROUTESERVER 520
195 #define IPPORT_RESERVED 1024
196 #define IMPLINK_IP 155
197 #define IMPLINK_LOWEXPER 156
198 #define IMPLINK_HIGHEXPER 158
199 struct in_addr {
200 union {
201 struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
202 struct { u_short s_w1,s_w2; } S_un_w;
203 u_long S_addr;
204 } S_un;
205 #define s_addr S_un.S_addr
206 #define s_host S_un.S_un_b.s_b2
207 #define s_net S_un.S_un_b.s_b1
208 #define s_imp S_un.S_un_w.s_w2
209 #define s_impno S_un.S_un_b.s_b4
210 #define s_lh S_un.S_un_b.s_b3
211 };
212 #define IN_CLASSA(i) ((LONG)(i)&0x80000000)
213 #define IN_CLASSA_NET 0xff000000
214 #define IN_CLASSA_NSHIFT 24
215 #define IN_CLASSA_HOST 0x00ffffff
216 #define IN_CLASSA_MAX 128
217 #define IN_CLASSB(i) (((LONG)(i)&0xc0000000)==0x80000000)
218 #define IN_CLASSB_NET 0xffff0000
219 #define IN_CLASSB_NSHIFT 16
220 #define IN_CLASSB_HOST 0x0000ffff
221 #define IN_CLASSB_MAX 65536
222 #define IN_CLASSC(i) (((LONG)(i)&0xe0000000)==0xc0000000)
223 #define IN_CLASSC_NET 0xffffff00
224 #define IN_CLASSC_NSHIFT 8
225 #define IN_CLASSC_HOST 0xff
226 #define INADDR_ANY (u_long)0
227 #define INADDR_LOOPBACK 0x7f000001
228 #define INADDR_BROADCAST (u_long)0xffffffff
229 #define INADDR_NONE 0xffffffff
230 struct sockaddr_in {
231 short sin_family;
232 u_short sin_port;
233 struct in_addr sin_addr;
234 char sin_zero[8];
235 };
236 #define WSADESCRIPTION_LEN 256
237 #define WSASYS_STATUS_LEN 128
238 typedef struct WSAData {
239 WORD wVersion;
240 WORD wHighVersion;
241 char szDescription[WSADESCRIPTION_LEN+1];
242 char szSystemStatus[WSASYS_STATUS_LEN+1];
243 unsigned short iMaxSockets;
244 unsigned short iMaxUdpDg;
245 char * lpVendorInfo;
246 } WSADATA;
247 typedef WSADATA *LPWSADATA;
248
249 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
250 #define IP_OPTIONS 1
251 #define SO_DEBUG 1
252 #define SO_ACCEPTCONN 2
253 #define SO_REUSEADDR 4
254 #define SO_KEEPALIVE 8
255 #define SO_DONTROUTE 16
256 #define SO_BROADCAST 32
257 #define SO_USELOOPBACK 64
258 #define SO_LINGER 128
259 #define SO_OOBINLINE 256
260 #define SO_DONTLINGER (u_int)(~SO_LINGER)
261 #define SO_SNDBUF 0x1001
262 #define SO_RCVBUF 0x1002
263 #define SO_SNDLOWAT 0x1003
264 #define SO_RCVLOWAT 0x1004
265 #define SO_SNDTIMEO 0x1005
266 #define SO_RCVTIMEO 0x1006
267 #define SO_ERROR 0x1007
268 #define SO_TYPE 0x1008
269 #endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
270 /*
271 * Note that the next 5 IP defines are specific to WinSock 1.1 (wsock32.dll).
272 * They will cause errors or unexpected results if used with the
273 * (gs)etsockopts exported from the WinSock 2 lib, ws2_32.dll. Refer ws2tcpip.h.
274 */
275 #define IP_MULTICAST_IF 2
276 #define IP_MULTICAST_TTL 3
277 #define IP_MULTICAST_LOOP 4
278 #define IP_ADD_MEMBERSHIP 5
279 #define IP_DROP_MEMBERSHIP 6
280
281 #define IP_DEFAULT_MULTICAST_TTL 1
282 #define IP_DEFAULT_MULTICAST_LOOP 1
283 #define IP_MAX_MEMBERSHIPS 20
284 struct ip_mreq {
285 struct in_addr imr_multiaddr;
286 struct in_addr imr_interface;
287 };
288 #define INVALID_SOCKET (SOCKET)(~0)
289 #define SOCKET_ERROR (-1)
290 #define SOCK_STREAM 1
291 #define SOCK_DGRAM 2
292 #define SOCK_RAW 3
293 #define SOCK_RDM 4
294 #define SOCK_SEQPACKET 5
295 #define TCP_NODELAY 0x0001
296 #define AF_UNSPEC 0
297 #define AF_UNIX 1
298 #define AF_INET 2
299 #define AF_IMPLINK 3
300 #define AF_PUP 4
301 #define AF_CHAOS 5
302 #define AF_IPX 6
303 #define AF_NS 6
304 #define AF_ISO 7
305 #define AF_OSI AF_ISO
306 #define AF_ECMA 8
307 #define AF_DATAKIT 9
308 #define AF_CCITT 10
309 #define AF_SNA 11
310 #define AF_DECnet 12
311 #define AF_DLI 13
312 #define AF_LAT 14
313 #define AF_HYLINK 15
314 #define AF_APPLETALK 16
315 #define AF_NETBIOS 17
316 #define AF_VOICEVIEW 18
317 #define AF_FIREFOX 19
318 #define AF_UNKNOWN1 20
319 #define AF_BAN 21
320 #define AF_ATM 22
321 #define AF_INET6 23
322 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
323 #define AF_MAX 24
324 struct sockaddr {
325 u_short sa_family;
326 char sa_data[14];
327 };
328 #endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
329
330 struct sockproto {
331 u_short sp_family;
332 u_short sp_protocol;
333 };
334 #define PF_UNSPEC AF_UNSPEC
335 #define PF_UNIX AF_UNIX
336 #define PF_INET AF_INET
337 #define PF_IMPLINK AF_IMPLINK
338 #define PF_PUP AF_PUP
339 #define PF_CHAOS AF_CHAOS
340 #define PF_NS AF_NS
341 #define PF_IPX AF_IPX
342 #define PF_ISO AF_ISO
343 #define PF_OSI AF_OSI
344 #define PF_ECMA AF_ECMA
345 #define PF_DATAKIT AF_DATAKIT
346 #define PF_CCITT AF_CCITT
347 #define PF_SNA AF_SNA
348 #define PF_DECnet AF_DECnet
349 #define PF_DLI AF_DLI
350 #define PF_LAT AF_LAT
351 #define PF_HYLINK AF_HYLINK
352 #define PF_APPLETALK AF_APPLETALK
353 #define PF_VOICEVIEW AF_VOICEVIEW
354 #define PF_FIREFOX AF_FIREFOX
355 #define PF_UNKNOWN1 AF_UNKNOWN1
356 #define PF_BAN AF_BAN
357 #define PF_ATM AF_ATM
358 #define PF_INET6 AF_INET6
359 #define PF_MAX AF_MAX
360 #define SOL_SOCKET 0xffff
361 #define SOMAXCONN 5
362 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
363 #define MSG_OOB 1
364 #define MSG_PEEK 2
365 #define MSG_DONTROUTE 4
366 #endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
367 #define MSG_MAXIOVLEN 16
368 #define MSG_PARTIAL 0x8000
369 #define MAXGETHOSTSTRUCT 1024
370 #define FD_READ 1
371 #define FD_WRITE 2
372 #define FD_OOB 4
373 #define FD_ACCEPT 8
374 #define FD_CONNECT 16
375 #define FD_CLOSE 32
376 #ifndef WSABASEERR
377 #define WSABASEERR 10000
378 #define WSAEINTR (WSABASEERR+4)
379 #define WSAEBADF (WSABASEERR+9)
380 #define WSAEACCES (WSABASEERR+13)
381 #define WSAEFAULT (WSABASEERR+14)
382 #define WSAEINVAL (WSABASEERR+22)
383 #define WSAEMFILE (WSABASEERR+24)
384 #define WSAEWOULDBLOCK (WSABASEERR+35)
385 #define WSAEINPROGRESS (WSABASEERR+36)
386 #define WSAEALREADY (WSABASEERR+37)
387 #define WSAENOTSOCK (WSABASEERR+38)
388 #define WSAEDESTADDRREQ (WSABASEERR+39)
389 #define WSAEMSGSIZE (WSABASEERR+40)
390 #define WSAEPROTOTYPE (WSABASEERR+41)
391 #define WSAENOPROTOOPT (WSABASEERR+42)
392 #define WSAEPROTONOSUPPORT (WSABASEERR+43)
393 #define WSAESOCKTNOSUPPORT (WSABASEERR+44)
394 #define WSAEOPNOTSUPP (WSABASEERR+45)
395 #define WSAEPFNOSUPPORT (WSABASEERR+46)
396 #define WSAEAFNOSUPPORT (WSABASEERR+47)
397 #define WSAEADDRINUSE (WSABASEERR+48)
398 #define WSAEADDRNOTAVAIL (WSABASEERR+49)
399 #define WSAENETDOWN (WSABASEERR+50)
400 #define WSAENETUNREACH (WSABASEERR+51)
401 #define WSAENETRESET (WSABASEERR+52)
402 #define WSAECONNABORTED (WSABASEERR+53)
403 #define WSAECONNRESET (WSABASEERR+54)
404 #define WSAENOBUFS (WSABASEERR+55)
405 #define WSAEISCONN (WSABASEERR+56)
406 #define WSAENOTCONN (WSABASEERR+57)
407 #define WSAESHUTDOWN (WSABASEERR+58)
408 #define WSAETOOMANYREFS (WSABASEERR+59)
409 #define WSAETIMEDOUT (WSABASEERR+60)
410 #define WSAECONNREFUSED (WSABASEERR+61)
411 #define WSAELOOP (WSABASEERR+62)
412 #define WSAENAMETOOLONG (WSABASEERR+63)
413 #define WSAEHOSTDOWN (WSABASEERR+64)
414 #define WSAEHOSTUNREACH (WSABASEERR+65)
415 #define WSAENOTEMPTY (WSABASEERR+66)
416 #define WSAEPROCLIM (WSABASEERR+67)
417 #define WSAEUSERS (WSABASEERR+68)
418 #define WSAEDQUOT (WSABASEERR+69)
419 #define WSAESTALE (WSABASEERR+70)
420 #define WSAEREMOTE (WSABASEERR+71)
421 #define WSAEDISCON (WSABASEERR+101)
422 #define WSASYSNOTREADY (WSABASEERR+91)
423 #define WSAVERNOTSUPPORTED (WSABASEERR+92)
424 #define WSANOTINITIALISED (WSABASEERR+93)
425 #define WSAHOST_NOT_FOUND (WSABASEERR+1001)
426 #define WSATRY_AGAIN (WSABASEERR+1002)
427 #define WSANO_RECOVERY (WSABASEERR+1003)
428 #define WSANO_DATA (WSABASEERR+1004)
429 #endif /* !WSABASEERR */
430
431 #define WSANO_ADDRESS WSANO_DATA
432 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
433 #define h_errno WSAGetLastError()
434 #define HOST_NOT_FOUND WSAHOST_NOT_FOUND
435 #define TRY_AGAIN WSATRY_AGAIN
436 #define NO_RECOVERY WSANO_RECOVERY
437 #define NO_DATA WSANO_DATA
438 #define NO_ADDRESS WSANO_ADDRESS
439 #endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
440 SOCKET PASCAL accept(SOCKET,struct sockaddr*,int*);
441 int PASCAL bind(SOCKET,const struct sockaddr*,int);
442 int PASCAL closesocket(SOCKET);
443 int PASCAL connect(SOCKET,const struct sockaddr*,int);
444 int PASCAL ioctlsocket(SOCKET,LONG,u_long *);
445 int PASCAL getpeername(SOCKET,struct sockaddr*,int*);
446 int PASCAL getsockname(SOCKET,struct sockaddr*,int*);
447 int PASCAL getsockopt(SOCKET,int,int,char*,int*);
448 u_long PASCAL inet_addr(const char*);
449 DECLARE_STDCALL_P(char *) inet_ntoa(struct in_addr);
450 int PASCAL listen(SOCKET,int);
451 int PASCAL recv(SOCKET,char*,int,int);
452 int PASCAL recvfrom(SOCKET,char*,int,int,struct sockaddr*,int*);
453 int PASCAL send(SOCKET,const char*,int,int);
454 int PASCAL sendto(SOCKET,const char*,int,int,const struct sockaddr*,int);
455 int PASCAL setsockopt(SOCKET,int,int,const char*,int);
456 int PASCAL shutdown(SOCKET,int);
457 SOCKET PASCAL socket(int,int,int);
458 DECLARE_STDCALL_P(struct hostent *) gethostbyaddr(const char*,int,int);
459 DECLARE_STDCALL_P(struct hostent *) gethostbyname(const char*);
460 DECLARE_STDCALL_P(struct servent *) getservbyport(int,const char*);
461 DECLARE_STDCALL_P(struct servent *) getservbyname(const char*,const char*);
462 DECLARE_STDCALL_P(struct protoent *) getprotobynumber(int);
463 DECLARE_STDCALL_P(struct protoent *) getprotobyname(const char*);
464 int PASCAL WSAStartup(WORD,LPWSADATA);
465 int PASCAL WSACleanup(void);
466 void PASCAL WSASetLastError(int);
467 int PASCAL WSAGetLastError(void);
468 BOOL PASCAL WSAIsBlocking(void);
469 int PASCAL WSAUnhookBlockingHook(void);
470 FARPROC PASCAL WSASetBlockingHook(FARPROC);
471 int PASCAL WSACancelBlockingCall(void);
472 HANDLE PASCAL WSAAsyncGetServByName(HWND,u_int,const char*,const char*,char*,int);
473 HANDLE PASCAL WSAAsyncGetServByPort(HWND,u_int,int,const char*,char*,int);
474 HANDLE PASCAL WSAAsyncGetProtoByName(HWND,u_int,const char*,char*,int);
475 HANDLE PASCAL WSAAsyncGetProtoByNumber(HWND,u_int,int,char*,int);
476 HANDLE PASCAL WSAAsyncGetHostByName(HWND,u_int,const char*,char*,int);
477 HANDLE PASCAL WSAAsyncGetHostByAddr(HWND,u_int,const char*,int,int,char*,int);
478 int PASCAL WSACancelAsyncRequest(HANDLE);
479 int PASCAL WSAAsyncSelect(SOCKET,HWND,u_int,LONG);
480 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
481 u_long PASCAL htonl(u_long);
482 u_long PASCAL ntohl(u_long);
483 u_short PASCAL htons(u_short);
484 u_short PASCAL ntohs(u_short);
485 int PASCAL select(int nfds,fd_set*,fd_set*,fd_set*,const struct timeval*);
486 int PASCAL gethostname(char*,int);
487 #endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
488
489 #define WSAMAKEASYNCREPLY(b,e) MAKELONG(b,e)
490 #define WSAMAKESELECTREPLY(e,error) MAKELONG(e,error)
491 #define WSAGETASYNCBUFLEN(l) LOWORD(l)
492 #define WSAGETASYNCERROR(l) HIWORD(l)
493 #define WSAGETSELECTEVENT(l) LOWORD(l)
494 #define WSAGETSELECTERROR(l) HIWORD(l)
495
496 typedef struct sockaddr SOCKADDR;
497 typedef struct sockaddr *PSOCKADDR;
498 typedef struct sockaddr *LPSOCKADDR;
499 typedef struct sockaddr_in SOCKADDR_IN;
500 typedef struct sockaddr_in *PSOCKADDR_IN;
501 typedef struct sockaddr_in *LPSOCKADDR_IN;
502 typedef struct linger LINGER;
503 typedef struct linger *PLINGER;
504 typedef struct linger *LPLINGER;
505 typedef struct in_addr IN_ADDR;
506 typedef struct in_addr *PIN_ADDR;
507 typedef struct in_addr *LPIN_ADDR;
508 typedef struct fd_set FD_SET;
509 typedef struct fd_set *PFD_SET;
510 typedef struct fd_set *LPFD_SET;
511 typedef struct hostent HOSTENT;
512 typedef struct hostent *PHOSTENT;
513 typedef struct hostent *LPHOSTENT;
514 typedef struct servent SERVENT;
515 typedef struct servent *PSERVENT;
516 typedef struct servent *LPSERVENT;
517 typedef struct protoent PROTOENT;
518 typedef struct protoent *PPROTOENT;
519 typedef struct protoent *LPPROTOENT;
520 typedef struct timeval TIMEVAL;
521 typedef struct timeval *PTIMEVAL;
522 typedef struct timeval *LPTIMEVAL;
523
524 #ifdef __cplusplus
525 }
526 #endif
527 /*
528 * Recent MSDN docs indicate that the MS-specific extensions exported from
529 * mswsock.dll (AcceptEx, TransmitFile. WSARecEx and GetAcceptExSockaddrs) are
530 * declared in mswsock.h. These extensions are not supported on W9x or WinCE.
531 * However, code using WinSock 1.1 API may expect the declarations and
532 * associated defines to be in this header. Thus we include mswsock.h here.
533 *
534 * When linking against the WinSock 1.1 lib, wsock32.dll, the mswsock functions
535 * are automatically routed to mswsock.dll (on platforms with support).
536 * The WinSock 2 lib, ws2_32.dll, does not contain any references to
537 * the mswsock extensions.
538 */
539
540 #include <mswsock.h>
541
542 #endif