1 // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 3 * net/dccp/sysctl.c 4 * 5 * An implementation of the DCCP protocol 6 * Arnaldo Carvalho de Melo <acme@mandriva.co 7 */ 8 9 #include <linux/mm.h> 10 #include <linux/sysctl.h> 11 #include "dccp.h" 12 #include "feat.h" 13 14 #ifndef CONFIG_SYSCTL 15 #error This file should not be compiled withou 16 #endif 17 18 /* Boundary values */ 19 static int u8_max = 0xFF; 20 static unsigned long seqw_min = DCCPF_SEQ_W 21 seqw_max = 0xFFFFFFFF; 22 23 static struct ctl_table dccp_default_table[] = 24 { 25 .procname = "seq_window" 26 .data = &sysctl_dccp 27 .maxlen = sizeof(sysct 28 .mode = 0644, 29 .proc_handler = proc_doulong 30 .extra1 = &seqw_min, 31 .extra2 = &seqw_max, 32 }, 33 { 34 .procname = "rx_ccid", 35 .data = &sysctl_dccp 36 .maxlen = sizeof(sysct 37 .mode = 0644, 38 .proc_handler = proc_dointve 39 .extra1 = SYSCTL_ZERO, 40 .extra2 = &u8_max, 41 }, 42 { 43 .procname = "tx_ccid", 44 .data = &sysctl_dccp 45 .maxlen = sizeof(sysct 46 .mode = 0644, 47 .proc_handler = proc_dointve 48 .extra1 = SYSCTL_ZERO, 49 .extra2 = &u8_max, 50 }, 51 { 52 .procname = "request_ret 53 .data = &sysctl_dccp 54 .maxlen = sizeof(sysct 55 .mode = 0644, 56 .proc_handler = proc_dointve 57 .extra1 = SYSCTL_ONE, 58 .extra2 = &u8_max, 59 }, 60 { 61 .procname = "retries1", 62 .data = &sysctl_dccp 63 .maxlen = sizeof(sysct 64 .mode = 0644, 65 .proc_handler = proc_dointve 66 .extra1 = SYSCTL_ZERO, 67 .extra2 = &u8_max, 68 }, 69 { 70 .procname = "retries2", 71 .data = &sysctl_dccp 72 .maxlen = sizeof(sysct 73 .mode = 0644, 74 .proc_handler = proc_dointve 75 .extra1 = SYSCTL_ZERO, 76 .extra2 = &u8_max, 77 }, 78 { 79 .procname = "tx_qlen", 80 .data = &sysctl_dccp 81 .maxlen = sizeof(sysct 82 .mode = 0644, 83 .proc_handler = proc_dointve 84 .extra1 = SYSCTL_ZERO, 85 }, 86 { 87 .procname = "sync_rateli 88 .data = &sysctl_dccp 89 .maxlen = sizeof(sysct 90 .mode = 0644, 91 .proc_handler = proc_dointve 92 }, 93 }; 94 95 static struct ctl_table_header *dccp_table_hea 96 97 int __init dccp_sysctl_init(void) 98 { 99 dccp_table_header = register_net_sysct 100 dccp_default_table); 101 102 return dccp_table_header != NULL ? 0 : 103 } 104 105 void dccp_sysctl_exit(void) 106 { 107 if (dccp_table_header != NULL) { 108 unregister_net_sysctl_table(dc 109 dccp_table_header = NULL; 110 } 111 } 112
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.