diff options
author | greg@kroah.com <greg@kroah.com> | 2004-10-05 18:51:53 -0700 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:37:02 -0700 |
commit | 60d1e263f0da2976938fa54efec88ab777a6b3c3 (patch) | |
tree | 94bfcc4279827a68f90f8b63c0d458ddc753c69b /klibc/include/sys/socket.h | |
parent | a0622777688ad84ef3d789e0171cfb0ca3dc21d2 (diff) |
[PATCH] oops forgot to add the new klibc/include directory
Diffstat (limited to 'klibc/include/sys/socket.h')
-rw-r--r-- | klibc/include/sys/socket.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/klibc/include/sys/socket.h b/klibc/include/sys/socket.h new file mode 100644 index 0000000000..cbc2b89591 --- /dev/null +++ b/klibc/include/sys/socket.h @@ -0,0 +1,50 @@ +/* + * sys/socket.h + */ + +#ifndef _SYS_SOCKET_H +#define _SYS_SOCKET_H + +#include <klibc/extern.h> +#include <klibc/compiler.h> +#include <linux/socket.h> + +/* For some reason these may be protected by __KERNEL__ in asm/socket.h */ +#ifndef SOCK_STREAM +# define SOCK_STREAM 1 +# define SOCK_DGRAM 2 +# define SOCK_RAW 3 +# define SOCK_RDM 4 +# define SOCK_SEQPACKET 5 +# define SOCK_PACKET 10 +#endif + +#ifdef __i386__ +# define __socketcall __extern __cdecl +#else +# define __socketcall __extern +#endif + +typedef int socklen_t; + +__socketcall int socket(int, int, int); +__socketcall int bind(int, struct sockaddr *, int); +__socketcall int connect(int, struct sockaddr *, socklen_t); +__socketcall int listen(int, int); +__socketcall int accept(int, struct sockaddr *, socklen_t *); +__socketcall int getsockname(int, struct sockaddr *, socklen_t *); +__socketcall int getpeername(int, struct sockaddr *, socklen_t *); +__socketcall int socketpair(int, int, int, int *); +__extern int send(int, const void *, size_t, unsigned int); +__socketcall int sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t); +__extern int recv(int, void *, size_t, unsigned int); +__socketcall int recvfrom(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *); +__socketcall int shutdown(int, int); +__socketcall int setsockopt(int, int, int, const void *, socklen_t); +__socketcall int getsockopt(int, int, int, void *, socklen_t *); +__socketcall int sendmsg(int, const struct msghdr *, unsigned int); +__socketcall int recvmsg(int, struct msghdr *, unsigned int); + +#undef __socketcall + +#endif /* _SYS_SOCKET_H */ |