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"
25 #define WSADESCRIPTION_LEN 256
26 #define WSASYS_STATUS_LEN 128
32 char szDescription[WSADESCRIPTION_LEN+1];
33 char szSystemStatus[WSASYS_STATUS_LEN+1];
39 #define INVALID_SOCKET (guint32)(~0)
40 #define SOCKET_ERROR -1
42 extern int WSAStartup(guint32 requested, WapiWSAData *data);
43 extern int WSACleanup(void);
44 extern void WSASetLastError(int error);
45 extern int WSAGetLastError(void);
46 extern int closesocket(guint32 handle);
48 extern int ioctlsocket(guint32 handle, gint32 command, gpointer arg);
49 extern int WSAIoctl (guint32 handle, gint32 command,
50 gchar *input, gint i_len,
51 gchar *output, gint o_len, glong *written,
52 void *unused1, void *unused2);
55 #endif /* _WAPI_SOCKETS_H_ */