2 * sockets.h: Socket handles
5 * Dick Porter (dick@ximian.com)
7 * (C) 2002 Ximian, Inc.
10 #ifndef _WAPI_SOCKETS_H_
11 #define _WAPI_SOCKETS_H_
13 #include <sys/types.h>
14 #include <sys/socket.h>
15 #include <sys/ioctl.h>
16 #include <netinet/in.h>
17 #include <netinet/tcp.h>
19 #include <arpa/inet.h>
21 #include "mono/io-layer/wapi.h"
23 #define WSADESCRIPTION_LEN 256
24 #define WSASYS_STATUS_LEN 128
27 typedef unsigned int socklen_t;
34 char szDescription[WSADESCRIPTION_LEN+1];
35 char szSystemStatus[WSASYS_STATUS_LEN+1];
41 #define INVALID_SOCKET (guint32)(~0)
42 #define SOCKET_ERROR -1
44 extern int WSAStartup(guint32 requested, WapiWSAData *data);
45 extern int WSACleanup(void);
46 extern void WSASetLastError(int error);
47 extern int WSAGetLastError(void);
48 extern int closesocket(guint32 handle);
50 extern int ioctlsocket(guint32 handle, gint32 command, gpointer arg);
52 #endif /* _WAPI_SOCKETS_H_ */