aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-03-21 01:48:35 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:48:35 -0500
commit543d9cfeec4d58ad3fd974db5531b06b6b95deb4 (patch)
treeb5f79a92ec01b4a97f26d48cae11566498641822 /net/ipv6/raw.c
parentf94691acf9df35d5cd828373e35391bdc4a3fde6 (diff)
[NET]: Identation & other cleanups related to compat_[gs]etsockopt cset
No code changes, just tidying up, in some cases moving EXPORT_SYMBOLs to just after the function exported, etc. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r--net/ipv6/raw.c94
1 files changed, 45 insertions, 49 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 8de5a8e59149..0f63078af41f 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -913,23 +913,21 @@ static int rawv6_setsockopt(struct sock *sk, int level, int optname,
913 913
914#ifdef CONFIG_COMPAT 914#ifdef CONFIG_COMPAT
915static int compat_rawv6_setsockopt(struct sock *sk, int level, int optname, 915static int compat_rawv6_setsockopt(struct sock *sk, int level, int optname,
916 char __user *optval, int optlen) 916 char __user *optval, int optlen)
917{ 917{
918 switch(level) { 918 switch (level) {
919 case SOL_RAW: 919 case SOL_RAW:
920 break;
921 case SOL_ICMPV6:
922 if (inet_sk(sk)->num != IPPROTO_ICMPV6)
923 return -EOPNOTSUPP;
924 return rawv6_seticmpfilter(sk, level, optname, optval, optlen);
925 case SOL_IPV6:
926 if (optname == IPV6_CHECKSUM)
920 break; 927 break;
921 928 default:
922 case SOL_ICMPV6: 929 return compat_ipv6_setsockopt(sk, level, optname,
923 if (inet_sk(sk)->num != IPPROTO_ICMPV6) 930 optval, optlen);
924 return -EOPNOTSUPP;
925 return rawv6_seticmpfilter(sk, level, optname, optval,
926 optlen);
927 case SOL_IPV6:
928 if (optname == IPV6_CHECKSUM)
929 break;
930 default:
931 return compat_ipv6_setsockopt(sk, level,
932 optname, optval, optlen);
933 }; 931 };
934 return do_rawv6_setsockopt(sk, level, optname, optval, optlen); 932 return do_rawv6_setsockopt(sk, level, optname, optval, optlen);
935} 933}
@@ -989,23 +987,21 @@ static int rawv6_getsockopt(struct sock *sk, int level, int optname,
989 987
990#ifdef CONFIG_COMPAT 988#ifdef CONFIG_COMPAT
991static int compat_rawv6_getsockopt(struct sock *sk, int level, int optname, 989static int compat_rawv6_getsockopt(struct sock *sk, int level, int optname,
992 char __user *optval, int __user *optlen) 990 char __user *optval, int __user *optlen)
993{ 991{
994 switch(level) { 992 switch (level) {
995 case SOL_RAW: 993 case SOL_RAW:
994 break;
995 case SOL_ICMPV6:
996 if (inet_sk(sk)->num != IPPROTO_ICMPV6)
997 return -EOPNOTSUPP;
998 return rawv6_geticmpfilter(sk, level, optname, optval, optlen);
999 case SOL_IPV6:
1000 if (optname == IPV6_CHECKSUM)
996 break; 1001 break;
997 1002 default:
998 case SOL_ICMPV6: 1003 return compat_ipv6_getsockopt(sk, level, optname,
999 if (inet_sk(sk)->num != IPPROTO_ICMPV6) 1004 optval, optlen);
1000 return -EOPNOTSUPP;
1001 return rawv6_geticmpfilter(sk, level, optname, optval,
1002 optlen);
1003 case SOL_IPV6:
1004 if (optname == IPV6_CHECKSUM)
1005 break;
1006 default:
1007 return compat_ipv6_getsockopt(sk, level,
1008 optname, optval, optlen);
1009 }; 1005 };
1010 return do_rawv6_getsockopt(sk, level, optname, optval, optlen); 1006 return do_rawv6_getsockopt(sk, level, optname, optval, optlen);
1011} 1007}
@@ -1056,27 +1052,27 @@ static int rawv6_init_sk(struct sock *sk)
1056} 1052}
1057 1053
1058struct proto rawv6_prot = { 1054struct proto rawv6_prot = {
1059 .name = "RAWv6", 1055 .name = "RAWv6",
1060 .owner = THIS_MODULE, 1056 .owner = THIS_MODULE,
1061 .close = rawv6_close, 1057 .close = rawv6_close,
1062 .connect = ip6_datagram_connect, 1058 .connect = ip6_datagram_connect,
1063 .disconnect = udp_disconnect, 1059 .disconnect = udp_disconnect,
1064 .ioctl = rawv6_ioctl, 1060 .ioctl = rawv6_ioctl,
1065 .init = rawv6_init_sk, 1061 .init = rawv6_init_sk,
1066 .destroy = inet6_destroy_sock, 1062 .destroy = inet6_destroy_sock,
1067 .setsockopt = rawv6_setsockopt, 1063 .setsockopt = rawv6_setsockopt,
1068 .getsockopt = rawv6_getsockopt, 1064 .getsockopt = rawv6_getsockopt,
1065 .sendmsg = rawv6_sendmsg,
1066 .recvmsg = rawv6_recvmsg,
1067 .bind = rawv6_bind,
1068 .backlog_rcv = rawv6_rcv_skb,
1069 .hash = raw_v6_hash,
1070 .unhash = raw_v6_unhash,
1071 .obj_size = sizeof(struct raw6_sock),
1069#ifdef CONFIG_COMPAT 1072#ifdef CONFIG_COMPAT
1070 .compat_setsockopt = compat_rawv6_setsockopt, 1073 .compat_setsockopt = compat_rawv6_setsockopt,
1071 .compat_getsockopt = compat_rawv6_getsockopt, 1074 .compat_getsockopt = compat_rawv6_getsockopt,
1072#endif 1075#endif
1073 .sendmsg = rawv6_sendmsg,
1074 .recvmsg = rawv6_recvmsg,
1075 .bind = rawv6_bind,
1076 .backlog_rcv = rawv6_rcv_skb,
1077 .hash = raw_v6_hash,
1078 .unhash = raw_v6_unhash,
1079 .obj_size = sizeof(struct raw6_sock),
1080}; 1076};
1081 1077
1082#ifdef CONFIG_PROC_FS 1078#ifdef CONFIG_PROC_FS