1 #ifndef DEFINES_BSDSOCKET_PROTOS_H
2 #define DEFINES_BSDSOCKET_PROTOS_H
5 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
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) \
29 AROS_LCA(int,(__arg1),D0), \
30 AROS_LCA(struct sockaddr *,(__arg2),A0), \
31 AROS_LCA(socklen_t,(__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)
54 #define accept(arg1, arg2, arg3) \
55 __accept_WB(SocketBase, (arg1), (arg2), (arg3))
58 #define __connect_WB(__SocketBase, __arg1, __arg2, __arg3) \
59 AROS_LC3(int, connect, \
60 AROS_LCA(int,(__arg1),D0), \
61 AROS_LCA(struct sockaddr *,(__arg2),A0), \
62 AROS_LCA(socklen_t,(__arg3),D1), \
63 struct Library *, (__SocketBase), 9, BSDSocket)
66 #define connect(arg1, arg2, arg3) \
67 __connect_WB(SocketBase, (arg1), (arg2), (arg3))
70 #define __sendto_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \
71 AROS_LC6(int, sendto, \
72 AROS_LCA(int,(__arg1),D0), \
73 AROS_LCA(const void *,(__arg2),A0), \
74 AROS_LCA(int,(__arg3),D1), \
75 AROS_LCA(int,(__arg4),D2), \
76 AROS_LCA(const struct sockaddr *,(__arg5),A1), \
77 AROS_LCA(socklen_t,(__arg6),D3), \
78 struct Library *, (__SocketBase), 10, BSDSocket)
81 #define sendto(arg1, arg2, arg3, arg4, arg5, arg6) \
82 __sendto_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6))
85 #define __send_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
87 AROS_LCA(int,(__arg1),D0), \
88 AROS_LCA(const void *,(__arg2),A0), \
89 AROS_LCA(int,(__arg3),D1), \
90 AROS_LCA(int,(__arg4),D2), \
91 struct Library *, (__SocketBase), 11, BSDSocket)
94 #define send(arg1, arg2, arg3, arg4) \
95 __send_WB(SocketBase, (arg1), (arg2), (arg3), (arg4))
98 #define __recvfrom_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \
99 AROS_LC6(int, recvfrom, \
100 AROS_LCA(int,(__arg1),D0), \
101 AROS_LCA(void *,(__arg2),A0), \
102 AROS_LCA(int,(__arg3),D1), \
103 AROS_LCA(int,(__arg4),D2), \
104 AROS_LCA(struct sockaddr *,(__arg5),A1), \
105 AROS_LCA(socklen_t *,(__arg6),A2), \
106 struct Library *, (__SocketBase), 12, BSDSocket)
109 #define recvfrom(arg1, arg2, arg3, arg4, arg5, arg6) \
110 __recvfrom_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6))
113 #define __recv_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
114 AROS_LC4(int, recv, \
115 AROS_LCA(int,(__arg1),D0), \
116 AROS_LCA(void *,(__arg2),A0), \
117 AROS_LCA(int,(__arg3),D1), \
118 AROS_LCA(int,(__arg4),D2), \
119 struct Library *, (__SocketBase), 13, BSDSocket)
122 #define recv(arg1, arg2, arg3, arg4) \
123 __recv_WB(SocketBase, (arg1), (arg2), (arg3), (arg4))
126 #define __shutdown_WB(__SocketBase, __arg1, __arg2) \
127 AROS_LC2(int, shutdown, \
128 AROS_LCA(int,(__arg1),D0), \
129 AROS_LCA(int,(__arg2),D1), \
130 struct Library *, (__SocketBase), 14, BSDSocket)
132 #define shutdown(arg1, arg2) \
133 __shutdown_WB(SocketBase, (arg1), (arg2))
135 #define __setsockopt_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5) \
136 AROS_LC5(int, setsockopt, \
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(socklen_t,(__arg5),D3), \
142 struct Library *, (__SocketBase), 15, BSDSocket)
144 #define setsockopt(arg1, arg2, arg3, arg4, arg5) \
145 __setsockopt_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5))
147 #define __getsockopt_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5) \
148 AROS_LC5(int, getsockopt, \
149 AROS_LCA(int,(__arg1),D0), \
150 AROS_LCA(int,(__arg2),D1), \
151 AROS_LCA(int,(__arg3),D2), \
152 AROS_LCA(void *,(__arg4),A0), \
153 AROS_LCA(socklen_t *,(__arg5),A1), \
154 struct Library *, (__SocketBase), 16, BSDSocket)
156 #define getsockopt(arg1, arg2, arg3, arg4, arg5) \
157 __getsockopt_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5))
159 #define __getsockname_WB(__SocketBase, __arg1, __arg2, __arg3) \
160 AROS_LC3(int, getsockname, \
161 AROS_LCA(int,(__arg1),D0), \
162 AROS_LCA(struct sockaddr *,(__arg2),A0), \
163 AROS_LCA(socklen_t *,(__arg3),A1), \
164 struct Library *, (__SocketBase), 17, BSDSocket)
166 #define getsockname(arg1, arg2, arg3) \
167 __getsockname_WB(SocketBase, (arg1), (arg2), (arg3))
169 #define __getpeername_WB(__SocketBase, __arg1, __arg2, __arg3) \
170 AROS_LC3(int, getpeername, \
171 AROS_LCA(int,(__arg1),D0), \
172 AROS_LCA(struct sockaddr *,(__arg2),A0), \
173 AROS_LCA(socklen_t *,(__arg3),A1), \
174 struct Library *, (__SocketBase), 18, BSDSocket)
176 #define getpeername(arg1, arg2, arg3) \
177 __getpeername_WB(SocketBase, (arg1), (arg2), (arg3))
179 #define __IoctlSocket_WB(__SocketBase, __arg1, __arg2, __arg3) \
180 AROS_LC3(int, IoctlSocket, \
181 AROS_LCA(int,(__arg1),D0), \
182 AROS_LCA(unsigned long,(__arg2),D1), \
183 AROS_LCA(char *,(__arg3),A0), \
184 struct Library *, (__SocketBase), 19, BSDSocket)
186 #define IoctlSocket(arg1, arg2, arg3) \
187 __IoctlSocket_WB(SocketBase, (arg1), (arg2), (arg3))
189 #define __CloseSocket_WB(__SocketBase, __arg1) \
190 AROS_LC1(int, CloseSocket, \
191 AROS_LCA(int,(__arg1),D0), \
192 struct Library *, (__SocketBase), 20, BSDSocket)
195 #define CloseSocket(arg1) \
196 __CloseSocket_WB(SocketBase, (arg1))
199 #define __WaitSelect_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5, __arg6) \
200 AROS_LC6(int, WaitSelect, \
201 AROS_LCA(int,(__arg1),D0), \
202 AROS_LCA(fd_set *,(__arg2),A0), \
203 AROS_LCA(fd_set *,(__arg3),A1), \
204 AROS_LCA(fd_set *,(__arg4),A2), \
205 AROS_LCA(struct timeval *,(__arg5),A3), \
206 AROS_LCA(ULONG *,(__arg6),D1), \
207 struct Library *, (__SocketBase), 21, BSDSocket)
210 #define WaitSelect(arg1, arg2, arg3, arg4, arg5, arg6) \
211 __WaitSelect_WB(SocketBase, (arg1), (arg2), (arg3), (arg4), (arg5), (arg6))
214 #define __SetSocketSignals_WB(__SocketBase, __arg1, __arg2, __arg3) \
215 AROS_LC3NR(void, SetSocketSignals, \
216 AROS_LCA(ULONG,(__arg1),D0), \
217 AROS_LCA(ULONG,(__arg2),D1), \
218 AROS_LCA(ULONG,(__arg3),D2), \
219 struct Library *, (__SocketBase), 22, BSDSocket)
221 #define SetSocketSignals(arg1, arg2, arg3) \
222 __SetSocketSignals_WB(SocketBase, (arg1), (arg2), (arg3))
224 #define __getdtablesize_WB(__SocketBase) \
225 AROS_LC0(int, getdtablesize, \
226 struct Library *, (__SocketBase), 23, BSDSocket)
228 #define getdtablesize() \
229 __getdtablesize_WB(SocketBase)
231 #define __ObtainSocket_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
232 AROS_LC4(LONG, ObtainSocket, \
233 AROS_LCA(LONG,(__arg1),D0), \
234 AROS_LCA(LONG,(__arg2),D1), \
235 AROS_LCA(LONG,(__arg3),D2), \
236 AROS_LCA(LONG,(__arg4),D3), \
237 struct Library *, (__SocketBase), 24, BSDSocket)
239 #define ObtainSocket(arg1, arg2, arg3, arg4) \
240 __ObtainSocket_WB(SocketBase, (arg1), (arg2), (arg3), (arg4))
242 #define __ReleaseSocket_WB(__SocketBase, __arg1, __arg2) \
243 AROS_LC2(LONG, ReleaseSocket, \
244 AROS_LCA(LONG,(__arg1),D0), \
245 AROS_LCA(LONG,(__arg2),D1), \
246 struct Library *, (__SocketBase), 25, BSDSocket)
248 #define ReleaseSocket(arg1, arg2) \
249 __ReleaseSocket_WB(SocketBase, (arg1), (arg2))
251 #define __ReleaseCopyOfSocket_WB(__SocketBase, __arg1, __arg2) \
252 AROS_LC2(LONG, ReleaseCopyOfSocket, \
253 AROS_LCA(LONG,(__arg1),D0), \
254 AROS_LCA(LONG,(__arg2),D1), \
255 struct Library *, (__SocketBase), 26, BSDSocket)
257 #define ReleaseCopyOfSocket(arg1, arg2) \
258 __ReleaseCopyOfSocket_WB(SocketBase, (arg1), (arg2))
260 #define __Errno_WB(__SocketBase) \
261 AROS_LC0(LONG, Errno, \
262 struct Library *, (__SocketBase), 27, BSDSocket)
265 __Errno_WB(SocketBase)
267 #define __SetErrnoPtr_WB(__SocketBase, __arg1, __arg2) \
268 AROS_LC2NR(void, SetErrnoPtr, \
269 AROS_LCA(void *,(__arg1),A0), \
270 AROS_LCA(int,(__arg2),D0), \
271 struct Library *, (__SocketBase), 28, BSDSocket)
273 #define SetErrnoPtr(arg1, arg2) \
274 __SetErrnoPtr_WB(SocketBase, (arg1), (arg2))
276 #define __Inet_NtoA_WB(__SocketBase, __arg1) \
277 AROS_LC1(char *, Inet_NtoA, \
278 AROS_LCA(unsigned long,(__arg1),D0), \
279 struct Library *, (__SocketBase), 29, BSDSocket)
281 #define Inet_NtoA(arg1) \
282 __Inet_NtoA_WB(SocketBase, (arg1))
284 #define __inet_addr_WB(__SocketBase, __arg1) \
285 AROS_LC1(unsigned long, inet_addr, \
286 AROS_LCA(const char *,(__arg1),A0), \
287 struct Library *, (__SocketBase), 30, BSDSocket)
289 #define inet_addr(arg1) \
290 __inet_addr_WB(SocketBase, (arg1))
292 #define __Inet_LnaOf_WB(__SocketBase, __arg1) \
293 AROS_LC1(unsigned long, Inet_LnaOf, \
294 AROS_LCA(unsigned long,(__arg1),D0), \
295 struct Library *, (__SocketBase), 31, BSDSocket)
297 #define Inet_LnaOf(arg1) \
298 __Inet_LnaOf_WB(SocketBase, (arg1))
300 #define __Inet_NetOf_WB(__SocketBase, __arg1) \
301 AROS_LC1(unsigned long, Inet_NetOf, \
302 AROS_LCA(unsigned long,(__arg1),D0), \
303 struct Library *, (__SocketBase), 32, BSDSocket)
305 #define Inet_NetOf(arg1) \
306 __Inet_NetOf_WB(SocketBase, (arg1))
308 #define __Inet_MakeAddr_WB(__SocketBase, __arg1, __arg2) \
309 AROS_LC2(unsigned long, Inet_MakeAddr, \
310 AROS_LCA(int,(__arg1),D0), \
311 AROS_LCA(int,(__arg2),D1), \
312 struct Library *, (__SocketBase), 33, BSDSocket)
314 #define Inet_MakeAddr(arg1, arg2) \
315 __Inet_MakeAddr_WB(SocketBase, (arg1), (arg2))
317 #define __inet_network_WB(__SocketBase, __arg1) \
318 AROS_LC1(unsigned long, inet_network, \
319 AROS_LCA(const char *,(__arg1),A0), \
320 struct Library *, (__SocketBase), 34, BSDSocket)
322 #define inet_network(arg1) \
323 __inet_network_WB(SocketBase, (arg1))
325 #define __gethostbyname_WB(__SocketBase, __arg1) \
326 AROS_LC1(struct hostent *, gethostbyname, \
327 AROS_LCA(const char *,(__arg1),A0), \
328 struct Library *, (__SocketBase), 35, BSDSocket)
330 #define gethostbyname(arg1) \
331 __gethostbyname_WB(SocketBase, (arg1))
333 #define __gethostbyaddr_WB(__SocketBase, __arg1, __arg2, __arg3) \
334 AROS_LC3(struct hostent *, gethostbyaddr, \
335 AROS_LCA(const void *,(__arg1),A0), \
336 AROS_LCA(int,(__arg2),D0), \
337 AROS_LCA(int,(__arg3),D1), \
338 struct Library *, (__SocketBase), 36, BSDSocket)
340 #define gethostbyaddr(arg1, arg2, arg3) \
341 __gethostbyaddr_WB(SocketBase, (arg1), (arg2), (arg3))
343 #define __getnetbyname_WB(__SocketBase, __arg1) \
344 AROS_LC1(struct netent *, getnetbyname, \
345 AROS_LCA(char *,(__arg1),A0), \
346 struct Library *, (__SocketBase), 37, BSDSocket)
348 #define getnetbyname(arg1) \
349 __getnetbyname_WB(SocketBase, (arg1))
351 #define __getnetbyaddr_WB(__SocketBase, __arg1, __arg2) \
352 AROS_LC2(struct netent *, getnetbyaddr, \
353 AROS_LCA(long,(__arg1),D0), \
354 AROS_LCA(int,(__arg2),D1), \
355 struct Library *, (__SocketBase), 38, BSDSocket)
357 #define getnetbyaddr(arg1, arg2) \
358 __getnetbyaddr_WB(SocketBase, (arg1), (arg2))
360 #define __getservbyname_WB(__SocketBase, __arg1, __arg2) \
361 AROS_LC2(struct servent *, getservbyname, \
362 AROS_LCA(char *,(__arg1),A0), \
363 AROS_LCA(char *,(__arg2),A1), \
364 struct Library *, (__SocketBase), 39, BSDSocket)
366 #define getservbyname(arg1, arg2) \
367 __getservbyname_WB(SocketBase, (arg1), (arg2))
369 #define __getservbyport_WB(__SocketBase, __arg1, __arg2) \
370 AROS_LC2(struct servent *, getservbyport, \
371 AROS_LCA(int,(__arg1),D0), \
372 AROS_LCA(char *,(__arg2),A0), \
373 struct Library *, (__SocketBase), 40, BSDSocket)
375 #define getservbyport(arg1, arg2) \
376 __getservbyport_WB(SocketBase, (arg1), (arg2))
378 #define __getprotobyname_WB(__SocketBase, __arg1) \
379 AROS_LC1(struct protoent *, getprotobyname, \
380 AROS_LCA(char *,(__arg1),A0), \
381 struct Library *, (__SocketBase), 41, BSDSocket)
383 #define getprotobyname(arg1) \
384 __getprotobyname_WB(SocketBase, (arg1))
386 #define __getprotobynumber_WB(__SocketBase, __arg1) \
387 AROS_LC1(struct protoent *, getprotobynumber, \
388 AROS_LCA(int,(__arg1),D0), \
389 struct Library *, (__SocketBase), 42, BSDSocket)
391 #define getprotobynumber(arg1) \
392 __getprotobynumber_WB(SocketBase, (arg1))
394 #define __vsyslog_WB(__SocketBase, __arg1, __arg2, __arg3) \
395 AROS_LC3NR(void, vsyslog, \
396 AROS_LCA(int,(__arg1),D0), \
397 AROS_LCA(const char *,(__arg2),A0), \
398 AROS_LCA(IPTR *,(__arg3),A1), \
399 struct Library *, (__SocketBase), 43, BSDSocket)
401 #define vsyslog(arg1, arg2, arg3) \
402 __vsyslog_WB(SocketBase, (arg1), (arg2), (arg3))
404 #if !defined(NO_INLINE_STDARG) && !defined(BSDSOCKET_NO_INLINE_STDARG)
405 #define syslog(arg1, arg2, ...) \
407 IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
408 vsyslog(arg1, arg2, __args); \
410 #endif /* !NO_INLINE_STDARG */
413 #define __Dup2Socket_WB(__SocketBase, __arg1, __arg2) \
414 AROS_LC2(int, Dup2Socket, \
415 AROS_LCA(int,(__arg1),D0), \
416 AROS_LCA(int,(__arg2),D1), \
417 struct Library *, (__SocketBase), 44, BSDSocket)
419 #define Dup2Socket(arg1, arg2) \
420 __Dup2Socket_WB(SocketBase, (arg1), (arg2))
422 #define __sendmsg_WB(__SocketBase, __arg1, __arg2, __arg3) \
423 AROS_LC3(int, sendmsg, \
424 AROS_LCA(int,(__arg1),D0), \
425 AROS_LCA(const struct msghdr *,(__arg2),A0), \
426 AROS_LCA(int,(__arg3),D1), \
427 struct Library *, (__SocketBase), 45, BSDSocket)
430 #define sendmsg(arg1, arg2, arg3) \
431 __sendmsg_WB(SocketBase, (arg1), (arg2), (arg3))
435 #define __recvmsg_WB(__SocketBase, __arg1, __arg2, __arg3) \
436 AROS_LC3(int, recvmsg, \
437 AROS_LCA(int,(__arg1),D0), \
438 AROS_LCA(struct msghdr *,(__arg2),A0), \
439 AROS_LCA(int,(__arg3),D1), \
440 struct Library *, (__SocketBase), 46, BSDSocket)
443 #define recvmsg(arg1, arg2, arg3) \
444 __recvmsg_WB(SocketBase, (arg1), (arg2), (arg3))
447 #define __gethostname_WB(__SocketBase, __arg1, __arg2) \
448 AROS_LC2(int, gethostname, \
449 AROS_LCA(char *,(__arg1),A0), \
450 AROS_LCA(int,(__arg2),D0), \
451 struct Library *, (__SocketBase), 47, BSDSocket)
453 #define gethostname(arg1, arg2) \
454 __gethostname_WB(SocketBase, (arg1), (arg2))
456 #define __gethostid_WB(__SocketBase) \
457 AROS_LC0(long, gethostid, \
458 struct Library *, (__SocketBase), 48, BSDSocket)
460 #define gethostid() \
461 __gethostid_WB(SocketBase)
463 #define __SocketBaseTagList_WB(__SocketBase, __arg1) \
464 AROS_LC1(ULONG, SocketBaseTagList, \
465 AROS_LCA(struct TagItem *,(__arg1),A0), \
466 struct Library *, (__SocketBase), 49, BSDSocket)
468 #define SocketBaseTagList(arg1) \
469 __SocketBaseTagList_WB(SocketBase, (arg1))
471 #if !defined(NO_INLINE_STDARG) && !defined(BSDSOCKET_NO_INLINE_STDARG)
472 #define SocketBaseTags(...) \
474 IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
475 SocketBaseTagList((struct TagItem *)__args); \
477 #endif /* !NO_INLINE_STDARG */
479 #define __GetSocketEvents_WB(__SocketBase, __arg1) \
480 AROS_LC1(LONG, GetSocketEvents, \
481 AROS_LCA(ULONG *,(__arg1),A0), \
482 struct Library *, (__SocketBase), 50, BSDSocket)
484 #define GetSocketEvents(arg1) \
485 __GetSocketEvents_WB(SocketBase, (arg1))
487 #if defined(__CONFIG_ROADSHOW__)
489 /* RoadShow Extensions .. */
491 #define __bpf_open_WB(__SocketBase, __arg1) \
492 AROS_LC1(long, bpf_open, \
493 AROS_LCA(long, (__arg1), D0), \
494 struct Library *, (__SocketBase), 61, BSDSocket)
496 #define bpf_open(arg1) \
497 __bpf_open_WB(SocketBase, (arg1))
499 #define __bpf_close_WB(__SocketBase, __arg1) \
500 AROS_LC1(long, bpf_close, \
501 AROS_LCA(long, (__arg1), D0), \
502 struct Library *, (__SocketBase), 62, BSDSocket)
504 #define bpf_close(arg1) \
505 __bpf_close_WB(SocketBase, (arg1))
507 #define __bpf_read_WB(__SocketBase, __arg1, __arg2, __arg3) \
508 AROS_LC3(long, bpf_read, \
509 AROS_LCA(long, (__arg1), D0), \
510 AROS_LCA(void *, (__arg2), A0), \
511 AROS_LCA(long, (__arg3), D1), \
512 struct Library *, (__SocketBase), 63, BSDSocket)
514 #define bpf_read(arg1, arg2, arg3) \
515 __bpf_read_WB(SocketBase, arg1, arg2, arg3)
517 #define __bpf_write_WB(__SocketBase, __arg1, __arg2, __arg3) \
518 AROS_LC3(long, bpf_write, \
519 AROS_LCA(long, (__arg1), D0), \
520 AROS_LCA(void *, (__arg2), A0), \
521 AROS_LCA(long, (__arg3), D1), \
522 struct Library *, (__SocketBase), 64, BSDSocket)
524 #define bpf_write(arg1, arg2, arg3) \
525 __bpf_write_WB(SocketBase, arg1, arg2, arg3)
527 #define __bpf_set_notify_mask_WB(__SocketBase, __arg1, __arg2) \
528 AROS_LC2(long, bpf_set_notify_mask, \
529 AROS_LCA(long, (__arg1), D0), \
530 AROS_LCA(unsigned long, (__arg2), D1), \
531 struct Library *, (__SocketBase), 65, BSDSocket)
533 #define bpf_set_notify_mask(arg1, arg2) \
534 __bpf_set_notify_mask_WB(SocketBase, arg1, arg2)
536 #define __bpf_set_interrupt_mask_WB(__SocketBase, __arg1, __arg2) \
537 AROS_LC2(long, bpf_set_interrupt_mask, \
538 AROS_LCA(long, (__arg1), D0), \
539 AROS_LCA(unsigned long, (__arg2), D1), \
540 struct Library *, (__SocketBase), 66, BSDSocket)
542 #define bpf_set_interrupt_mask(arg1, arg2) \
543 __bpf_set_interrupt_mask_WB(SocketBase, arg1, arg2)
545 #define __bpf_ioctl_WB(__SocketBase, __arg1, __arg2, __arg3) \
546 AROS_LC3(long, bpf_ioctl, \
547 AROS_LCA(long, (__arg1), D0), \
548 AROS_LCA(unsigned long, (__arg2), D1), \
549 AROS_LCA(char *, (__arg3), A0), \
550 struct Library *, (__SocketBase), 67, BSDSocket)
552 #define bpf_ioctl(arg1, arg2, arg3) \
553 __bpf_ioctl_WB(SocketBase, arg1, arg2, arg3)
555 #define __bpf_data_waiting_WB(__SocketBase, __arg1) \
556 AROS_LC1(long, bpf_data_waiting, \
557 AROS_LCA(long, (__arg1), D0), \
558 struct Library *, (__SocketBase), 68, BSDSocket)
560 #define bpf_data_waiting(arg1) \
561 __bpf_data_waiting_WB(SocketBase, arg1)
563 #define __AddRouteTagList_WB(__SocketBase, __arg1) \
564 AROS_LC1(long, AddRouteTagList, \
565 AROS_LCA(struct TagItem *, (__arg1), A0), \
566 struct Library *, (__SocketBase), 69, BSDSocket)
568 #define AddRouteTagList(arg1) \
569 __AddRouteTagList_WB(SocketBase, arg1)
571 #define __DeleteRouteTagList_WB(__SocketBase, __arg1) \
572 AROS_LC1(long, DeleteRouteTagList, \
573 AROS_LCA(struct TagItem *, (__arg1), A0), \
574 struct Library *, (__SocketBase), 70, BSDSocket)
576 #define DeleteRouteTagList(arg1) \
577 __DeleteRouteTagList_WB(SocketBase, arg1)
579 #define __ChangeRouteTagList_WB(__SocketBase, __arg1) \
580 AROS_LC1(long, ChangeRouteTagList, \
581 AROS_LCA(struct TagItem *, (__arg1), A0), \
582 struct Library *, (__SocketBase), 71, BSDSocket)
584 #define ChangeRouteTagList(arg1) \
585 __ChangeRouteTagList_WB(SocketBase, arg1)
587 #define __FreeRouteInfo_WB(__SocketBase, __arg1) \
588 AROS_LC1NR(void, FreeRouteInfo, \
589 AROS_LCA(struct rt_msghdr *, (__arg1), A0), \
590 struct Library *, (__SocketBase), 72, BSDSocket)
592 #define FreeRouteInfo(arg1) \
593 __FreeRouteInfo_WB(SocketBase, arg1)
595 #define __GetRouteInfo_WB(__SocketBase, __arg1, __arg2) \
596 AROS_LC2(struct rt_msghdr *, GetRouteInfo, \
597 AROS_LCA(LONG, (__arg1), D0), \
598 AROS_LCA(LONG, (__arg2), D1), \
599 struct Library *, (__SocketBase), 73, BSDSocket)
601 #define GetRouteInfo(arg1, arg2) \
602 __GetRouteInfo_WB(SocketBase, arg1, arg2)
604 #define __AddInterfaceTagList_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
605 AROS_LC4(long, AddInterfaceTagList, \
606 AROS_LCA(STRPTR, (__arg1), A0), \
607 AROS_LCA(STRPTR, (__arg2), A1), \
608 AROS_LCA(long, (__arg3), D0), \
609 AROS_LCA(struct TagItem *, (__arg4), A2), \
610 struct Library *, (__SocketBase), 74, BSDSocket)
612 #define AddInterfaceTagList(arg1, arg2, arg3, arg4) \
613 __AddInterfaceTagList_WB(SocketBase, arg1, arg2, arg3, arg4)
615 #define __ConfigureInterfaceTagList_WB(__SocketBase, __arg1, __arg2) \
616 AROS_LC2(long, ConfigureInterfaceTagList, \
617 AROS_LCA(STRPTR, (__arg1), A0), \
618 AROS_LCA(struct TagItem *, (__arg2), A1), \
619 struct Library *, (__SocketBase), 75, BSDSocket)
621 #define ConfigureInterfaceTagList(arg1, arg2) \
622 __ConfigureInterfaceTagList_WB(SocketBase, arg1, arg2)
624 #define __ReleaseInterfaceList_WB(__SocketBase, __arg1) \
625 AROS_LC1NR(void, ReleaseInterfaceList, \
626 AROS_LCA(struct List *, (__arg1), A0), \
627 struct Library *, (__SocketBase), 76, BSDSocket)
629 #define ReleaseInterfaceList(arg1) \
630 __ReleaseInterfaceList_WB(SocketBase, arg1)
632 #define __ObtainInterfaceList_WB(__SocketBase) \
633 AROS_LC0(struct List *, ObtainInterfaceList, \
634 struct Library *, (__SocketBase), 77, BSDSocket)
636 #define ObtainInterfaceList() \
637 __ObtainInterfaceList_WB(SocketBase)
639 #define __QueryInterfaceTagList_WB(__SocketBase, __arg1, __arg2) \
640 AROS_LC2(long, QueryInterfaceTagList, \
641 AROS_LCA(STRPTR, (__arg1), A0), \
642 AROS_LCA(struct TagItem *, (__arg2), A1), \
643 struct Library *, (__SocketBase), 78, BSDSocket)
645 #define QueryInterfaceTagList(arg1, arg2) \
646 __QueryInterfaceTagList_WB(SocketBase, (arg1), (arg2))
648 #define __CreateAddrAllocMessageA_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4, __arg5) \
649 AROS_LC5(LONG, CreateAddrAllocMessageA, \
650 AROS_LCA(LONG, (__arg1), D0), \
651 AROS_LCA(LONG, (__arg2), D1), \
652 AROS_LCA(STRPTR, (__arg3), A0), \
653 AROS_LCA(struct AddressAllocationMessage *, (__arg4), A1), \
654 AROS_LCA(struct TagItem *, (__arg5), A2), \
655 struct Library *, (__SocketBase), 79, BSDSocket)
657 #define CreateAddrAllocMessageA(arg1, arg2, arg3, arg4, arg5) \
658 __CreateAddrAllocMessageA(SocketBase, arg1, arg2, arg3, arg4, arg5)
660 #define __DeleteAddrAllocMessage_WB(__SocketBase, __arg1) \
661 AROS_LC1NR(void, DeleteAddrAllocMessage, \
662 AROS_LCA(struct AddressAllocationMessage *, (__arg1), A0), \
663 struct Library *, (__SocketBase), 80, BSDSocket)
665 #define DeleteAddrAllocMessage(arg1) \
666 __DeleteAddrAllocMessage_WB(SocketBase, arg1)
668 #define __BeginInterfaceConfig_WB(__SocketBase, __arg1) \
669 AROS_LC1NR(void, BeginInterfaceConfig, \
670 AROS_LCA(struct AddressAllocationMessage *, (__arg1), A0), \
671 struct Library *, (__SocketBase), 81, BSDSocket)
673 #define BeginInterfaceConfig(arg1) \
674 __BeginInterfaceConfig_WB(SocketBase, arg1)
676 #define __AbortInterfaceConfig_WB(__SocketBase, __arg1) \
677 AROS_LC1NR(void, AbortInterfaceConfig, \
678 AROS_LCA(struct AddressAllocationMessage *, (__arg1), A0), \
679 struct Library *, (__SocketBase), 82, BSDSocket)
681 #define AbortInterfaceConfig(arg1) \
682 __AbortInterfaceConfig_WB(SocketBase, arg1)
684 #define __AddNetMonitorHookTagList_WB(__SocketBase, __arg1, __arg2, __arg3) \
685 AROS_LC3(long, AddNetMonitorHookTagList, \
686 AROS_LCA(long, (__arg1), D0), \
687 AROS_LCA(struct Hook *, (__arg2), A0), \
688 AROS_LCA(struct TagItem *, (__arg3), A1), \
689 struct Library *, (__SocketBase), 83, BSDSocket)
691 #define AddNetMonitorHookTagList(arg1, arg2, arg3) \
692 __AddNetMonitorHookTagList_WB(SocketBase, arg1, arg2, arg3)
694 #define __RemoveNetMonitorHook_WB(__SocketBase, __arg1) \
695 AROS_LC1NR(void, RemoveNetMonitorHook, \
696 AROS_LCA(struct Hook *, (__arg1), A0), \
697 struct Library *, (__SocketBase), 84, BSDSocket)
699 #define RemoveNetMonitorHook(arg1) \
700 __RemoveNetMonitorHook_WB(SocketBase, arg1)
702 #define __GetNetworkStatistics_WB(__SocketBase, __arg1, __arg2, __arg3, __arg4) \
703 AROS_LC4(LONG, GetNetworkStatistics, \
704 AROS_LCA(LONG, (__arg1), D0), \
705 AROS_LCA(LONG, (__arg2), D1), \
706 AROS_LCA(APTR, (__arg3), A0), \
707 AROS_LCA(LONG, (__arg4), D2), \
708 struct Library *, (__SocketBase), 85, BSDSocket)
710 #define GetNetworkStatistics(arg1, arg2, arg3, arg4) \
711 __GetNetworkStatistics_WB(SocketBase, arg1, arg2, arg3, arg4)
713 #define __AddDomainNameServer_WB(__SocketBase, __arg1) \
714 AROS_LC1(LONG, AddDomainNameServer, \
715 AROS_LCA(STRPTR, (__arg1), A0), \
716 struct Library *, (__SocketBase), 86, BSDSocket)
718 #define AddDomainNameServer(arg1) \
719 __AddDomainNameServer_WB(SocketBase, arg1)
721 #define __RemoveDomainNameServer_WB(__SocketBase, __arg1) \
722 AROS_LC1(LONG, RemoveDomainNameServer, \
723 AROS_LCA(STRPTR, (__arg1), A0), \
724 struct Library *, (__SocketBase), 87, BSDSocket)
726 #define RemoveDomainNameServer(arg1) \
727 __RemoveDomainNameServer_WB(SocketBase, arg1)
729 #define __ReleaseDomainNameServerList_WB(__SocketBase, __arg1) \
730 AROS_LC1NR(void, ReleaseDomainNameServerList, \
731 AROS_LCA(struct List *, (__arg1), A0), \
732 struct Library *, (__SocketBase), 88, BSDSocket)
734 #define ReleaseDomainNameServerList(arg1) \
735 __ReleaseDomainNameServerList_WB(SocketBase, arg1)
737 #define __ObtainDomainNameServerList_WB(__SocketBase) \
738 AROS_LC0(struct List *, ObtainDomainNameServerList, \
739 struct Library *, (__SocketBase), 89, BSDSocket)
741 #define ObtainDomainNameServerList() \
742 __ObtainDomainNameServerList_WB(SocketBase)
744 #define __setnetent_WB(__SocketBase, __arg1) \
745 AROS_LC1NR(void, setnetent, \
746 AROS_LCA(int, (__arg1), D0), \
747 struct Library *, (__SocketBase), 90, BSDSocket)
749 #define setnetent(arg1) \
750 __setnetent_WB(SocketBase, arg1)
752 #define __endnetent_WB(__SocketBase) \
753 AROS_LC0NR(void, endnetent, \
754 struct Library *, (__SocketBase), 91, BSDSocket)
756 #define endnetent() \
757 __endnetent_WB(SocketBase)
759 #define __getnetent_WB(__SocketBase) \
760 AROS_LC0(struct netent *, getnetent, \
761 struct Library *, (__SocketBase), 92, BSDSocket)
763 #define getnetent() \
764 __getnetent_WB(SocketBase)
766 #define __setprotoent_WB(__SocketBase, __arg1) \
767 AROS_LC1NR(void, setprotoent, \
768 AROS_LCA(int, (__arg1), D0), \
769 struct Library *, (__SocketBase), 93, BSDSocket)
771 #define setprotoent(__arg1) \
772 __setprotoent__WB(SocketBase, __arg1)
774 #define __endprotoent_WB(__SocketBase) \
775 AROS_LC0NR(void, endprotoent, \
776 struct Library *, (__SocketBase), 94, BSDSocket)
778 #define endprotoent() \
779 __endprotoent_WB(SocketBase)
781 #define __getprotoent_WB(__SocketBase) \
782 AROS_LC0(struct protoent *, getprotoent, \
783 struct Library *, (__SocketBase), 95, BSDSocket)
785 #define getprotoent() \
786 __getprotoent_WB(SocketBase)
788 #define __setservent_WB(__SocketBase, __arg1) \
789 AROS_LC1NR(void, setservent, \
790 AROS_LCA(int, (__arg1), D0), \
791 struct Library *, (__SocketBase), 96, BSDSocket)
793 #define setservent(arg1) \
794 __setservent_WB(SocketBase, arg1)
796 #define __endservent_WB(__SocketBase) \
797 AROS_LC0NR(void, endservent, \
798 struct Library *, (__SocketBase), 97, BSDSocket)
800 #define endservent() \
801 __endservent_WB(SocketBase)
803 #define __getservent_WB(__SocketBase) \
804 AROS_LC0(struct servent *, getservent, \
805 struct Library *, (__SocketBase), 98, BSDSocket)
807 #define getservent() \
808 __getservent_WB(SocketBase)
810 #define __inet_aton_WB(__SocketBase, __arg1, __arg2) \
811 AROS_LC2(LONG, inet_aton, \
812 AROS_LCA(CONST_STRPTR,(__arg1),A0), \
813 AROS_LCA(struct in_addr *,(__arg2),A1), \
814 struct Library *, (__SocketBase), 99, BSDSocket)
816 #define inet_aton(arg1, arg2) \
817 __inet_aton_WB(SocketBase, (arg1), (arg2))
819 #endif /* __CONFIG_ROADSHOW__ */
822 #include <defines/pthreadsocket.h>
825 #endif /* DEFINES_BSDSOCKET_PROTOS_H */