diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-03-20 22:25:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-20 22:25:02 -0500 |
commit | e55d912f5b75723159348a7fc7692f869a86636a (patch) | |
tree | c00be180cac20e4247ffda446ad266d885a1a811 /net/dccp/proto.c | |
parent | 04e2661e9c00386412b64612549cf24c8baef67c (diff) |
[DCCP] feat: Introduce sysctls for the default features
[root@qemu ~]# for a in /proc/sys/net/dccp/default/* ; do echo $a ; cat $a ; done
/proc/sys/net/dccp/default/ack_ratio
2
/proc/sys/net/dccp/default/rx_ccid
3
/proc/sys/net/dccp/default/send_ackvec
1
/proc/sys/net/dccp/default/send_ndp
1
/proc/sys/net/dccp/default/seq_window
100
/proc/sys/net/dccp/default/tx_ccid
3
[root@qemu ~]#
So if wanting to test ccid3 as the tx CCID one can just do:
[root@qemu ~]# echo 3 > /proc/sys/net/dccp/default/tx_ccid
[root@qemu ~]# echo 2 > /proc/sys/net/dccp/default/rx_ccid
[root@qemu ~]# cat /proc/sys/net/dccp/default/[tr]x_ccid
2
3
[root@qemu ~]#
Of course we also need the setsockopt for each app to tell its preferences, but
for testing or defining something other than CCID2 as the default for apps that
don't explicitely set their preference the sysctl interface is handy.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 53735ee2bbd1..6403e9306ddb 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -934,11 +934,17 @@ static int __init dccp_init(void) | |||
934 | if (rc) | 934 | if (rc) |
935 | goto out_unregister_protosw; | 935 | goto out_unregister_protosw; |
936 | 936 | ||
937 | rc = dccp_ctl_sock_init(); | 937 | rc = dccp_sysctl_init(); |
938 | if (rc) | 938 | if (rc) |
939 | goto out_ackvec_exit; | 939 | goto out_ackvec_exit; |
940 | |||
941 | rc = dccp_ctl_sock_init(); | ||
942 | if (rc) | ||
943 | goto out_sysctl_exit; | ||
940 | out: | 944 | out: |
941 | return rc; | 945 | return rc; |
946 | out_sysctl_exit: | ||
947 | dccp_sysctl_exit(); | ||
942 | out_ackvec_exit: | 948 | out_ackvec_exit: |
943 | dccp_ackvec_exit(); | 949 | dccp_ackvec_exit(); |
944 | out_unregister_protosw: | 950 | out_unregister_protosw: |
@@ -983,6 +989,7 @@ static void __exit dccp_fini(void) | |||
983 | kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); | 989 | kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); |
984 | proto_unregister(&dccp_prot); | 990 | proto_unregister(&dccp_prot); |
985 | dccp_ackvec_exit(); | 991 | dccp_ackvec_exit(); |
992 | dccp_sysctl_exit(); | ||
986 | } | 993 | } |
987 | 994 | ||
988 | module_init(dccp_init); | 995 | module_init(dccp_init); |