Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / network / common / include / defines / bsdsocket.h
blob63bef9f9640b35a4a9b5baf6f4ca3ce4a5f6eff7
1 #ifndef DEFINES_BSDSOCKET_PROTOS_H
2 #define DEFINES_BSDSOCKET_PROTOS_H
4 /*
5 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 */
8 /*
9 Desc: Defines for bsdsocket
12 #include <aros/libcall.h>
13 #include <exec/types.h>
14 #include <aros/preprocessor/variadic/cast2iptr.hpp>
17 #define __socket_WB(__SocketBase, __arg1, __arg2, __arg3) \
18 AROS_LC3(int, socket, \
19 AROS_LCA(int,(__arg1),D0), \
20 AROS_LCA(int,(__arg2),D1), \
21 AROS_LCA(int,(__arg3),D2), \
22 struct Library *, (__SocketBase), 5, BSDSocket)
24 #define socket(arg1, arg2, arg3) \
25 __socket_WB(SocketBase, (arg1), (arg2), (arg3))
27 #define __bind_WB(__SocketBase, __arg1, __arg2, __arg3) \
28 AROS_LC3(int, bind, \
29 AROS_LCA(int,(__arg1),D0), \
30 AROS_LCA(struct sockaddr *,(__arg2),A0), \
31 AROS_LCA(int,(__arg3),D1), \
32 struct Library *, (__SocketBase), 6, BSDSocket)
34 #define bind(arg1, arg2, arg3) \
35 __bind_WB(SocketBase, (arg1), (arg2), (arg3))
37 #define __listen_WB(__SocketBase, __arg1, __arg2) \
38 AROS_LC2(int, listen, \
39 AROS_LCA(int,(__arg1),D0), \
40 AROS_LCA(int,(__arg2),D1), \
41 struct Library *, (__SocketBase), 7, BSDSocket)
43 #define listen(arg1, arg2) \
44 __listen_WB(SocketBase, (arg1), (arg2))
46 #define __accept_WB(__SocketBase, __arg1, __arg2, __arg3) \
47 AROS_LC3(int, accept, \
48 AROS_LCA(int,(__arg1),D0), \
49 AROS_LCA(struct sockaddr *,(__arg2),A0), \
50 AROS_LCA(socklen_t *,(__arg3),A1), \
51 struct Library *, (__SocketBase), 8, BSDSocket)
53 #define accept(arg1, arg2, arg3) \
54 __accept_WB(SocketBase, (arg1), (arg2), (arg3))
56 #define __connect_WB(__SocketBase, __arg1, __arg2, __arg3) \
57 AROS_LC3(int, connect, \
58 AROS_LCA(int,(__arg1),D0), \
59 AROS_LCA(struct sockaddr *,(__arg2),A0), \
60 AROS_LCA(int,(__arg3),D1), \
61 struct Library *, (__SocketBase), 9, BSDSocket)
63 #define connect(arg1, arg2, arg3) \
64 __connect_WB(SocketBase, (arg1), (arg2), (arg3))
66 #define __sendto_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \
67 AROS_LC6(int, sendto, \
68 AROS_LCA(int,(__arg1),D0), \
69 AROS_LCA(const void *,(__arg2),A0), \
70 AROS_LCA(int,(__arg3),D1), \
71 AROS_LCA(int,(__arg4),D2), \
72 AROS_LCA(const struct sockaddr *,(__arg5),A1), \
73 AROS_LCA(int,(__arg6),D3), \
74 struct Library *, (__SocketBase), 10, BSDSocket)
76 #define sendto(arg1, arg2, arg3, arg4, arg5, arg6) \
77 __sendto_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6))
79 #define __send_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
80 AROS_LC4(int, send, \
81 AROS_LCA(int,(__arg1),D0), \
82 AROS_LCA(const void *,(__arg2),A0), \
83 AROS_LCA(int,(__arg3),D1), \
84 AROS_LCA(int,(__arg4),D2), \
85 struct Library *, (__SocketBase), 11, BSDSocket)
87 #define send(arg1, arg2, arg3, arg4) \
88 __send_WB(SocketBase, (arg1), (arg2), (arg3), (arg4))
90 #define __recvfrom_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \
91 AROS_LC6(int, recvfrom, \
92 AROS_LCA(int,(__arg1),D0), \
93 AROS_LCA(void *,(__arg2),A0), \
94 AROS_LCA(int,(__arg3),D1), \
95 AROS_LCA(int,(__arg4),D2), \
96 AROS_LCA(struct sockaddr *,(__arg5),A1), \
97 AROS_LCA(int *,(__arg6),A2), \
98 struct Library *, (__SocketBase), 12, BSDSocket)
100 #define recvfrom(arg1, arg2, arg3, arg4, arg5, arg6) \
101 __recvfrom_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6))
103 #define __recv_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
104 AROS_LC4(int, recv, \
105 AROS_LCA(int,(__arg1),D0), \
106 AROS_LCA(void *,(__arg2),A0), \
107 AROS_LCA(int,(__arg3),D1), \
108 AROS_LCA(int,(__arg4),D2), \
109 struct Library *, (__SocketBase), 13, BSDSocket)
111 #define recv(arg1, arg2, arg3, arg4) \
112 __recv_WB(SocketBase, (arg1), (arg2), (arg3), (arg4))
114 #define __shutdown_WB(__SocketBase, __arg1, __arg2) \
115 AROS_LC2(int, shutdown, \
116 AROS_LCA(int,(__arg1),D0), \
117 AROS_LCA(int,(__arg2),D1), \
118 struct Library *, (__SocketBase), 14, BSDSocket)
120 #define shutdown(arg1, arg2) \
121 __shutdown_WB(SocketBase, (arg1), (arg2))
123 #define __setsockopt_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5) \
124 AROS_LC5(int, setsockopt, \
125 AROS_LCA(int,(__arg1),D0), \
126 AROS_LCA(int,(__arg2),D1), \
127 AROS_LCA(int,(__arg3),D2), \
128 AROS_LCA(void *,(__arg4),A0), \
129 AROS_LCA(int,(__arg5),D3), \
130 struct Library *, (__SocketBase), 15, BSDSocket)
132 #define setsockopt(arg1, arg2, arg3, arg4, arg5) \
133 __setsockopt_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5))
135 #define __getsockopt_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5) \
136 AROS_LC5(int, getsockopt, \
137 AROS_LCA(int,(__arg1),D0), \
138 AROS_LCA(int,(__arg2),D1), \
139 AROS_LCA(int,(__arg3),D2), \
140 AROS_LCA(void *,(__arg4),A0), \
141 AROS_LCA(void *,(__arg5),A1), \
142 struct Library *, (__SocketBase), 16, BSDSocket)
144 #define getsockopt(arg1, arg2, arg3, arg4, arg5) \
145 __getsockopt_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5))
147 #define __getsockname_WB(__SocketBase, __arg1, __arg2, __arg3) \
148 AROS_LC3(int, getsockname, \
149 AROS_LCA(int,(__arg1),D0), \
150 AROS_LCA(struct sockaddr *,(__arg2),A0), \
151 AROS_LCA(int *,(__arg3),A1), \
152 struct Library *, (__SocketBase), 17, BSDSocket)
154 #define getsockname(arg1, arg2, arg3) \
155 __getsockname_WB(SocketBase, (arg1), (arg2), (arg3))
157 #define __getpeername_WB(__SocketBase, __arg1, __arg2, __arg3) \
158 AROS_LC3(int, getpeername, \
159 AROS_LCA(int,(__arg1),D0), \
160 AROS_LCA(struct sockaddr *,(__arg2),A0), \
161 AROS_LCA(int *,(__arg3),A1), \
162 struct Library *, (__SocketBase), 18, BSDSocket)
164 #define getpeername(arg1, arg2, arg3) \
165 __getpeername_WB(SocketBase, (arg1), (arg2), (arg3))
167 #define __IoctlSocket_WB(__SocketBase, __arg1, __arg2, __arg3) \
168 AROS_LC3(int, IoctlSocket, \
169 AROS_LCA(int,(__arg1),D0), \
170 AROS_LCA(unsigned long,(__arg2),D1), \
171 AROS_LCA(char *,(__arg3),A0), \
172 struct Library *, (__SocketBase), 19, BSDSocket)
174 #define IoctlSocket(arg1, arg2, arg3) \
175 __IoctlSocket_WB(SocketBase, (arg1), (arg2), (arg3))
177 #define __CloseSocket_WB(__SocketBase, __arg1) \
178 AROS_LC1(int, CloseSocket, \
179 AROS_LCA(int,(__arg1),D0), \
180 struct Library *, (__SocketBase), 20, BSDSocket)
182 #define CloseSocket(arg1) \
183 __CloseSocket_WB(SocketBase, (arg1))
185 #define __WaitSelect_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \
186 AROS_LC6(int, WaitSelect, \
187 AROS_LCA(int,(__arg1),D0), \
188 AROS_LCA(fd_set *,(__arg2),A0), \
189 AROS_LCA(fd_set *,(__arg3),A1), \
190 AROS_LCA(fd_set *,(__arg4),A2), \
191 AROS_LCA(struct timeval *,(__arg5),A3), \
192 AROS_LCA(ULONG *,(__arg6),D1), \
193 struct Library *, (__SocketBase), 21, BSDSocket)
195 #define WaitSelect(arg1, arg2, arg3, arg4, arg5, arg6) \
196 __WaitSelect_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6))
198 #define __SetSocketSignals_WB(__SocketBase, __arg1, __arg2, __arg3) \
199 AROS_LC3NR(void, SetSocketSignals, \
200 AROS_LCA(ULONG,(__arg1),D0), \
201 AROS_LCA(ULONG,(__arg2),D1), \
202 AROS_LCA(ULONG,(__arg3),D2), \
203 struct Library *, (__SocketBase), 22, BSDSocket)
205 #define SetSocketSignals(arg1, arg2, arg3) \
206 __SetSocketSignals_WB(SocketBase, (arg1), (arg2), (arg3))
208 #define __getdtablesize_WB(__SocketBase) \
209 AROS_LC0(int, getdtablesize, \
210 struct Library *, (__SocketBase), 23, BSDSocket)
212 #define getdtablesize() \
213 __getdtablesize_WB(SocketBase)
215 #define __ObtainSocket_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
216 AROS_LC4(LONG, ObtainSocket, \
217 AROS_LCA(LONG,(__arg1),D0), \
218 AROS_LCA(LONG,(__arg2),D1), \
219 AROS_LCA(LONG,(__arg3),D2), \
220 AROS_LCA(LONG,(__arg4),D3), \
221 struct Library *, (__SocketBase), 24, BSDSocket)
223 #define ObtainSocket(arg1, arg2, arg3, arg4) \
224 __ObtainSocket_WB(SocketBase, (arg1), (arg2), (arg3), (arg4))
226 #define __ReleaseSocket_WB(__SocketBase, __arg1, __arg2) \
227 AROS_LC2(LONG, ReleaseSocket, \
228 AROS_LCA(LONG,(__arg1),D0), \
229 AROS_LCA(LONG,(__arg2),D1), \
230 struct Library *, (__SocketBase), 25, BSDSocket)
232 #define ReleaseSocket(arg1, arg2) \
233 __ReleaseSocket_WB(SocketBase, (arg1), (arg2))
235 #define __ReleaseCopyOfSocket_WB(__SocketBase, __arg1, __arg2) \
236 AROS_LC2(LONG, ReleaseCopyOfSocket, \
237 AROS_LCA(LONG,(__arg1),D0), \
238 AROS_LCA(LONG,(__arg2),D1), \
239 struct Library *, (__SocketBase), 26, BSDSocket)
241 #define ReleaseCopyOfSocket(arg1, arg2) \
242 __ReleaseCopyOfSocket_WB(SocketBase, (arg1), (arg2))
244 #define __Errno_WB(__SocketBase) \
245 AROS_LC0(LONG, Errno, \
246 struct Library *, (__SocketBase), 27, BSDSocket)
248 #define Errno() \
249 __Errno_WB(SocketBase)
251 #define __SetErrnoPtr_WB(__SocketBase, __arg1, __arg2) \
252 AROS_LC2NR(void, SetErrnoPtr, \
253 AROS_LCA(void *,(__arg1),A0), \
254 AROS_LCA(int,(__arg2),D0), \
255 struct Library *, (__SocketBase), 28, BSDSocket)
257 #define SetErrnoPtr(arg1, arg2) \
258 __SetErrnoPtr_WB(SocketBase, (arg1), (arg2))
260 #define __Inet_NtoA_WB(__SocketBase, __arg1) \
261 AROS_LC1(char *, Inet_NtoA, \
262 AROS_LCA(unsigned long,(__arg1),D0), \
263 struct Library *, (__SocketBase), 29, BSDSocket)
265 #define Inet_NtoA(arg1) \
266 __Inet_NtoA_WB(SocketBase, (arg1))
268 #if !defined(NO_INLINE_STDARG) && !defined(BSDSOCKET_NO_INLINE_STDARG)
269 #define Inet_Nto(...) \
270 ({ \
271 IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
272 Inet_NtoA((unsigned long)__args); \
274 #endif /* !NO_INLINE_STDARG */
276 #define __inet_addr_WB(__SocketBase, __arg1) \
277 AROS_LC1(unsigned long, inet_addr, \
278 AROS_LCA(const char *,(__arg1),A0), \
279 struct Library *, (__SocketBase), 30, BSDSocket)
281 #define inet_addr(arg1) \
282 __inet_addr_WB(SocketBase, (arg1))
284 #define __Inet_LnaOf_WB(__SocketBase, __arg1) \
285 AROS_LC1(unsigned long, Inet_LnaOf, \
286 AROS_LCA(unsigned long,(__arg1),D0), \
287 struct Library *, (__SocketBase), 31, BSDSocket)
289 #define Inet_LnaOf(arg1) \
290 __Inet_LnaOf_WB(SocketBase, (arg1))
292 #define __Inet_NetOf_WB(__SocketBase, __arg1) \
293 AROS_LC1(unsigned long, Inet_NetOf, \
294 AROS_LCA(unsigned long,(__arg1),D0), \
295 struct Library *, (__SocketBase), 32, BSDSocket)
297 #define Inet_NetOf(arg1) \
298 __Inet_NetOf_WB(SocketBase, (arg1))
300 #define __Inet_MakeAddr_WB(__SocketBase, __arg1, __arg2) \
301 AROS_LC2(unsigned long, Inet_MakeAddr, \
302 AROS_LCA(int,(__arg1),D0), \
303 AROS_LCA(int,(__arg2),D1), \
304 struct Library *, (__SocketBase), 33, BSDSocket)
306 #define Inet_MakeAddr(arg1, arg2) \
307 __Inet_MakeAddr_WB(SocketBase, (arg1), (arg2))
309 #define __inet_network_WB(__SocketBase, __arg1) \
310 AROS_LC1(unsigned long, inet_network, \
311 AROS_LCA(const char *,(__arg1),A0), \
312 struct Library *, (__SocketBase), 34, BSDSocket)
314 #define inet_network(arg1) \
315 __inet_network_WB(SocketBase, (arg1))
317 #define __gethostbyname_WB(__SocketBase, __arg1) \
318 AROS_LC1(struct hostent *, gethostbyname, \
319 AROS_LCA(const char *,(__arg1),A0), \
320 struct Library *, (__SocketBase), 35, BSDSocket)
322 #define gethostbyname(arg1) \
323 __gethostbyname_WB(SocketBase, (arg1))
325 #define __gethostbyaddr_WB(__SocketBase, __arg1, __arg2, __arg3) \
326 AROS_LC3(struct hostent *, gethostbyaddr, \
327 AROS_LCA(const void *,(__arg1),A0), \
328 AROS_LCA(int,(__arg2),D0), \
329 AROS_LCA(int,(__arg3),D1), \
330 struct Library *, (__SocketBase), 36, BSDSocket)
332 #define gethostbyaddr(arg1, arg2, arg3) \
333 __gethostbyaddr_WB(SocketBase, (arg1), (arg2), (arg3))
335 #define __getnetbyname_WB(__SocketBase, __arg1) \
336 AROS_LC1(struct netent *, getnetbyname, \
337 AROS_LCA(char *,(__arg1),A0), \
338 struct Library *, (__SocketBase), 37, BSDSocket)
340 #define getnetbyname(arg1) \
341 __getnetbyname_WB(SocketBase, (arg1))
343 #define __getnetbyaddr_WB(__SocketBase, __arg1, __arg2) \
344 AROS_LC2(struct netent *, getnetbyaddr, \
345 AROS_LCA(long,(__arg1),D0), \
346 AROS_LCA(int,(__arg2),D1), \
347 struct Library *, (__SocketBase), 38, BSDSocket)
349 #define getnetbyaddr(arg1, arg2) \
350 __getnetbyaddr_WB(SocketBase, (arg1), (arg2))
352 #define __getservbyname_WB(__SocketBase, __arg1, __arg2) \
353 AROS_LC2(struct servent *, getservbyname, \
354 AROS_LCA(char *,(__arg1),A0), \
355 AROS_LCA(char *,(__arg2),A1), \
356 struct Library *, (__SocketBase), 39, BSDSocket)
358 #define getservbyname(arg1, arg2) \
359 __getservbyname_WB(SocketBase, (arg1), (arg2))
361 #define __getservbyport_WB(__SocketBase, __arg1, __arg2) \
362 AROS_LC2(struct servent *, getservbyport, \
363 AROS_LCA(int,(__arg1),D0), \
364 AROS_LCA(char *,(__arg2),A0), \
365 struct Library *, (__SocketBase), 40, BSDSocket)
367 #define getservbyport(arg1, arg2) \
368 __getservbyport_WB(SocketBase, (arg1), (arg2))
370 #define __getprotobyname_WB(__SocketBase, __arg1) \
371 AROS_LC1(struct protoent *, getprotobyname, \
372 AROS_LCA(char *,(__arg1),A0), \
373 struct Library *, (__SocketBase), 41, BSDSocket)
375 #define getprotobyname(arg1) \
376 __getprotobyname_WB(SocketBase, (arg1))
378 #define __getprotobynumber_WB(__SocketBase, __arg1) \
379 AROS_LC1(struct protoent *, getprotobynumber, \
380 AROS_LCA(int,(__arg1),D0), \
381 struct Library *, (__SocketBase), 42, BSDSocket)
383 #define getprotobynumber(arg1) \
384 __getprotobynumber_WB(SocketBase, (arg1))
386 #define __vsyslog_WB(__SocketBase, __arg1, __arg2, __arg3) \
387 AROS_LC3NR(void, vsyslog, \
388 AROS_LCA(int,(__arg1),D0), \
389 AROS_LCA(const char *,(__arg2),A0), \
390 AROS_LCA(IPTR *,(__arg3),A1), \
391 struct Library *, (__SocketBase), 43, BSDSocket)
393 #define vsyslog(arg1, arg2, arg3) \
394 __vsyslog_WB(SocketBase, (arg1), (arg2), (arg3))
396 #if !defined(NO_INLINE_STDARG) && !defined(BSDSOCKET_NO_INLINE_STDARG)
397 #define syslog(arg1, arg2, ...) \
398 ({ \
399 IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
400 vsyslog(arg1, arg2, __args); \
402 #endif /* !NO_INLINE_STDARG */
405 #define __Dup2Socket_WB(__SocketBase, __arg1, __arg2) \
406 AROS_LC2(int, Dup2Socket, \
407 AROS_LCA(int,(__arg1),D0), \
408 AROS_LCA(int,(__arg2),D1), \
409 struct Library *, (__SocketBase), 44, BSDSocket)
411 #define Dup2Socket(arg1, arg2) \
412 __Dup2Socket_WB(SocketBase, (arg1), (arg2))
414 #define __sendmsg_WB(__SocketBase, __arg1, __arg2, __arg3) \
415 AROS_LC3(int, sendmsg, \
416 AROS_LCA(int,(__arg1),D0), \
417 AROS_LCA(const struct msghdr *,(__arg2),A0), \
418 AROS_LCA(int,(__arg3),D1), \
419 struct Library *, (__SocketBase), 45, BSDSocket)
421 #define sendmsg(arg1, arg2, arg3) \
422 __sendmsg_WB(SocketBase, (arg1), (arg2), (arg3))
424 #define __recvmsg_WB(__SocketBase, __arg1, __arg2, __arg3) \
425 AROS_LC3(int, recvmsg, \
426 AROS_LCA(int,(__arg1),D0), \
427 AROS_LCA(struct msghdr *,(__arg2),A0), \
428 AROS_LCA(int,(__arg3),D1), \
429 struct Library *, (__SocketBase), 46, BSDSocket)
431 #define recvmsg(arg1, arg2, arg3) \
432 __recvmsg_WB(SocketBase, (arg1), (arg2), (arg3))
434 #define __gethostname_WB(__SocketBase, __arg1, __arg2) \
435 AROS_LC2(int, gethostname, \
436 AROS_LCA(char *,(__arg1),A0), \
437 AROS_LCA(int,(__arg2),D0), \
438 struct Library *, (__SocketBase), 47, BSDSocket)
440 #define gethostname(arg1, arg2) \
441 __gethostname_WB(SocketBase, (arg1), (arg2))
443 #define __gethostid_WB(__SocketBase) \
444 AROS_LC0(long, gethostid, \
445 struct Library *, (__SocketBase), 48, BSDSocket)
447 #define gethostid() \
448 __gethostid_WB(SocketBase)
450 #define __SocketBaseTagList_WB(__SocketBase, __arg1) \
451 AROS_LC1(ULONG, SocketBaseTagList, \
452 AROS_LCA(struct TagItem *,(__arg1),A0), \
453 struct Library *, (__SocketBase), 49, BSDSocket)
455 #define SocketBaseTagList(arg1) \
456 __SocketBaseTagList_WB(SocketBase, (arg1))
458 #if !defined(NO_INLINE_STDARG) && !defined(BSDSOCKET_NO_INLINE_STDARG)
459 #define SocketBaseTags(...) \
460 ({ \
461 IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
462 SocketBaseTagList((struct TagItem *)__args); \
464 #endif /* !NO_INLINE_STDARG */
466 #define __GetSocketEvents_WB(__SocketBase, __arg1) \
467 AROS_LC1(LONG, GetSocketEvents, \
468 AROS_LCA(ULONG *,(__arg1),A0), \
469 struct Library *, (__SocketBase), 50, BSDSocket)
471 #define GetSocketEvents(arg1) \
472 __GetSocketEvents_WB(SocketBase, (arg1))
474 #if defined(__CONFIG_ROADSHOW__)
476 /* RoadShow Extensions .. */
478 #define __bpf_open_WB(__SocketBase, __arg1) \
479 AROS_LC1(long, bpf_open, \
480 AROS_LCA(long, (__arg1), D0), \
481 struct Library *, (__SocketBase), 61, BSDSocket)
483 #define bpf_open(arg1) \
484 __bpf_open_WB(SocketBase, (arg1))
486 #define __bpf_close_WB(__SocketBase, __arg1) \
487 AROS_LC1(long, bpf_close, \
488 AROS_LCA(long, (__arg1), D0), \
489 struct Library *, (__SocketBase), 62, BSDSocket)
491 #define bpf_close(arg1) \
492 __bpf_close_WB(SocketBase, (arg1))
494 #define __bpf_read_WB(__SocketBase, __arg1, __arg2, __arg3) \
495 AROS_LC3(long, bpf_read, \
496 AROS_LCA(long, (__arg1), D0), \
497 AROS_LCA(void *, (__arg2), A0), \
498 AROS_LCA(long, (__arg3), D1), \
499 struct Library *, (__SocketBase), 63, BSDSocket)
501 #define bpf_read(arg1, arg2, arg3) \
502 __bpf_read_WB(SocketBase, arg1, arg2, arg3)
504 #define __bpf_write_WB(__SocketBase, __arg1, __arg2, __arg3) \
505 AROS_LC3(long, bpf_write, \
506 AROS_LCA(long, (__arg1), D0), \
507 AROS_LCA(void *, (__arg2), A0), \
508 AROS_LCA(long, (__arg3), D1), \
509 struct Library *, (__SocketBase), 64, BSDSocket)
511 #define bpf_write(arg1, arg2, arg3) \
512 __bpf_write_WB(SocketBase, arg1, arg2, arg3)
514 #define __bpf_set_notify_mask_WB(__SocketBase, __arg1, __arg2) \
515 AROS_LC2(long, bpf_set_notify_mask, \
516 AROS_LCA(long, (__arg1), D0), \
517 AROS_LCA(unsigned long, (__arg2), D1), \
518 struct Library *, (__SocketBase), 65, BSDSocket)
520 #define bpf_set_notify_mask(arg1, arg2) \
521 __bpf_set_notify_mask_WB(SocketBase, arg1, arg2)
523 #define __bpf_set_interrupt_mask_WB(__SocketBase, __arg1, __arg2) \
524 AROS_LC2(long, bpf_set_interrupt_mask, \
525 AROS_LCA(long, (__arg1), D0), \
526 AROS_LCA(unsigned long, (__arg2), D1), \
527 struct Library *, (__SocketBase), 66, BSDSocket)
529 #define bpf_set_interrupt_mask(arg1, arg2) \
530 __bpf_set_interrupt_mask_WB(SocketBase, arg1, arg2)
532 #define __bpf_ioctl_WB(__SocketBase, __arg1, __arg2, __arg3) \
533 AROS_LC3(long, bpf_ioctl, \
534 AROS_LCA(long, (__arg1), D0), \
535 AROS_LCA(unsigned long, (__arg2), D1), \
536 AROS_LCA(char *, (__arg3), A0), \
537 struct Library *, (__SocketBase), 67, BSDSocket)
539 #define bpf_ioctl(arg1, arg2, arg3) \
540 __bpf_ioctl_WB(SocketBase, arg1, arg2, arg3)
542 #define __bpf_data_waiting_WB(__SocketBase, __arg1) \
543 AROS_LC1(long, bpf_data_waiting, \
544 AROS_LCA(long, (__arg1), D0), \
545 struct Library *, (__SocketBase), 68, BSDSocket)
547 #define bpf_data_waiting(arg1) \
548 __bpf_data_waiting_WB(SocketBase, arg1)
550 #define __AddRouteTagList_WB(__SocketBase, __arg1) \
551 AROS_LC1(long, AddRouteTagList, \
552 AROS_LCA(struct TagItem *, (__arg1), A0), \
553 struct Library *, (__SocketBase), 69, BSDSocket)
555 #define AddRouteTagList(arg1) \
556 __AddRouteTagList_WB(SocketBase, arg1)
558 #define __DeleteRouteTagList_WB(__SocketBase, __arg1) \
559 AROS_LC1(long, DeleteRouteTagList, \
560 AROS_LCA(struct TagItem *, (__arg1), A0), \
561 struct Library *, (__SocketBase), 70, BSDSocket)
563 #define DeleteRouteTagList(arg1) \
564 __DeleteRouteTagList_WB(SocketBase, arg1)
566 #define __ChangeRouteTagList_WB(__SocketBase, __arg1) \
567 AROS_LC1(long, ChangeRouteTagList, \
568 AROS_LCA(struct TagItem *, (__arg1), A0), \
569 struct Library *, (__SocketBase), 71, BSDSocket)
571 #define ChangeRouteTagList(arg1) \
572 __ChangeRouteTagList_WB(SocketBase, arg1)
574 #define __FreeRouteInfo_WB(__SocketBase, __arg1) \
575 AROS_LC1NR(void, FreeRouteInfo, \
576 AROS_LCA(struct rt_msghdr *, (__arg1), A0), \
577 struct Library *, (__SocketBase), 72, BSDSocket)
579 #define FreeRouteInfo(arg1) \
580 __FreeRouteInfo_WB(SocketBase, arg1)
582 #define __GetRouteInfo_WB(__SocketBase, __arg1, __arg2) \
583 AROS_LC2(struct rt_msghdr *, GetRouteInfo, \
584 AROS_LCA(LONG, (__arg1), D0), \
585 AROS_LCA(LONG, (__arg2), D1), \
586 struct Library *, (__SocketBase), 73, BSDSocket)
588 #define GetRouteInfo(arg1, arg2) \
589 __GetRouteInfo_WB(SocketBase, arg1, arg2)
591 #define __AddInterfaceTagList_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
592 AROS_LC4(long, AddInterfaceTagList, \
593 AROS_LCA(STRPTR, (__arg1), A0), \
594 AROS_LCA(STRPTR, (__arg2), A1), \
595 AROS_LCA(long, (__arg3), D0), \
596 AROS_LCA(struct TagItem *, (__arg4), A2), \
597 struct Library *, (__SocketBase), 74, BSDSocket)
599 #define AddInterfaceTagList(arg1, arg2, arg3, arg4) \
600 __AddInterfaceTagList_WB(SocketBase, arg1, arg2, arg3, arg4)
602 #define __ConfigureInterfaceTagList_WB(__SocketBase, __arg1, __arg2) \
603 AROS_LC2(long, ConfigureInterfaceTagList, \
604 AROS_LCA(STRPTR, (__arg1), A0), \
605 AROS_LCA(struct TagItem *, (__arg2), A1), \
606 struct Library *, (__SocketBase), 75, BSDSocket)
608 #define ConfigureInterfaceTagList(arg1, arg2) \
609 __ConfigureInterfaceTagList_WB(SocketBase, arg1, arg2)
611 #define __ReleaseInterfaceList_WB(__SocketBase, __arg1) \
612 AROS_LC1NR(void, ReleaseInterfaceList, \
613 AROS_LCA(struct List *, (__arg1), A0), \
614 struct Library *, (__SocketBase), 76, BSDSocket)
616 #define ReleaseInterfaceList(arg1) \
617 __ReleaseInterfaceList_WB(SocketBase, arg1)
619 #define __ObtainInterfaceList_WB(__SocketBase) \
620 AROS_LC0(struct List *, ObtainInterfaceList, \
621 struct Library *, (__SocketBase), 77, BSDSocket)
623 #define ObtainInterfaceList() \
624 __ObtainInterfaceList_WB(SocketBase)
626 #define __QueryInterfaceTagList_WB(__SocketBase, __arg1, __arg2) \
627 AROS_LC2(long, QueryInterfaceTagList, \
628 AROS_LCA(STRPTR, (__arg1), A0), \
629 AROS_LCA(struct TagItem *, (__arg2), A1), \
630 struct Library *, (__SocketBase), 78, BSDSocket)
632 #define QueryInterfaceTagList(arg1, arg2) \
633 __QueryInterfaceTagList_WB(SocketBase, (arg1), (arg2))
635 #define __CreateAddrAllocMessageA_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5) \
636 AROS_LC5(LONG, CreateAddrAllocMessageA, \
637 AROS_LCA(LONG, (__arg1), D0), \
638 AROS_LCA(LONG, (__arg2), D1), \
639 AROS_LCA(STRPTR, (__arg3), A0), \
640 AROS_LCA(struct AddressAllocationMessage *, (__arg4), A1), \
641 AROS_LCA(struct TagItem *, (__arg5), A2), \
642 struct Library *, (__SocketBase), 79, BSDSocket)
644 #define CreateAddrAllocMessageA(arg1, arg2, arg3, arg4, arg5) \
645 __CreateAddrAllocMessageA(SocketBase, arg1, arg2, arg3, arg4, arg5)
647 #define __DeleteAddrAllocMessage_WB(__SocketBase, __arg1) \
648 AROS_LC1NR(void, DeleteAddrAllocMessage, \
649 AROS_LCA(struct AddressAllocationMessage *, (__arg1), A0), \
650 struct Library *, (__SocketBase), 80, BSDSocket)
652 #define DeleteAddrAllocMessage(arg1) \
653 __DeleteAddrAllocMessage_WB(SocketBase, arg1)
655 #define __BeginInterfaceConfig_WB(__SocketBase, __arg1) \
656 AROS_LC1NR(void, BeginInterfaceConfig, \
657 AROS_LCA(struct AddressAllocationMessage *, (__arg1), A0), \
658 struct Library *, (__SocketBase), 81, BSDSocket)
660 #define BeginInterfaceConfig(arg1) \
661 __BeginInterfaceConfig_WB(SocketBase, arg1)
663 #define __AbortInterfaceConfig_WB(__SocketBase, __arg1) \
664 AROS_LC1NR(void, AbortInterfaceConfig, \
665 AROS_LCA(struct AddressAllocationMessage *, (__arg1), A0), \
666 struct Library *, (__SocketBase), 82, BSDSocket)
668 #define AbortInterfaceConfig(arg1) \
669 __AbortInterfaceConfig_WB(SocketBase, arg1)
671 #define __AddNetMonitorHookTagList_WB(__SocketBase, __arg1, __arg2, __arg3) \
672 AROS_LC3(long, AddNetMonitorHookTagList, \
673 AROS_LCA(long, (__arg1), D0), \
674 AROS_LCA(struct Hook *, (__arg2), A0), \
675 AROS_LCA(struct TagItem *, (__arg3), A1), \
676 struct Library *, (__SocketBase), 83, BSDSocket)
678 #define AddNetMonitorHookTagList(arg1, arg2, arg3) \
679 __AddNetMonitorHookTagList_WB(SocketBase, arg1, arg2, arg3)
681 #define __RemoveNetMonitorHook_WB(__SocketBase, __arg1) \
682 AROS_LC1NR(void, RemoveNetMonitorHook, \
683 AROS_LCA(struct Hook *, (__arg1), A0), \
684 struct Library *, (__SocketBase), 84, BSDSocket)
686 #define RemoveNetMonitorHook(arg1) \
687 __RemoveNetMonitorHook_WB(SocketBase, arg1)
689 #define __GetNetworkStatistics_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
690 AROS_LC4(LONG, GetNetworkStatistics, \
691 AROS_LCA(LONG, (__arg1), D0), \
692 AROS_LCA(LONG, (__arg2), D1), \
693 AROS_LCA(APTR, (__arg3), A0), \
694 AROS_LCA(LONG, (__arg4), D2), \
695 struct Library *, (__SocketBase), 85, BSDSocket)
697 #define GetNetworkStatistics(arg1, arg2, arg3, arg4) \
698 __GetNetworkStatistics_WB(SocketBase, arg1, arg2, arg3, arg4)
700 #define __AddDomainNameServer_WB(__SocketBase, __arg1) \
701 AROS_LC1(LONG, AddDomainNameServer, \
702 AROS_LCA(STRPTR, (__arg1), A0), \
703 struct Library *, (__SocketBase), 86, BSDSocket)
705 #define AddDomainNameServer(arg1) \
706 __AddDomainNameServer_WB(SocketBase, arg1)
708 #define __RemoveDomainNameServer_WB(__SocketBase, __arg1) \
709 AROS_LC1(LONG, RemoveDomainNameServer, \
710 AROS_LCA(STRPTR, (__arg1), A0), \
711 struct Library *, (__SocketBase), 87, BSDSocket)
713 #define RemoveDomainNameServer(arg1) \
714 __RemoveDomainNameServer_WB(SocketBase, arg1)
716 #define __ReleaseDomainNameServerList_WB(__SocketBase, __arg1) \
717 AROS_LC1NR(void, ReleaseDomainNameServerList, \
718 AROS_LCA(struct List *, (__arg1), A0), \
719 struct Library *, (__SocketBase), 88, BSDSocket)
721 #define ReleaseDomainNameServerList(arg1) \
722 __ReleaseDomainNameServerList_WB(SocketBase, arg1)
724 #define __ObtainDomainNameServerList_WB(__SocketBase) \
725 AROS_LC0(struct List *, ObtainDomainNameServerList, \
726 struct Library *, (__SocketBase), 89, BSDSocket)
728 #define ObtainDomainNameServerList() \
729 __ObtainDomainNameServerList_WB(SocketBase)
731 #define __setnetent_WB(__SocketBase, __arg1) \
732 AROS_LC1NR(void, setnetent, \
733 AROS_LCA(int, (__arg1), D0), \
734 struct Library *, (__SocketBase), 90, BSDSocket)
736 #define setnetent(arg1) \
737 __setnetent_WB(SocketBase, arg1)
739 #define __endnetent_WB(__SocketBase) \
740 AROS_LC0NR(void, endnetent, \
741 struct Library *, (__SocketBase), 91, BSDSocket)
743 #define endnetent() \
744 __endnetent_WB(SocketBase)
746 #define __getnetent_WB(__SocketBase) \
747 AROS_LC0(struct netent *, getnetent, \
748 struct Library *, (__SocketBase), 92, BSDSocket)
750 #define getnetent() \
751 __getnetent_WB(SocketBase)
753 #define __setprotoent_WB(__SocketBase, __arg1) \
754 AROS_LC1NR(void, setprotoent, \
755 AROS_LCA(int, (__arg1), D0), \
756 struct Library *, (__SocketBase), 93, BSDSocket)
758 #define setprotoent(__arg1) \
759 __setprotoent__WB(SocketBase, __arg1)
761 #define __endprotoent_WB(__SocketBase) \
762 AROS_LC0NR(void, endprotoent, \
763 struct Library *, (__SocketBase), 94, BSDSocket)
765 #define endprotoent() \
766 __endprotoent_WB(SocketBase)
768 #define __getprotoent_WB(__SocketBase) \
769 AROS_LC0(struct protoent *, getprotoent, \
770 struct Library *, (__SocketBase), 95, BSDSocket)
772 #define getprotoent() \
773 __getprotoent_WB(SocketBase)
775 #define __setservent_WB(__SocketBase, __arg1) \
776 AROS_LC1NR(void, setservent, \
777 AROS_LCA(int, (__arg1), D0), \
778 struct Library *, (__SocketBase), 96, BSDSocket)
780 #define setservent(arg1) \
781 __setservent_WB(SocketBase, arg1)
783 #define __endservent_WB(__SocketBase) \
784 AROS_LC0NR(void, endservent, \
785 struct Library *, (__SocketBase), 97, BSDSocket)
787 #define endservent() \
788 __endservent_WB(SocketBase)
790 #define __getservent_WB(__SocketBase) \
791 AROS_LC0(struct servent *, getservent, \
792 struct Library *, (__SocketBase), 98, BSDSocket)
794 #define getservent() \
795 __getservent_WB(SocketBase)
797 #define __inet_aton_WB(__SocketBase, __arg1, __arg2) \
798 AROS_LC2(LONG, inet_aton, \
799 AROS_LCA(CONST_STRPTR,(__arg1),A0), \
800 AROS_LCA(struct in_addr *,(__arg2),A1), \
801 struct Library *, (__SocketBase), 99, BSDSocket)
803 #define inet_aton(arg1, arg2) \
804 __inet_aton_WB(SocketBase, (arg1), (arg2))
806 #endif /* __CONFIG_ROADSHOW__ */
807 #endif /* DEFINES_BSDSOCKET_PROTOS_H*/