Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / network / stacks / AROSTCP / netinclude / clib / bsdsocket_protos.h
blob59aa3ea37cd4b105e06f8666611fded875c00d11
1 #ifndef CLIB_BSDSOCKET_PROTOS_H
2 #define CLIB_BSDSOCKET_PROTOS_H
4 /*
5 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 */
8 #include <aros/libcall.h>
9 #include <sys/types.h>
10 /* Stub macros for 'emulation' of some functions */
11 #define select(nfds,rfds,wfds,efds,timeout) WaitSelect(nfds,rfds,wfds,efds,timeout,NULL)
12 #define inet_ntoa(addr) Inet_NtoA(((struct in_addr)addr).s_addr)
13 AROS_LP3(int, socket,
14 AROS_LPA(int, domain, D0),
15 AROS_LPA(int, type, D1),
16 AROS_LPA(int, protocol, D2),
17 LIBBASETYPEPTR, SocketBase, 5, BSDSocket
19 AROS_LP3(int, bind,
20 AROS_LPA(int, s, D0),
21 AROS_LPA(struct sockaddr *, name, A0),
22 AROS_LPA(int, namelen, D1),
23 LIBBASETYPEPTR, SocketBase, 6, BSDSocket
25 AROS_LP2(int, listen,
26 AROS_LPA(int, s, D0),
27 AROS_LPA(int, backlog, D1),
28 LIBBASETYPEPTR, SocketBase, 7, BSDSocket
30 AROS_LP3(int, accept,
31 AROS_LPA(int, s, D0),
32 AROS_LPA(struct sockaddr *, addr, A0),
33 AROS_LPA(int *, addrlen, A1),
34 LIBBASETYPEPTR, SocketBase, 8, BSDSocket
36 AROS_LP3(int, connect,
37 AROS_LPA(int, s, D0),
38 AROS_LPA(struct sockaddr *, name, A0),
39 AROS_LPA(int, namelen, D1),
40 LIBBASETYPEPTR, SocketBase, 9, BSDSocket
42 AROS_LP6(int, sendto,
43 AROS_LPA(int, s, D0),
44 AROS_LPA(const void *, msg, A0),
45 AROS_LPA(int, len, D1),
46 AROS_LPA(int, flags, D2),
47 AROS_LPA(const struct sockaddr *, to, A1),
48 AROS_LPA(int, tolen, D3),
49 LIBBASETYPEPTR, SocketBase, 10, BSDSocket
51 AROS_LP4(int, send,
52 AROS_LPA(int, s, D0),
53 AROS_LPA(const void *, msg, A0),
54 AROS_LPA(int, len, D1),
55 AROS_LPA(int, flags, D2),
56 LIBBASETYPEPTR, SocketBase, 11, BSDSocket
58 AROS_LP6(int, recvfrom,
59 AROS_LPA(int, s, D0),
60 AROS_LPA(void *, buf, A0),
61 AROS_LPA(int, len, D1),
62 AROS_LPA(int, flags, D2),
63 AROS_LPA(struct sockaddr *, from, A1),
64 AROS_LPA(int *, fromlen, A2),
65 LIBBASETYPEPTR, SocketBase, 12, BSDSocket
67 AROS_LP4(int, recv,
68 AROS_LPA(int, s, D0),
69 AROS_LPA(void *, buf, A0),
70 AROS_LPA(int, len, D1),
71 AROS_LPA(int, flags, D2),
72 LIBBASETYPEPTR, SocketBase, 13, BSDSocket
74 AROS_LP2(int, shutdown,
75 AROS_LPA(int, s, D0),
76 AROS_LPA(int, how, D1),
77 LIBBASETYPEPTR, SocketBase, 14, BSDSocket
79 AROS_LP5(int, setsockopt,
80 AROS_LPA(int, s, D0),
81 AROS_LPA(int, level, D1),
82 AROS_LPA(int, optname, D2),
83 AROS_LPA(void *, optval, A0),
84 AROS_LPA(int, optlen, D3),
85 LIBBASETYPEPTR, SocketBase, 15, BSDSocket
87 AROS_LP5(int, getsockopt,
88 AROS_LPA(int, s, D0),
89 AROS_LPA(int, level, D1),
90 AROS_LPA(int, optname, D2),
91 AROS_LPA(void *, optval, A0),
92 AROS_LPA(void *, optlen, A1),
93 LIBBASETYPEPTR, SocketBase, 16, BSDSocket
95 AROS_LP3(int, getsockname,
96 AROS_LPA(int, s, D0),
97 AROS_LPA(struct sockaddr *, name, A0),
98 AROS_LPA(int *, namelen, A1),
99 LIBBASETYPEPTR, SocketBase, 17, BSDSocket
101 AROS_LP3(int, getpeername,
102 AROS_LPA(int, s, D0),
103 AROS_LPA(struct sockaddr *, name, A0),
104 AROS_LPA(int *, namelen, A1),
105 LIBBASETYPEPTR, SocketBase, 18, BSDSocket
107 AROS_LP3(int, IoctlSocket,
108 AROS_LPA(int, s, D0),
109 AROS_LPA(unsigned long, request, D1),
110 AROS_LPA(char *, argp, A0),
111 LIBBASETYPEPTR, SocketBase, 19, BSDSocket
113 AROS_LP1(int, CloseSocket,
114 AROS_LPA(int, s, D0),
115 LIBBASETYPEPTR, SocketBase, 20, BSDSocket
117 AROS_LP6(int, WaitSelect,
118 AROS_LPA(int, nfds, D0),
119 AROS_LPA(fd_set *, readfds, A0),
120 AROS_LPA(fd_set *, writefds, A1),
121 AROS_LPA(fd_set *, exceptfds, A2),
122 AROS_LPA(struct timeval *, timeout, A3),
123 AROS_LPA(ULONG *, sigmask, D1),
124 LIBBASETYPEPTR, SocketBase, 21, BSDSocket
126 AROS_LP3(void, SetSocketSignals,
127 AROS_LPA(ULONG, intrmask, D0),
128 AROS_LPA(ULONG, iomask, D1),
129 AROS_LPA(ULONG, urgmask, D2),
130 LIBBASETYPEPTR, SocketBase, 22, BSDSocket
132 AROS_LP0(int, getdtablesize,
133 LIBBASETYPEPTR, SocketBase, 23, BSDSocket
135 AROS_LP4(LONG, ObtainSocket,
136 AROS_LPA(LONG, id, D0),
137 AROS_LPA(LONG, domain, D1),
138 AROS_LPA(LONG, type, D2),
139 AROS_LPA(LONG, protocol, D3),
140 LIBBASETYPEPTR, SocketBase, 24, BSDSocket
142 AROS_LP2(LONG, ReleaseSocket,
143 AROS_LPA(LONG, sd, D0),
144 AROS_LPA(LONG, id, D1),
145 LIBBASETYPEPTR, SocketBase, 25, BSDSocket
147 AROS_LP2(LONG, ReleaseCopyOfSocket,
148 AROS_LPA(LONG, sd, D0),
149 AROS_LPA(LONG, id, D1),
150 LIBBASETYPEPTR, SocketBase, 26, BSDSocket
152 AROS_LP0(LONG, Errno,
153 LIBBASETYPEPTR, SocketBase, 27, BSDSocket
155 AROS_LP2(void, SetErrnoPtr,
156 AROS_LPA(void *, ptr, A0),
157 AROS_LPA(int, size, D0),
158 LIBBASETYPEPTR, SocketBase, 28, BSDSocket
160 AROS_LP1(char *, Inet_NtoA,
161 AROS_LPA(unsigned long, in, D0),
162 LIBBASETYPEPTR, SocketBase, 29, BSDSocket
164 AROS_LP1(unsigned long, inet_addr,
165 AROS_LPA(const char *, cp, A0),
166 LIBBASETYPEPTR, SocketBase, 30, BSDSocket
168 AROS_LP1(unsigned long, Inet_LnaOf,
169 AROS_LPA(unsigned long, in, D0),
170 LIBBASETYPEPTR, SocketBase, 31, BSDSocket
172 AROS_LP1(unsigned long, Inet_NetOf,
173 AROS_LPA(unsigned long, in, D0),
174 LIBBASETYPEPTR, SocketBase, 32, BSDSocket
176 AROS_LP2(unsigned long, Inet_MakeAddr,
177 AROS_LPA(int, net, D0),
178 AROS_LPA(int, lna, D1),
179 LIBBASETYPEPTR, SocketBase, 33, BSDSocket
181 AROS_LP1(unsigned long, inet_network,
182 AROS_LPA(const char *, cp, A0),
183 LIBBASETYPEPTR, SocketBase, 34, BSDSocket
185 AROS_LP1(struct hostent *, gethostbyname,
186 AROS_LPA(char *, name, A0),
187 LIBBASETYPEPTR, SocketBase, 35, BSDSocket
189 AROS_LP3(struct hostent *, gethostbyaddr,
190 AROS_LPA(char *, addr, A0),
191 AROS_LPA(int, len, D0),
192 AROS_LPA(int, type, D1),
193 LIBBASETYPEPTR, SocketBase, 36, BSDSocket
195 AROS_LP1(struct netent *, getnetbyname,
196 AROS_LPA(char *, name, A0),
197 LIBBASETYPEPTR, SocketBase, 37, BSDSocket
199 AROS_LP2(struct netent *, getnetbyaddr,
200 AROS_LPA(long, net, D0),
201 AROS_LPA(int, type, D1),
202 LIBBASETYPEPTR, SocketBase, 38, BSDSocket
204 AROS_LP2(struct servent *, getservbyname,
205 AROS_LPA(char *, name, A0),
206 AROS_LPA(char *, proto, A1),
207 LIBBASETYPEPTR, SocketBase, 39, BSDSocket
209 AROS_LP2(struct servent *, getservbyport,
210 AROS_LPA(int, port, D0),
211 AROS_LPA(char *, proto, A0),
212 LIBBASETYPEPTR, SocketBase, 40, BSDSocket
214 AROS_LP1(struct protoent *, getprotobyname,
215 AROS_LPA(char *, name, A0),
216 LIBBASETYPEPTR, SocketBase, 41, BSDSocket
218 AROS_LP1(struct protoent *, getprotobynumber,
219 AROS_LPA(int, proto, D0),
220 LIBBASETYPEPTR, SocketBase, 42, BSDSocket
222 AROS_LP3(void, vsyslog,
223 AROS_LPA(int, level, D0),
224 AROS_LPA(const char *, format, A0),
225 AROS_LPA(LONG *, args, A1),
226 LIBBASETYPEPTR, SocketBase, 43, BSDSocket
228 AROS_LP2(int, Dup2Socket,
229 AROS_LPA(int, fd1, D0),
230 AROS_LPA(int, fd2, D1),
231 LIBBASETYPEPTR, SocketBase, 44, BSDSocket
233 AROS_LP3(int, sendmsg,
234 AROS_LPA(int, s, D0),
235 AROS_LPA(const struct msghdr *, msg, A0),
236 AROS_LPA(int, flags, D1),
237 LIBBASETYPEPTR, SocketBase, 45, BSDSocket
239 AROS_LP3(int, recvmsg,
240 AROS_LPA(int, s, D0),
241 AROS_LPA(struct msghdr *, msg, A0),
242 AROS_LPA(int, flags, D1),
243 LIBBASETYPEPTR, SocketBase, 46, BSDSocket
245 AROS_LP2(int, gethostname,
246 AROS_LPA(char *, name, A0),
247 AROS_LPA(int, namelen, D0),
248 LIBBASETYPEPTR, SocketBase, 47, BSDSocket
250 AROS_LP0(long, gethostid,
251 LIBBASETYPEPTR, SocketBase, 48, BSDSocket
253 AROS_LP1(ULONG, SocketBaseTagList,
254 AROS_LPA(struct TagItem *, tagList, A0),
255 LIBBASETYPEPTR, SocketBase, 49, BSDSocket
257 AROS_LP1(LONG, GetSocketEvents,
258 AROS_LPA(ULONG *, eventsp, A0),
259 LIBBASETYPEPTR, SocketBase, 50, BSDSocket
262 /* RoadShow Extensions .. */
263 #if defined(__CONFIG_ROADSHOW__)
264 AROS_LP1(long, bpf_open,
265 AROS_LPA(long, channel, D0),
266 LIBBASETYPEPTR, SocketBase, 57, BSDSocket
268 AROS_LP1(long, bpf_close,
269 AROS_LPA(long, handle, D0),
270 LIBBASETYPEPTR, SocketBase, 58, BSDSocket
272 AROS_LP3(long, bpf_read,
273 AROS_LPA(long, handle, D0),
274 AROS_LPA(void *, buffer, A0),
275 AROS_LPA(long, len, D1),
276 LIBBASETYPEPTR, SocketBase, 59, BSDSocket
278 AROS_LP3(long, bpf_write,
279 AROS_LPA(long, handle, D0),
280 AROS_LPA(void *, buffer, A0),
281 AROS_LPA(long, len, D1),
282 LIBBASETYPEPTR, SocketBase, 60, BSDSocket
284 AROS_LP2(long, bpf_set_notify_mask,
285 AROS_LPA(long, handle, D0),
286 AROS_LPA(unsigned long, mask, D1),
287 LIBBASETYPEPTR, SocketBase, 61, BSDSocket
289 AROS_LP2(long, bpf_set_interrupt_mask,
290 AROS_LPA(long, handle, D0),
291 AROS_LPA(unsigned long, mask, D1),
292 LIBBASETYPEPTR, SocketBase, 62, BSDSocket
294 AROS_LP3(long, bpf_ioctl,
295 AROS_LPA(long, handle, D0),
296 AROS_LPA(unsigned long, request, D1),
297 AROS_LPA(char *, argp, A0),
298 LIBBASETYPEPTR, SocketBase, 63, BSDSocket
300 AROS_LP1(long, bpf_data_waiting,
301 AROS_LPA(long, handle, D0),
302 LIBBASETYPEPTR, SocketBase, 64, BSDSocket
304 AROS_LP1(long, AddRouteTagList,
305 AROS_LPA(struct TagItem *, tags, A0),
306 LIBBASETYPEPTR, SocketBase, 65, BSDSocket
308 AROS_LP1(long, DeleteRouteTagList,
309 AROS_LPA(struct TagItem *, tags, A0),
310 LIBBASETYPEPTR, SocketBase, 66, BSDSocket
312 AROS_LP1(long, ChangeRouteTagList,
313 AROS_LPA(struct TagItem *, tags, A0),
314 LIBBASETYPEPTR, SocketBase, 67, BSDSocket
316 AROS_LP1I(void, FreeRouteInfo,
317 AROS_LPA(struct rt_msghdr *, table, A0),
318 LIBBASETYPEPTR, SocketBase, 68, BSDSocket
320 AROS_LP2(struct rt_msghdr *, GetRouteInfo,
321 AROS_LPA(LONG, address_family, D0),
322 AROS_LPA(LONG, flags, D1),
323 LIBBASETYPEPTR, SocketBase, 69, BSDSocket
325 AROS_LP4(long, AddInterfaceTagList,
326 AROS_LPA(STRPTR, name, A0),
327 AROS_LPA(STRPTR, device, A1),
328 AROS_LPA(long, unit, D0),
329 AROS_LPA(struct TagItem *, tags, A2),
330 LIBBASETYPEPTR, SocketBase, 70, BSDSocket
332 AROS_LP2(long, ConfigureInterfaceTagList,
333 AROS_LPA(STRPTR, name, A0),
334 AROS_LPA(struct TagItem *, tags, A1),
335 LIBBASETYPEPTR, SocketBase, 71, BSDSocket
337 AROS_LP1I(void, ReleaseInterfaceList,
338 AROS_LPA(struct List *, list, A0),
339 LIBBASETYPEPTR, SocketBase, 72, BSDSocket
341 AROS_LP0I(struct List *, ObtainInterfaceList,
342 LIBBASETYPEPTR, SocketBase, 73, BSDSocket
344 AROS_LP2(long, QueryInterfaceTagList,
345 AROS_LPA(STRPTR, name, A0),
346 AROS_LPA(struct TagItem *, tags, A1),
347 LIBBASETYPEPTR, SocketBase, 74, BSDSocket
349 AROS_LP5I(LONG, CreateAddrAllocMessageA,
350 AROS_LPA(LONG, version, D0),
351 AROS_LPA(LONG, protocol, D1),
352 AROS_LPA(STRPTR, interface_name, A0),
353 AROS_LPA(struct AddressAllocationMessage *, result_ptr, A1),
354 AROS_LPA(struct TagItem *, tags, A2),
355 LIBBASETYPEPTR, SocketBase, 75, BSDSocket
357 AROS_LP1I(void, DeleteAddrAllocMessage,
358 AROS_LPA(struct AddressAllocationMessage *, message, A0),
359 LIBBASETYPEPTR, SocketBase, 76, BSDSocket
361 AROS_LP1I(void, BeginInterfaceConfig,
362 AROS_LPA(struct AddressAllocationMessage *, message, A0),
363 LIBBASETYPEPTR, SocketBase, 77, BSDSocket
365 AROS_LP1I(void, AbortInterfaceConfig,
366 AROS_LPA(struct AddressAllocationMessage *, message, A0),
367 LIBBASETYPEPTR, SocketBase, 78, BSDSocket
369 AROS_LP3(long, AddNetMonitorHookTagList,
370 AROS_LPA(long, type, D0),
371 AROS_LPA(struct Hook *, hook, A0),
372 AROS_LPA(struct TagItem *, tags, A1),
373 LIBBASETYPEPTR, SocketBase, 79, BSDSocket
375 AROS_LP1I(void, RemoveNetMonitorHook,
376 AROS_LPA(struct Hook *, hook, A0),
377 LIBBASETYPEPTR, SocketBase, 80, BSDSocket
379 AROS_LP4(LONG, GetNetworkStatistics,
380 AROS_LPA(LONG, type, D0),
381 AROS_LPA(LONG, version, D1),
382 AROS_LPA(APTR, destination, A0),
383 AROS_LPA(LONG, size, D2),
384 LIBBASETYPEPTR, SocketBase, 81, BSDSocket
386 AROS_LP1(LONG, AddDomainNameServer,
387 AROS_LPA(STRPTR, address, A0),
388 LIBBASETYPEPTR, SocketBase, 82, BSDSocket
390 AROS_LP1(LONG, RemoveDomainNameServer,
391 AROS_LPA(STRPTR, address, A0),
392 LIBBASETYPEPTR, SocketBase, 83, BSDSocket
394 AROS_LP1I(void, ReleaseDomainNameServerList,
395 AROS_LPA(struct List *, list, A0),
396 LIBBASETYPEPTR, SocketBase, 84, BSDSocket
398 AROS_LP0I(struct List *, ObtainDomainNameServerList,
399 LIBBASETYPEPTR, SocketBase, 85, BSDSocket
401 AROS_LP1I(void, setnetent,
402 AROS_LPA(int, stayopen, D0),
403 LIBBASETYPEPTR, SocketBase, 86, BSDSocket
405 AROS_LP0I(void, endnetent,
406 LIBBASETYPEPTR, SocketBase, 87, BSDSocket
408 AROS_LP0I(struct netent *, getnetent,
409 LIBBASETYPEPTR, SocketBase, 88, BSDSocket
411 AROS_LP1I(void, setprotoent,
412 AROS_LPA(int, stayopen, D0),
413 LIBBASETYPEPTR, SocketBase, 89, BSDSocket
415 AROS_LP0(void, endprotoent,
416 LIBBASETYPEPTR, SocketBase, 90, BSDSocket
418 AROS_LP0(struct protoent *, getprotoent,
419 LIBBASETYPEPTR, SocketBase, 91, BSDSocket
421 AROS_LP1I(void, setservent,
422 AROS_LPA(int, stayopen, D0),
423 LIBBASETYPEPTR, SocketBase, 92, BSDSocket
425 AROS_LP0I(void, endservent,
426 LIBBASETYPEPTR, SocketBase, 93, BSDSocket
428 AROS_LP0I(struct servent *, getservent,
429 LIBBASETYPEPTR, SocketBase, 94, BSDSocket
431 AROS_LP2(LONG, inet_aton,
432 AROS_LPA(STRPTR, cp, A0),
433 AROS_LPA(struct in_addr *, addr, A1),
434 LIBBASETYPEPTR, SocketBase, 95, BSDSocket
436 #endif /* __CONFIG_ROADSHOW__ */
437 #endif /* CLIB_BSDSOCKET_PROTOS_H */