Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / all-mingw32 / bsdsocket / bsdsocket_intern.h
blob9a28939e780f308c8c8bafc00708da7d9575bfe8
1 #ifndef BSDSOCKET_INTERN_H
2 #define BSDSOCKET_INTERN_H
4 /*
5 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Internal definitions for bsdsocket.library
9 Lang: English
12 #include <aros/debug.h>
13 #include <aros/libcall.h>
14 #include <exec/avl.h>
15 #include <exec/libraries.h>
16 #include <utility/tagitem.h>
18 #include <sys/types.h>
19 #include <netinet/in.h>
20 #include <netdb.h>
22 #include "host_socket.h"
23 #include "winsock2.h"
25 struct WinSockInterface
27 int __stdcall (*WSAGetLastError)(void);
28 ULONG __stdcall (*WSinet_addr)(const char* cp);
29 char* __stdcall (*WSinet_ntoa)(struct in_addr in);
30 struct PROTOENT * __stdcall (*WSgetprotobyname)(const char* name);
31 int __stdcall (*WSsocket)(int af, int type, int protocol);
32 int __stdcall (*WSclosesocket)(int s);
33 int __stdcall (*WSioctlsocket)(int s, LONG cmd, ULONG *argp);
34 int __stdcall (*WSsetsockopt)(int s, int level, int optname, const char* optval, int optlen);
35 int __stdcall (*WSrecvfrom)(int s, char* buf, int len, int flags, struct WSsockaddr* from, int* fromlen);
36 int __stdcall (*WSsendto)(int s, const char* buf, int len, int flags, const struct WSsockaddr* to, int tolen);
37 int __stdcall (*WSAEventSelect)(int s, APTR hEventObject, ULONG lNetworkEvents);
40 struct HostSocketInterface
42 struct SocketController *(*sock_init)(void);
43 int (*sock_shutdown)(struct SocketController *ctl);
46 struct bsdsocketBase
48 struct Library lib; /* Standard header */
49 APTR HostLibBase; /* hostlib.resource base */
50 APTR winsock; /* Ws2_32.dll handle */
51 APTR resolver; /* bsdsocket.dll handle */
52 struct WinSockInterface *WSIFace; /* WinSock interface */
53 struct HostSocketInterface *ResIFace; /* Resolver DLL interface */
54 struct SocketController *ctl; /* Resolver control registers */
55 struct AVLNode *tasks; /* TaskBases tree */
56 struct MinList socks; /* Sockets list */
59 #define WSAGetLastError SocketBase->WSIFace->WSAGetLastError
60 #define WSinet_addr SocketBase->WSIFace->WSinet_addr
61 #define WSinet_ntoa SocketBase->WSIFace->WSinet_ntoa
62 #define WSgetprotobyname SocketBase->WSIFace->WSgetprotobyname
63 #define WSsocket SocketBase->WSIFace->WSsocket
64 #define WSclosesocket SocketBase->WSIFace->WSclosesocket
65 #define WSioctlsocket SocketBase->WSIFace->WSioctlsocket
66 #define WSsetsockopt SocketBase->WSIFace->WSsetsockopt
67 #define WSrecvfrom SocketBase->WSIFace->WSrecvfrom
68 #define WSsendto SocketBase->WSIFace->WSsendto
69 #define WSAEventSelect SocketBase->WSIFace->WSAEventSelect
71 struct Socket;
72 struct TaskBase;
74 struct TaskNode
76 struct AVLNode node;
77 struct Task *task;
78 struct TaskBase *self;
81 struct TaskBase
83 struct Library lib; /* Standard header */
84 struct TaskNode n; /* AVLNode for linking and lookup */
85 struct bsdsocketBase *glob; /* Pointer to global SocketBase */
86 APTR pool; /* Memory pool */
87 void *errnoPtr; /* errno stuff */
88 int errnoSize;
89 ULONG errnoVal; /* Default errno storage */
90 ULONG sigintr; /* Signals definition */
91 ULONG sigio;
92 ULONG sigurg;
93 ULONG dTableSize; /* Size of dtable */
94 struct Socket **dTable; /* Socket descriptors table */
95 struct protoent *pe; /* protoent buffer */
96 char *inaddr; /* IP address buffer */
99 #endif /* BSDSOCKET_INTERN_H */