Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / network / common / include / defines / miami.h
blobe468a46756fa544a1a98d9ad729191bea46c4922
1 #ifndef DEFINES_MIAMI_PROTOS_H
2 #define DEFINES_MIAMI_PROTOS_H
4 /*
5 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 */
8 /*
9 Desc: Defines for miami
12 #include <aros/libcall.h>
13 #include <exec/types.h>
14 #include <aros/preprocessor/variadic/cast2iptr.hpp>
16 #define __MiamiSysCtl_WB(__MiamiBase) \
17 AROS_LC7NR(void, MiamiSysCtl, \
18 AROS_LCA(LONG *, (__arg1), A0), \
19 AROS_LCA(ULONG, (__arg2), D0), \
20 AROS_LCA(void *, (__arg3), A1), \
21 AROS_LCA(LONG *, (__arg4), A2), \
22 AROS_LCA(void *, (__arg5), A3), \
23 AROS_LCA(LONG, (__arg6), D1), \
24 AROS_LCA(int, (__arg7), D2), \
25 struct Library *, (__MiamiBase), 5, Miami)
27 #define MiamiSysCtl(arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
28 __MiamiSysCtl_WB(MiamiBase, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6), (arg7))
30 #define __SetSysLogPort_WB(__MiamiBase) \
31 AROS_LC0NR(void, SetSysLogPort, \
32 struct Library *, (__MiamiBase), 6, Miami)
34 #define SetSysLogPort() \
35 __SetSysLogPort_WB(MiamiBase)
37 #define __QueryInterfaceTagList_WB(__MiamiBase, __arg1, __arg2) \
38 AROS_LC2NR(void, QueryInterfaceTagList, \
39 AROS_LCA(STRPTR, (__arg1), A0), \
40 AROS_LCA(struct TagItem *, (__arg2), A1), \
41 struct Library *, (__MiamiBase), 7, Miami)
43 #define QueryInterfaceTagList(arg1, arg2) \
44 __QueryInterfaceTagList_WB(MiamiBase, (arg1), (arg2))
46 #define __ClearDynNameServ_WB(__MiamiBase) \
47 AROS_LC0NR(void, ClearDynNameServ, \
48 struct Library *, (__MiamiBase), 9, Miami)
50 #define ClearDynNameServ() \
51 __ClearDynNameServ_WB(MiamiBase)
53 #define __gethostent_WB(__MiamiBase) \
54 AROS_LC0(struct hostent *, gethostent, \
55 struct Library *, (__MiamiBase), 10, Miami)
57 #define gethostent() \
58 __gethostent_WB(MiamiBase)
60 #define __MiamiDisallowDNS_WB(__MiamiBase, __arg1) \
61 AROS_LC1NR(void, MiamiDisallowDNS, \
62 AROS_LCA(LONG, (__arg1), D0), \
63 struct Library *, (__MiamiBase), 11, Miami)
65 #define MiamiDisallowDNS(arg1) \
66 __MiamiDisallowDNS_WB(MiamiBase, (arg1))
68 #define __endhostent_WB(__MiamiBase) \
69 AROS_LC0NR(void, endhostent, \
70 struct Library *, (__MiamiBase), 12, Miami)
72 #define endhostent() \
73 __endhostent_WB(MiamiBase)
75 #define __MiamiGetPid_WB(__MiamiBase) \
76 AROS_LC0(void *, MiamiGetPid, \
77 struct Library *, (__MiamiBase), 13, Miami)
79 #define MiamiGetPid() \
80 __MiamiGetPid_WB(MiamiBase)
82 #define __getprotoent_WB(__MiamiBase) \
83 AROS_LC0(struct protoent *, getprotoent, \
84 struct Library *, (__MiamiBase), 14, Miami)
86 #define getprotoent() \
87 __getprotoent_WB(MiamiBase)
89 #define __endprotoent_WB(__MiamiBase) \
90 AROS_LC0NR(void, endprotoent, \
91 struct Library *, (__MiamiBase), 15, Miami)
93 #define endprotoent() \
94 __endprotoent_WB(MiamiBase)
96 #define __MiamiPFAddHook_WB(__MiamiBase, __arg1, __arg2, __arg3) \
97 AROS_LC3(APTR, MiamiPFAddHook, \
98 AROS_LCA(struct Hook *, (__arg1), A0), \
99 AROS_LCA(UBYTE *, (__arg2), A1), \
100 AROS_LCA(struct TagItem *, (__arg3), A2), \
101 struct Library *, (__MiamiBase), 16, Miami)
103 #define MiamiPFAddHook(arg1, arg2, arg3) \
104 __MiamiPFAddHook_WB(MiamiBase, (arg1), (arg2), (arg3))
106 #define __MiamiPFRemoveHook_WB(__MiamiBase, __arg1) \
107 AROS_LC1NR(void, MiamiPFRemoveHook, \
108 AROS_LCA(APTR, (__arg1), A0), \
109 struct Library *, (__MiamiBase), 17, Miami)
111 #define MiamiPFRemoveHook(arg1) \
112 __MiamiPFRemoveHook_WB(MiamiBase, (arg1))
114 #define __MiamiGetHardwareLen_WB(__MiamiBase, __arg1) \
115 AROS_LC1(int, MiamiGetHardwareLen, \
116 AROS_LCA(char *, (__arg1), A0), \
117 struct Library *, (__MiamiBase), 18, Miami)
119 #define MiamiGetHardwareLen(arg1) \
120 __MiamiGetHardwareLen_WB(MiamiBase, (arg1))
122 #define __EndDynDomain_WB(__MiamiBase) \
123 AROS_LC0NR(void, EndDynDomain, \
124 struct Library *, (__MiamiBase), 19, Miami)
126 #define EndDynDomain() \
127 __EndDynDomain_WB(MiamiBase)
129 #define __EndDynNameServ_WB(__MiamiBase) \
130 AROS_LC0NR(void, EndDynNameServ, \
131 struct Library *, (__MiamiBase), 20, Miami)
133 #define EndDynNameServ() \
134 __EndDynNameServ_WB(MiamiBase)
136 #define __AddDynNameServ_WB(__MiamiBase, __arg1) \
137 AROS_LC1(LONG, AddDynNameServ, \
138 AROS_LCA(struct sockaddr *, (__arg1), A0), \
139 struct Library *, (__MiamiBase), 21, Miami)
141 #define AddDynNameServ(arg1) \
142 __AddDynNameServ_WB(MiamiBase, (arg1))
144 #define __AddDynDomain_WB(__MiamiBase, __arg1) \
145 AROS_LC1(LONG, AddDynDomain, \
146 AROS_LCA(STRPTR, (__arg1), A0), \
147 struct Library *, (__MiamiBase), 22, Miami)
149 #define AddDynDomain(arg1) \
150 __AddDynDomain_WB(MiamiBase, (arg1))
152 #define __sethostname_WB(__MiamiBase, __arg1, __arg2) \
153 AROS_LC2(int, sethostname, \
154 AROS_LCA(const char *, (__arg1), A0), \
155 AROS_LCA(size_t, (__arg2), D0), \
156 struct Library *, (__MiamiBase), 23, Miami)
158 #define sethostname(arg1, arg2) \
159 __sethostname_WB(MiamiBase, (arg1), (arg2))
161 #define __ClearDynDomain_WB(__MiamiBase) \
162 AROS_LC0NR(void, ClearDynDomain, \
163 struct Library *, (__MiamiBase), 24, Miami)
165 #define ClearDynDomain() \
166 __ClearDynDomain_WB(MiamiBase)
168 #define __MiamiOpenSSL_WB(__MiamiBase, __arg1) \
169 AROS_LC1(struct Library *, MiamiOpenSSL, \
170 AROS_LCA(struct TagItem *, (__arg1), A0), \
171 struct Library *, (__MiamiBase), 25, Miami)
173 #define MiamiOpenSSL(arg1) \
174 __MiamiOpenSSL_WB(MiamiBase, (arg1))
176 #define __MiamiCloseSSL_WB(__MiamiBase) \
177 AROS_LC0NR(void, MiamiCloseSSL, \
178 struct Library *, (__MiamiBase), 26, Miami)
180 #define MiamiCloseSSL() \
181 __MiamiCloseSSL_WB(MiamiBase)
183 #define __MiamiSetSocksConn_WB(__MiamiBase, __arg1, __arg2) \
184 AROS_LC2(int, MiamiSetSocksConn, \
185 AROS_LCA(struct sockaddr *, (__arg1), A0), \
186 AROS_LCA(int, (__arg2), D0), \
187 struct Library *, (__MiamiBase), 33, Miami)
189 #define MiamiSetSocksConn(arg1, arg2) \
190 __MiamiSetSocksConn_WB(MiamiBase, (arg1), (arg2))
192 #define __MiamiIsOnline_WB(__MiamiBase, __arg1) \
193 AROS_LC1(int, MiamiIsOnline, \
194 AROS_LCA(char *, (__arg1), A0), \
195 struct Library *, (__MiamiBase), 35, Miami)
197 #define MiamiIsOnline(arg1) \
198 __MiamiIsOnline_WB(MiamiBase, (arg1))
200 #define __MiamiOnOffline_WB(__MiamiBase, __arg1, __arg2) \
201 AROS_LC2NR(void, MiamiOnOffline, \
202 AROS_LCA(char *, (__arg1), A0), \
203 AROS_LCA(int, (__arg2), D0), \
204 struct Library *, (__MiamiBase), 36, Miami)
206 #define MiamiOnOffline(arg1, arg2) \
207 __MiamiOnOffline_WB(MiamiBase, (arg1), (arg2))
209 #define __inet_ntop_WB(__MiamiBase, __arg1, __arg2, __arg3, __arg4) \
210 AROS_LC4(STRPTR, inet_ntop, \
211 AROS_LCA(LONG, (__arg1), D0), \
212 AROS_LCA(void *, (__arg2), A0), \
213 AROS_LCA(char *, (__arg3), A1), \
214 AROS_LCA(LONG, (__arg4), D1), \
215 struct Library *, (__MiamiBase), 38, Miami)
217 #define inet_ntop(arg1, arg2, arg3, arg4) \
218 __inet_ntop_WB(MiamiBase, (arg1), (arg2), (arg3), (arg4))
220 #define __inet_aton_WB(__MiamiBase, __arg1, __arg2) \
221 AROS_LC2(int, inet_aton, \
222 AROS_LCA(const char *, (__arg1), A0), \
223 AROS_LCA(void *, (__arg2), A2), \
224 struct Library *, (__MiamiBase), 39, Miami)
226 #define inet_aton(arg1, arg2) \
227 __inet_aton_WB(MiamiBase, (arg1), (arg2))
229 #define __inet_pton_WB(__MiamiBase, __arg1, __arg2, __arg3) \
230 AROS_LC3(int, inet_pton, \
231 AROS_LCA(LONG, (__arg1), D0), \
232 AROS_LCA(char *, (__arg2), A0), \
233 AROS_LCA(void *, (__arg3), A1), \
234 struct Library *, (__MiamiBase), 40, Miami)
236 #define inet_pton(arg1, arg2, arg3) \
237 __inet_pton_WB(MiamiBase, (arg1), (arg2), (arg3))
239 #define __gethostbyname2_WB(__MiamiBase, __arg1, __arg2) \
240 AROS_LC2(struct hostent *, gethostbyname2, \
241 AROS_LCA(const char *, (__arg1), A0), \
242 AROS_LCA(LONG, (__arg2), D0), \
243 struct Library *, (__MiamiBase), 41, Miami)
245 #define gethostbyname2(arg1, arg2) \
246 __gethostbyname2_WB(MiamiBase, (arg1), (arg2))
248 #define __gai_strerror_WB(__MiamiBase, __arg1) \
249 AROS_LC1(char *, gai_strerror, \
250 AROS_LCA(LONG, (__arg1), D0), \
251 struct Library *, (__MiamiBase), 42, Miami)
253 #define gai_strerror(arg1) \
254 __gai_strerror_WB(MiamiBase, (arg1))
256 #define __freeaddrinfo_WB(__MiamiBase, __arg1) \
257 AROS_LC1NR(void, freeaddrinfo, \
258 AROS_LCA(struct addrinfo *, (__arg1), A0), \
259 struct Library *, (__MiamiBase), 43, Miami)
261 #define freeaddrinfo(arg1) \
262 __freeaddrinfo_WB(MiamiBase, (arg1))
264 #define __getaddrinfo_WB(__MiamiBase, __arg1, __arg2, __arg3, __arg4) \
265 AROS_LC4(LONG, getaddrinfo, \
266 AROS_LCA(char *, (__arg1), A0), \
267 AROS_LCA(char *, (__arg2), A1), \
268 AROS_LCA(struct addrinfo *, (__arg3), A2), \
269 AROS_LCA(struct addrinfo **, (__arg4), A3), \
270 struct Library *, (__MiamiBase), 44, Miami)
272 #define getaddrinfo(arg1, arg2, arg3, arg4) \
273 __getaddrinfo_WB(MiamiBase, (arg1), (arg2), (arg3), (arg4))
275 #define __getnameinfo_WB(__MiamiBase, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6, __arg7) \
276 AROS_LC7(LONG, getnameinfo, \
277 AROS_LCA(struct sockaddr *, (__arg1), A0), \
278 AROS_LCA(LONG, (__arg2), D0), \
279 AROS_LCA(char *, (__arg3), A1), \
280 AROS_LCA(LONG, (__arg4), D1), \
281 AROS_LCA(char *, (__arg5), A2), \
282 AROS_LCA(LONG, (__arg6), D2), \
283 AROS_LCA(LONG, (__arg7), D3), \
284 struct Library *, (__MiamiBase), 45, Miami)
286 #define getnameinfo(arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
287 __getnameinfo_WB(MiamiBase, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6), (arg7))
289 #define __if_nametoindex_WB(__MiamiBase, __arg1) \
290 AROS_LC1(LONG, if_nametoindex, \
291 AROS_LCA(char *, (__arg1), A0), \
292 struct Library *, (__MiamiBase), 46, Miami)
294 #define if_nametoindex(arg1) \
295 __if_nametoindex_WB(MiamiBase, (arg1))
297 #define __if_indextoname_WB(__MiamiBase, __arg1, __arg2) \
298 AROS_LC2(char *, if_indextoname, \
299 AROS_LCA(LONG, (__arg1), D0), \
300 AROS_LCA(char *, (__arg2), A0), \
301 struct Library *, (__MiamiBase), 47, Miami)
303 #define if_indextoname(arg1, arg2) \
304 __if_indextoname_WB(MiamiBase, (arg1), (arg2))
306 #define __if_nameindex_WB(__MiamiBase) \
307 AROS_LC0(struct if_nameindex *, if_nameindex, \
308 struct Library *, (__MiamiBase), 48, Miami)
310 #define if_nameindex() \
311 __if_nameindex_WB(MiamiBase)
313 #define __if_freenameindex_WB(__MiamiBase, __arg1) \
314 AROS_LC1NR(void, if_freenameindex, \
315 AROS_LCA(struct if_nameindex *, (__arg1), D0), \
316 struct Library *, (__MiamiBase), 49, Miami)
318 #define if_freenameindex(arg1) \
319 __if_freenameindex_WB(MiamiBase, (arg1))
321 #define __MiamiSupportsIPV6_WB(__MiamiBase) \
322 AROS_LC0(LONG, MiamiSupportsIPV6, \
323 struct Library *, (__MiamiBase), 50, Miami)
325 #define MiamiSupportsIPV6() \
326 __MiamiSupportsIPV6_WB(MiamiBase)
328 #define __MiamiGetResOptions_WB(__MiamiBase) \
329 AROS_LC0(LONG, MiamiGetResOptions, \
330 struct Library *, (__MiamiBase), 51, Miami)
332 #define MiamiGetResOptions() \
333 __MiamiGetResOptions_WB(MiamiBase)
335 #define __MiamiSetResOptions_WB(__MiamiBase, __arg1) \
336 AROS_LC1NR(void, MiamiSetResOptions, \
337 AROS_LCA(LONG, (__arg1), D0), \
338 struct Library *, (__MiamiBase), 52, Miami)
340 #define MiamiSetResOptions(arg1) \
341 __MiamiSetResOptions_WB(MiamiBase, (arg1))
343 #define __sockatmark_WB(__MiamiBase, __arg1) \
344 AROS_LC1(LONG, sockatmark, \
345 AROS_LCA(LONG, (__arg1), D0), \
346 struct Library *, (__MiamiBase), 53, Miami)
348 #define sockatmark(arg1) \
349 __sockatmark_WB(MiamiBase, (arg1))
351 #define __MiamiSupportedCPUs_WB(__MiamiBase, __arg1, __arg2, __arg3) \
352 AROS_LC3NR(void, MiamiSupportedCPUs, \
353 AROS_LCA(ULONG *, (__arg1), A0), \
354 AROS_LCA(ULONG *, (__arg2), A1), \
355 AROS_LCA(ULONG *, (__arg3), A2), \
356 struct Library *, (__MiamiBase), 54, Miami)
358 #define MiamiSupportedCPUs(arg1, arg2, arg3) \
359 __MiamiSupportedCPUs_WB(MiamiBase, (arg1), (arg2), (arg3))
361 #define __MiamiGetFdCallback_WB(__MiamiBase, __arg1) \
362 AROS_LC1(LONG, MiamiGetFdCallback, \
363 AROS_LCA(void **, (__arg1), A0), \
364 struct Library *, (__MiamiBase), 55, Miami)
366 #define MiamiGetFdCallback(arg1) \
367 __MiamiGetFdCallback_WB(MiamiBase, (arg1))
369 #define __MiamiSetFdCallback_WB(__MiamiBase, __arg1, __arg2) \
370 AROS_LC2(LONG, MiamiSetFdCallback, \
371 AROS_LCA(void *, (__arg1), A0), \
372 AROS_LCA(LONG, (__arg2), D0), \
373 struct Library *, (__MiamiBase), 56, Miami)
375 #define MiamiSetFdCallback(arg1, arg2) \
376 __MiamiSetFdCallback_WB(MiamiBase, (arg1), (arg2))
378 #define __MiamiGetCredentials_WB(__MiamiBase) \
379 AROS_LC0(struct UserGroupCredentials *, MiamiGetCredentials, \
380 struct Library *, (__MiamiBase), 58, Miami)
382 #define MiamiGetCredentials() \
383 __MiamiGetCredentials_WB(MiamiBase)
385 #define __FindKernelVar_WB(__MiamiBase, __arg1) \
386 AROS_LC1(void *, FindKernelVar, \
387 AROS_LCA(STRPTR, (__arg1), A0), \
388 struct Library *, (__MiamiBase), 59, Miami)
390 #define FindKernelVar(arg1) \
391 __FindKernelVar_WB(MiamiBase, (arg1))
393 #endif /* DEFINES_MIAMI_PROTOS_H*/