Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6/cjktty.git] / include / net / inet_common.h
blob22fac9892b160c06cecb83d8b98c9fcef155ebd8
1 #ifndef _INET_COMMON_H
2 #define _INET_COMMON_H
4 extern const struct proto_ops inet_stream_ops;
5 extern const struct proto_ops inet_dgram_ops;
7 /*
8 * INET4 prototypes used by INET6
9 */
11 struct msghdr;
12 struct sock;
13 struct sockaddr;
14 struct socket;
16 extern int inet_release(struct socket *sock);
17 extern int inet_stream_connect(struct socket *sock, struct sockaddr * uaddr,
18 int addr_len, int flags);
19 extern int inet_dgram_connect(struct socket *sock, struct sockaddr * uaddr,
20 int addr_len, int flags);
21 extern int inet_accept(struct socket *sock, struct socket *newsock, int flags);
22 extern int inet_sendmsg(struct kiocb *iocb, struct socket *sock,
23 struct msghdr *msg, size_t size);
24 extern ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset,
25 size_t size, int flags);
26 extern int inet_recvmsg(struct kiocb *iocb, struct socket *sock,
27 struct msghdr *msg, size_t size, int flags);
28 extern int inet_shutdown(struct socket *sock, int how);
29 extern int inet_listen(struct socket *sock, int backlog);
30 extern void inet_sock_destruct(struct sock *sk);
31 extern int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len);
32 extern int inet_getname(struct socket *sock, struct sockaddr *uaddr,
33 int *uaddr_len, int peer);
34 extern int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
35 extern int inet_ctl_sock_create(struct sock **sk, unsigned short family,
36 unsigned short type, unsigned char protocol,
37 struct net *net);
39 static inline void inet_ctl_sock_destroy(struct sock *sk)
41 sk_release_kernel(sk);
44 #endif