~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/dccp/sysctl.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /net/dccp/sysctl.c (Version linux-6.12-rc7) and /net/dccp/sysctl.c (Version linux-6.10.14)


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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php