home *** CD-ROM | disk | FTP | other *** search
- /* -*-C-*-
- *
- * $Header: /ax/networking:libs/socklib/socklib.h:networking 1.4 $
- * $Source: /ax/networking:libs/socklib/socklib.h: $
- *
- * Copyright (c) 1995 Acorn Computers Ltd., Cambridge, England
- *
- * $Log: socklib.h,v $
- * Revision 1.4 95/08/15 16:24:48 kwelton
- * Include of "sys/types.h" is now where it should be, i.e. before
- * include of "sys/socket.h".
- *
- *
- * Revision 1.3 95/05/02 17:23:22 kwelton
- * makecall() has been renamed to _makecall(), which is what it should have
- * been called in the first place.
- *
- * Revision 1.2 95/04/20 17:43:26 kwelton
- * Function prototypes altered to match the genuine functionality, not
- * whatever random argument types were used in the original library.
- *
- * Revision 1.1 95/04/20 13:40:58 kwelton
- * Initial revision
- *
- */
- #include "sys/types.h"
- #include "sys/socket.h"
- #include "sys/stat.h"
- #include "sys/time.h"
- #include "sys/uio.h"
-
- #include "kernel.h"
-
- /*
- * variable declarations
- */
- extern int errno;
- extern _kernel_oserror _inet_error;
-
- /*
- * function prototypes
- */
- extern int accept(int s, struct sockaddr *addr, int *addrlen);
-
- extern int bind(int s, struct sockaddr *name, int namelen);
-
- extern int connect(int s, struct sockaddr *name, int namelen);
-
- extern int getpeername(int s, struct sockaddr *name, int *namelen);
- extern int getsockname(int s, struct sockaddr *name, int *namelen);
- extern int getsockopt(int s, int level, int optname,
- void *optval, int *optlen);
- extern int getstablesize(void);
-
- extern int listen(int s, int backlog);
-
- extern int _makecall(int swinum, _kernel_swi_regs *in, _kernel_swi_regs *out);
-
- extern int recv(int s, char *buf, int len, int flags);
- extern int recvfrom(int s, char *buf, int len, int flags,
- struct sockaddr *from, int *fromlenaddr);
- extern int recvmsg(int s, struct msghdr *msg, int flags);
-
- extern int select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds,
- struct timeval *tv);
- extern int send(int s, char *msg, int len, int flags);
- extern int sendmsg(int s, struct msghdr *msg, int flags);
- extern int sendto(int s, char *msg, int len, int flags,
- struct sockaddr *to, int tolen);
- extern int setsockopt(int s, int level, int optname, void *optval, int optlen);
- extern int shutdown(int s, int how);
- extern int socketclose(int d);
- extern int socket(int domain, int type, int protocol);
- extern int socketstat(int s, struct stat *buf);
- extern int socketioctl(int s, unsigned long cmd, void *data);
- extern int socketread(int s, char *buf, int len);
- extern int socketreadv(int s, struct iovec *iov, int iovcnt);
- extern int socketwrite(int s, char *buf, int len);
- extern int socketwritev(int s, struct iovec *iov, int iovcnt);
-
- /* EOF socklib.h */
-