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