diff options
author | Dmitry Mishin <dim@openvz.org> | 2006-03-21 01:45:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:45:21 -0500 |
commit | 3fdadf7d27e3fbcf72930941884387d1f4936f04 (patch) | |
tree | 167072cf1e60b6b307610563614b435ff0caa52d /net/sctp | |
parent | c750360938b403e6cc193d293cfbcb099dd6c60e (diff) |
[NET]: {get|set}sockopt compatibility layer
This patch extends {get|set}sockopt compatibility layer in order to
move protocol specific parts to their place and avoid huge universal
net/compat.c file in the future.
Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/ipv6.c | 8 | ||||
-rw-r--r-- | net/sctp/protocol.c | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 2e266129a764..bbee14d01c9b 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -875,6 +875,10 @@ static const struct proto_ops inet6_seqpacket_ops = { | |||
875 | .shutdown = inet_shutdown, | 875 | .shutdown = inet_shutdown, |
876 | .setsockopt = sock_common_setsockopt, | 876 | .setsockopt = sock_common_setsockopt, |
877 | .getsockopt = sock_common_getsockopt, | 877 | .getsockopt = sock_common_getsockopt, |
878 | #ifdef CONFIG_COMPAT | ||
879 | .compat_setsockopt = compat_sock_common_setsockopt, | ||
880 | .compat_getsockopt = compat_sock_common_getsockopt, | ||
881 | #endif | ||
878 | .sendmsg = inet_sendmsg, | 882 | .sendmsg = inet_sendmsg, |
879 | .recvmsg = sock_common_recvmsg, | 883 | .recvmsg = sock_common_recvmsg, |
880 | .mmap = sock_no_mmap, | 884 | .mmap = sock_no_mmap, |
@@ -914,6 +918,10 @@ static struct sctp_af sctp_ipv6_specific = { | |||
914 | .sctp_xmit = sctp_v6_xmit, | 918 | .sctp_xmit = sctp_v6_xmit, |
915 | .setsockopt = ipv6_setsockopt, | 919 | .setsockopt = ipv6_setsockopt, |
916 | .getsockopt = ipv6_getsockopt, | 920 | .getsockopt = ipv6_getsockopt, |
921 | #ifdef CONFIG_COMPAT | ||
922 | .compat_setsockopt = compat_ipv6_setsockopt, | ||
923 | .compat_getsockopt = compat_ipv6_getsockopt, | ||
924 | #endif | ||
917 | .get_dst = sctp_v6_get_dst, | 925 | .get_dst = sctp_v6_get_dst, |
918 | .get_saddr = sctp_v6_get_saddr, | 926 | .get_saddr = sctp_v6_get_saddr, |
919 | .copy_addrlist = sctp_v6_copy_addrlist, | 927 | .copy_addrlist = sctp_v6_copy_addrlist, |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index de693b43c8ea..d90f5491870f 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -845,6 +845,10 @@ static const struct proto_ops inet_seqpacket_ops = { | |||
845 | .shutdown = inet_shutdown, /* Looks harmless. */ | 845 | .shutdown = inet_shutdown, /* Looks harmless. */ |
846 | .setsockopt = sock_common_setsockopt, /* IP_SOL IP_OPTION is a problem. */ | 846 | .setsockopt = sock_common_setsockopt, /* IP_SOL IP_OPTION is a problem. */ |
847 | .getsockopt = sock_common_getsockopt, | 847 | .getsockopt = sock_common_getsockopt, |
848 | #ifdef CONFIG_COMPAT | ||
849 | .compat_setsockopt = compat_sock_common_setsockopt, | ||
850 | .compat_getsockopt = compat_sock_common_getsockopt, | ||
851 | #endif | ||
848 | .sendmsg = inet_sendmsg, | 852 | .sendmsg = inet_sendmsg, |
849 | .recvmsg = sock_common_recvmsg, | 853 | .recvmsg = sock_common_recvmsg, |
850 | .mmap = sock_no_mmap, | 854 | .mmap = sock_no_mmap, |
@@ -883,6 +887,10 @@ static struct sctp_af sctp_ipv4_specific = { | |||
883 | .sctp_xmit = sctp_v4_xmit, | 887 | .sctp_xmit = sctp_v4_xmit, |
884 | .setsockopt = ip_setsockopt, | 888 | .setsockopt = ip_setsockopt, |
885 | .getsockopt = ip_getsockopt, | 889 | .getsockopt = ip_getsockopt, |
890 | #ifdef CONFIG_COMPAT | ||
891 | .compat_setsockopt = compat_ip_setsockopt, | ||
892 | .compat_getsockopt = compat_ip_getsockopt, | ||
893 | #endif | ||
886 | .get_dst = sctp_v4_get_dst, | 894 | .get_dst = sctp_v4_get_dst, |
887 | .get_saddr = sctp_v4_get_saddr, | 895 | .get_saddr = sctp_v4_get_saddr, |
888 | .copy_addrlist = sctp_v4_copy_addrlist, | 896 | .copy_addrlist = sctp_v4_copy_addrlist, |