cregit-Linux how code gets into the kernel

Release 4.15 net/dccp/sysctl.c

Directory: net/dccp
/*
 *  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>
#include "dccp.h"
#include "feat.h"

#ifndef CONFIG_SYSCTL
#error This file should not be compiled without CONFIG_SYSCTL defined
#endif

/* Boundary values */

static int		zero     = 0,
			
one      = 1,
			
u8_max   = 0xFF;

static unsigned long	seqw_min = DCCPF_SEQ_WMIN,
			
seqw_max = 0xFFFFFFFF;		
/* maximum on 32 bit */


static struct ctl_table dccp_default_table[] = {
	{
		.procname	= "seq_window",
		.data		= &sysctl_dccp_sequence_window,
		.maxlen		= sizeof(sysctl_dccp_sequence_window),
		.mode		= 0644,
		.proc_handler	= proc_doulongvec_minmax,
		.extra1		= &seqw_min,		/* RFC 4340, 7.5.2 */
		.extra2		= &seqw_max,
        },
	{
		.procname	= "rx_ccid",
		.data		= &sysctl_dccp_rx_ccid,
		.maxlen		= sizeof(sysctl_dccp_rx_ccid),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &u8_max,		/* RFC 4340, 10. */
	},
	{
		.procname	= "tx_ccid",
		.data		= &sysctl_dccp_tx_ccid,
		.maxlen		= sizeof(sysctl_dccp_tx_ccid),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &u8_max,		/* RFC 4340, 10. */
	},
	{
		.procname	= "request_retries",
		.data		= &sysctl_dccp_request_retries,
		.maxlen		= sizeof(sysctl_dccp_request_retries),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &one,
		.extra2		= &u8_max,
        },
	{
		.procname	= "retries1",
		.data		= &sysctl_dccp_retries1,
		.maxlen		= sizeof(sysctl_dccp_retries1),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &u8_max,
        },
	{
		.procname	= "retries2",
		.data		= &sysctl_dccp_retries2,
		.maxlen		= sizeof(sysctl_dccp_retries2),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
		.extra2		= &u8_max,
        },
	{
		.procname	= "tx_qlen",
		.data		= &sysctl_dccp_tx_qlen,
		.maxlen		= sizeof(sysctl_dccp_tx_qlen),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_minmax,
		.extra1		= &zero,
        },
	{
		.procname	= "sync_ratelimit",
		.data		= &sysctl_dccp_sync_ratelimit,
		.maxlen		= sizeof(sysctl_dccp_sync_ratelimit),
		.mode		= 0644,
		.proc_handler	= proc_dointvec_ms_jiffies,
        },

	{ }
};


static struct ctl_table_header *dccp_table_header;


int __init dccp_sysctl_init(void) { dccp_table_header = register_net_sysctl(&init_net, "net/dccp/default", dccp_default_table); return dccp_table_header != NULL ? 0 : -ENOMEM; }

Contributors

PersonTokensPropCommitsCommitProp
Arnaldo Carvalho de Melo2376.67%125.00%
Eric W. Biedermann516.67%250.00%
Pavel Emelyanov26.67%125.00%
Total30100.00%4100.00%


void dccp_sysctl_exit(void) { if (dccp_table_header != NULL) { unregister_net_sysctl_table(dccp_table_header); dccp_table_header = NULL; } }

Contributors

PersonTokensPropCommitsCommitProp
Arnaldo Carvalho de Melo2395.83%150.00%
Eric W. Biedermann14.17%150.00%
Total24100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Gerrit Renker24153.67%433.33%
Arnaldo Carvalho de Melo16135.86%18.33%
Ian McDonald337.35%216.67%
Eric W. Biedermann71.56%325.00%
Wang Weidong51.11%18.33%
Pavel Emelyanov20.45%18.33%
Total449100.00%12100.00%
Directory: net/dccp
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.