2006-03-21 06:25:02 +03:00
/*
* net / dccp / sysctl . c
*
* An implementation of the DCCP protocol
* Arnaldo Carvalho de Melo < acme @ mandriva . com >
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License v2
* as published by the Free Software Foundation .
*/
# include <linux/mm.h>
# include <linux/sysctl.h>
2006-11-13 18:23:52 +03:00
# include "dccp.h"
2006-08-27 06:15:35 +04:00
# include "feat.h"
2006-03-21 06:25:02 +03:00
# ifndef CONFIG_SYSCTL
# error This file should not be compiled without CONFIG_SYSCTL defined
# endif
static struct ctl_table dccp_default_table [ ] = {
{
. procname = " seq_window " ,
2006-11-13 18:25:41 +03:00
. data = & sysctl_dccp_feat_sequence_window ,
. maxlen = sizeof ( sysctl_dccp_feat_sequence_window ) ,
2006-03-21 06:25:02 +03:00
. mode = 0644 ,
. proc_handler = proc_dointvec ,
} ,
{
. procname = " rx_ccid " ,
2006-11-13 18:25:41 +03:00
. data = & sysctl_dccp_feat_rx_ccid ,
. maxlen = sizeof ( sysctl_dccp_feat_rx_ccid ) ,
2006-03-21 06:25:02 +03:00
. mode = 0644 ,
. proc_handler = proc_dointvec ,
} ,
{
. procname = " tx_ccid " ,
2006-11-13 18:25:41 +03:00
. data = & sysctl_dccp_feat_tx_ccid ,
. maxlen = sizeof ( sysctl_dccp_feat_tx_ccid ) ,
2006-03-21 06:25:02 +03:00
. mode = 0644 ,
. proc_handler = proc_dointvec ,
} ,
2006-11-13 18:23:52 +03:00
{
. procname = " request_retries " ,
. data = & sysctl_dccp_request_retries ,
. maxlen = sizeof ( sysctl_dccp_request_retries ) ,
. mode = 0644 ,
. proc_handler = proc_dointvec ,
} ,
{
. procname = " retries1 " ,
. data = & sysctl_dccp_retries1 ,
. maxlen = sizeof ( sysctl_dccp_retries1 ) ,
. mode = 0644 ,
. proc_handler = proc_dointvec ,
} ,
{
. procname = " retries2 " ,
. data = & sysctl_dccp_retries2 ,
. maxlen = sizeof ( sysctl_dccp_retries2 ) ,
. mode = 0644 ,
. proc_handler = proc_dointvec ,
} ,
2006-11-21 00:19:32 +03:00
{
. procname = " tx_qlen " ,
. data = & sysctl_dccp_tx_qlen ,
. maxlen = sizeof ( sysctl_dccp_tx_qlen ) ,
. mode = 0644 ,
. proc_handler = proc_dointvec ,
} ,
2007-09-26 18:31:49 +04:00
{
. procname = " sync_ratelimit " ,
. data = & sysctl_dccp_sync_ratelimit ,
. maxlen = sizeof ( sysctl_dccp_sync_ratelimit ) ,
. mode = 0644 ,
. proc_handler = proc_dointvec_ms_jiffies ,
} ,
2006-11-21 00:19:32 +03:00
2006-03-21 06:25:02 +03:00
{ . ctl_name = 0 , }
} ;
2008-01-09 11:30:05 +03:00
static struct ctl_path dccp_path [ ] = {
{ . procname = " net " , . ctl_name = CTL_NET , } ,
{ . procname = " dccp " , . ctl_name = NET_DCCP , } ,
{ . procname = " default " , . ctl_name = NET_DCCP_DEFAULT , } ,
{ }
2006-03-21 06:25:02 +03:00
} ;
static struct ctl_table_header * dccp_table_header ;
int __init dccp_sysctl_init ( void )
{
2008-01-09 11:30:05 +03:00
dccp_table_header = register_sysctl_paths ( dccp_path ,
dccp_default_table ) ;
2006-03-21 06:25:02 +03:00
return dccp_table_header ! = NULL ? 0 : - ENOMEM ;
}
void dccp_sysctl_exit ( void )
{
if ( dccp_table_header ! = NULL ) {
unregister_sysctl_table ( dccp_table_header ) ;
dccp_table_header = NULL ;
}
}