net: Convert all sysctl registrations to register_net_sysctl
[linux-2.6-block.git] / net / dccp / sysctl.c
index 563943822e58287412217e3e13963a507cdeff3b..607ab71b5a0cb3af65067e7d69badb862d5bfb5a 100644 (file)
@@ -21,7 +21,8 @@
 /* Boundary values */
 static int             zero     = 0,
                        u8_max   = 0xFF;
-static unsigned long   seqw_min = 32;
+static unsigned long   seqw_min = DCCPF_SEQ_WMIN,
+                       seqw_max = 0xFFFFFFFF;          /* maximum on 32 bit */
 
 static struct ctl_table dccp_default_table[] = {
        {
@@ -31,6 +32,7 @@ static struct ctl_table dccp_default_table[] = {
                .mode           = 0644,
                .proc_handler   = proc_doulongvec_minmax,
                .extra1         = &seqw_min,            /* RFC 4340, 7.5.2 */
+               .extra2         = &seqw_max,
        },
        {
                .procname       = "rx_ccid",
@@ -96,18 +98,11 @@ static struct ctl_table dccp_default_table[] = {
        { }
 };
 
-static struct ctl_path dccp_path[] = {
-       { .procname = "net", },
-       { .procname = "dccp", },
-       { .procname = "default", },
-       { }
-};
-
 static struct ctl_table_header *dccp_table_header;
 
 int __init dccp_sysctl_init(void)
 {
-       dccp_table_header = register_sysctl_paths(dccp_path,
+       dccp_table_header = register_net_sysctl(&init_net, "net/dccp/default",
                        dccp_default_table);
 
        return dccp_table_header != NULL ? 0 : -ENOMEM;
@@ -116,7 +111,7 @@ int __init dccp_sysctl_init(void)
 void dccp_sysctl_exit(void)
 {
        if (dccp_table_header != NULL) {
-               unregister_sysctl_table(dccp_table_header);
+               unregister_net_sysctl_table(dccp_table_header);
                dccp_table_header = NULL;
        }
 }