4 libbasetype struct bsdsocketBase
10 #include <devices/timer.h>
11 #include <utility/tagitem.h>
13 #include <aros/preprocessor/variadic/cast2iptr.hpp>
14 #include <sys/socket.h>
16 /* Stub macros for 'emulation' of some functions */
17 #define select(nfds,rfds,wfds,efds,timeout) WaitSelect(nfds,rfds,wfds,efds,timeout,NULL)
18 #define inet_ntoa(addr) Inet_NtoA(((struct in_addr)addr).s_addr)
20 #if !defined(NO_INLINE_STDARG) && !defined(BSDSOCKET_NO_INLINE_STDARG)
21 #define syslog(arg1, arg2, ...) \
23 IPTR __args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
24 vsyslog(arg1, arg2, __args); \
26 #endif /* !NO_INLINE_STDARG */
31 #include "bsdsocket_intern.h"
35 int socket(int domain, int type, int protocol) (D0, D1, D2)
36 int bind(int s, struct sockaddr *name, int namelen) (D0, A0, D1)
37 int listen(int s, int backlog) (D0, D1)
38 int accept(int s, struct sockaddr *addr, int *addrlen) (D0, A0, A1)
39 int connect(int s, struct sockaddr *name, int namelen) (D0, A0, D1)
40 int sendto(int s, const void *msg, int len, int flags, const struct sockaddr *to, int tolen) (D0, A0, D1, D2, A1, D3)
41 int send(int s, const void *msg, int len, int flags) (D0, A0, D1, D2)
42 int recvfrom(int s, void *buf, int len, int flags, struct sockaddr *from, int *fromlen) (D0, A0, D1, D2, A1, A2)
43 int recv(int s, void *buf, int len, int flags) (D0, A0, D1, D2)
44 int shutdown(int s, int how) (D0, D1)
45 int setsockopt(int s, int level, int optname, void *optval, int optlen) (D0, D1, D2, A0, D3)
46 int getsockopt(int s, int level, int optname, void *optval, void *optlen) (D0, D1, D2, A0, A1)
47 int getsockname(int s, struct sockaddr *name, int *namelen) (D0, A0, A1)
48 int getpeername(int s, struct sockaddr *name, int *namelen) (D0, A0, A1)
49 int IoctlSocket(int s, unsigned long request, char *argp) (D0, D1, A0)
50 int CloseSocket(int s) (D0)
51 int WaitSelect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout, ULONG *sigmask) (D0, A0, A1, A2, A3, D1)
52 void SetSocketSignals(ULONG intrmask, ULONG iomask, ULONG urgmask) (D0, D1, D2)
53 int getdtablesize() ()
54 LONG ObtainSocket(LONG id, LONG domain, LONG type, LONG protocol) (D0, D1, D2, D3)
55 LONG ReleaseSocket(LONG sd, LONG id) (D0, D1)
56 LONG ReleaseCopyOfSocket(LONG sd, LONG id) (D0, D1)
58 void SetErrnoPtr(void *ptr, int size) (A0, D0)
59 char *Inet_NtoA(unsigned long in) (D0)
60 unsigned long inet_addr(const char *cp) (A0)
61 unsigned long Inet_LnaOf(unsigned long in) (D0)
62 unsigned long Inet_NetOf(unsigned long in) (D0)
63 unsigned long Inet_MakeAddr(int net, int lna) (D0, D1)
64 unsigned long inet_network(const char *cp) (A0)
65 struct hostent *gethostbyname(char *name) (A0)
66 struct hostent *gethostbyaddr(char *addr, int len, int type) (A0, D0, D1)
67 struct netent *getnetbyname(char *name) (A0)
68 struct netent *getnetbyaddr(long net, int type) (D0, D1)
69 struct servent *getservbyname(char *name, char *proto) (A0, A1)
70 struct servent *getservbyport(int port, char *proto) (D0, A0)
71 struct protoent *getprotobyname(char *name) (A0)
72 struct protoent *getprotobynumber(int proto) (D0)
73 void vsyslog(int level, const char *format, LONG *args) (D0, A0, A1)
74 int Dup2Socket(int fd1, int fd2) (D0, D1)
75 int sendmsg(int s, const struct msghdr *msg, int flags) (D0, A0, D1)
76 int recvmsg(int s, struct msghdr *msg, int flags) (D0, A0, D1)
77 int gethostname(char *name, int namelen) (A0, D0)
79 ULONG SocketBaseTagList(struct TagItem *tagList) (A0)
80 LONG GetSocketEvents(ULONG *eventsp) (A0)