diff options
author | Sridhar Samudrala <sri@us.ibm.com> | 2006-08-07 23:57:31 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:54:05 -0400 |
commit | ac5a488ef252ed673cb067843e411f8cc43f7ab9 (patch) | |
tree | e607478560ed050723fe5e578dc5ede37bedfa93 /include/linux/net.h | |
parent | b63bbc5006a0a62fabc81c4f77e95f16ff16f340 (diff) |
[NET]: Round out in-kernel sockets API
This patch implements wrapper functions that provide a convenient way
to access the sockets API for in-kernel users like sunrpc, cifs &
ocfs2 etc and any future users.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/net.h')
-rw-r--r-- | include/linux/net.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index b20c53c74413..19da2c08d7b6 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -208,6 +208,25 @@ extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg, | |||
208 | struct kvec *vec, size_t num, | 208 | struct kvec *vec, size_t num, |
209 | size_t len, int flags); | 209 | size_t len, int flags); |
210 | 210 | ||
211 | extern int kernel_bind(struct socket *sock, struct sockaddr *addr, | ||
212 | int addrlen); | ||
213 | extern int kernel_listen(struct socket *sock, int backlog); | ||
214 | extern int kernel_accept(struct socket *sock, struct socket **newsock, | ||
215 | int flags); | ||
216 | extern int kernel_connect(struct socket *sock, struct sockaddr *addr, | ||
217 | int addrlen, int flags); | ||
218 | extern int kernel_getsockname(struct socket *sock, struct sockaddr *addr, | ||
219 | int *addrlen); | ||
220 | extern int kernel_getpeername(struct socket *sock, struct sockaddr *addr, | ||
221 | int *addrlen); | ||
222 | extern int kernel_getsockopt(struct socket *sock, int level, int optname, | ||
223 | char *optval, int *optlen); | ||
224 | extern int kernel_setsockopt(struct socket *sock, int level, int optname, | ||
225 | char *optval, int optlen); | ||
226 | extern int kernel_sendpage(struct socket *sock, struct page *page, int offset, | ||
227 | size_t size, int flags); | ||
228 | extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg); | ||
229 | |||
211 | #ifndef CONFIG_SMP | 230 | #ifndef CONFIG_SMP |
212 | #define SOCKOPS_WRAPPED(name) name | 231 | #define SOCKOPS_WRAPPED(name) name |
213 | #define SOCKOPS_WRAP(name, fam) | 232 | #define SOCKOPS_WRAP(name, fam) |