[DCCP]: Introduce dccp_ipv4_af_ops

And make the core DCCP code AF agnostic, just like TCP, now its time
to work on net/dccp/ipv6.c, we are close to the end!

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Arnaldo Carvalho de Melo
2005-12-13 23:16:16 -08:00
committed by David S. Miller
parent af05dc9394
commit 57cca05af1
5 changed files with 39 additions and 14 deletions

View File

@ -254,7 +254,9 @@ int dccp_setsockopt(struct sock *sk, int level, int optname,
int val;
if (level != SOL_DCCP)
return ip_setsockopt(sk, level, optname, optval, optlen);
return inet_csk(sk)->icsk_af_ops->setsockopt(sk, level,
optname, optval,
optlen);
if (optlen < sizeof(int))
return -EINVAL;
@ -320,8 +322,9 @@ int dccp_getsockopt(struct sock *sk, int level, int optname,
int val, len;
if (level != SOL_DCCP)
return ip_getsockopt(sk, level, optname, optval, optlen);
return inet_csk(sk)->icsk_af_ops->getsockopt(sk, level,
optname, optval,
optlen);
if (get_user(len, optlen))
return -EFAULT;