aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c120
1 files changed, 66 insertions, 54 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 97c276f95b35..dc206f1f914f 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -788,45 +788,53 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
788} 788}
789 789
790const struct proto_ops inet_stream_ops = { 790const struct proto_ops inet_stream_ops = {
791 .family = PF_INET, 791 .family = PF_INET,
792 .owner = THIS_MODULE, 792 .owner = THIS_MODULE,
793 .release = inet_release, 793 .release = inet_release,
794 .bind = inet_bind, 794 .bind = inet_bind,
795 .connect = inet_stream_connect, 795 .connect = inet_stream_connect,
796 .socketpair = sock_no_socketpair, 796 .socketpair = sock_no_socketpair,
797 .accept = inet_accept, 797 .accept = inet_accept,
798 .getname = inet_getname, 798 .getname = inet_getname,
799 .poll = tcp_poll, 799 .poll = tcp_poll,
800 .ioctl = inet_ioctl, 800 .ioctl = inet_ioctl,
801 .listen = inet_listen, 801 .listen = inet_listen,
802 .shutdown = inet_shutdown, 802 .shutdown = inet_shutdown,
803 .setsockopt = sock_common_setsockopt, 803 .setsockopt = sock_common_setsockopt,
804 .getsockopt = sock_common_getsockopt, 804 .getsockopt = sock_common_getsockopt,
805 .sendmsg = inet_sendmsg, 805 .sendmsg = inet_sendmsg,
806 .recvmsg = sock_common_recvmsg, 806 .recvmsg = sock_common_recvmsg,
807 .mmap = sock_no_mmap, 807 .mmap = sock_no_mmap,
808 .sendpage = tcp_sendpage 808 .sendpage = tcp_sendpage,
809#ifdef CONFIG_COMPAT
810 .compat_setsockopt = compat_sock_common_setsockopt,
811 .compat_getsockopt = compat_sock_common_getsockopt,
812#endif
809}; 813};
810 814
811const struct proto_ops inet_dgram_ops = { 815const struct proto_ops inet_dgram_ops = {
812 .family = PF_INET, 816 .family = PF_INET,
813 .owner = THIS_MODULE, 817 .owner = THIS_MODULE,
814 .release = inet_release, 818 .release = inet_release,
815 .bind = inet_bind, 819 .bind = inet_bind,
816 .connect = inet_dgram_connect, 820 .connect = inet_dgram_connect,
817 .socketpair = sock_no_socketpair, 821 .socketpair = sock_no_socketpair,
818 .accept = sock_no_accept, 822 .accept = sock_no_accept,
819 .getname = inet_getname, 823 .getname = inet_getname,
820 .poll = udp_poll, 824 .poll = udp_poll,
821 .ioctl = inet_ioctl, 825 .ioctl = inet_ioctl,
822 .listen = sock_no_listen, 826 .listen = sock_no_listen,
823 .shutdown = inet_shutdown, 827 .shutdown = inet_shutdown,
824 .setsockopt = sock_common_setsockopt, 828 .setsockopt = sock_common_setsockopt,
825 .getsockopt = sock_common_getsockopt, 829 .getsockopt = sock_common_getsockopt,
826 .sendmsg = inet_sendmsg, 830 .sendmsg = inet_sendmsg,
827 .recvmsg = sock_common_recvmsg, 831 .recvmsg = sock_common_recvmsg,
828 .mmap = sock_no_mmap, 832 .mmap = sock_no_mmap,
829 .sendpage = inet_sendpage, 833 .sendpage = inet_sendpage,
834#ifdef CONFIG_COMPAT
835 .compat_setsockopt = compat_sock_common_setsockopt,
836 .compat_getsockopt = compat_sock_common_getsockopt,
837#endif
830}; 838};
831 839
832/* 840/*
@@ -834,24 +842,28 @@ const struct proto_ops inet_dgram_ops = {
834 * udp_poll 842 * udp_poll
835 */ 843 */
836static const struct proto_ops inet_sockraw_ops = { 844static const struct proto_ops inet_sockraw_ops = {
837 .family = PF_INET, 845 .family = PF_INET,
838 .owner = THIS_MODULE, 846 .owner = THIS_MODULE,
839 .release = inet_release, 847 .release = inet_release,
840 .bind = inet_bind, 848 .bind = inet_bind,
841 .connect = inet_dgram_connect, 849 .connect = inet_dgram_connect,
842 .socketpair = sock_no_socketpair, 850 .socketpair = sock_no_socketpair,
843 .accept = sock_no_accept, 851 .accept = sock_no_accept,
844 .getname = inet_getname, 852 .getname = inet_getname,
845 .poll = datagram_poll, 853 .poll = datagram_poll,
846 .ioctl = inet_ioctl, 854 .ioctl = inet_ioctl,
847 .listen = sock_no_listen, 855 .listen = sock_no_listen,
848 .shutdown = inet_shutdown, 856 .shutdown = inet_shutdown,
849 .setsockopt = sock_common_setsockopt, 857 .setsockopt = sock_common_setsockopt,
850 .getsockopt = sock_common_getsockopt, 858 .getsockopt = sock_common_getsockopt,
851 .sendmsg = inet_sendmsg, 859 .sendmsg = inet_sendmsg,
852 .recvmsg = sock_common_recvmsg, 860 .recvmsg = sock_common_recvmsg,
853 .mmap = sock_no_mmap, 861 .mmap = sock_no_mmap,
854 .sendpage = inet_sendpage, 862 .sendpage = inet_sendpage,
863#ifdef CONFIG_COMPAT
864 .compat_setsockopt = compat_sock_common_setsockopt,
865 .compat_getsockopt = compat_sock_common_getsockopt,
866#endif
855}; 867};
856 868
857static struct net_proto_family inet_family_ops = { 869static struct net_proto_family inet_family_ops = {