[DCCP]: Remove allocation of sysctl numbers
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 28 Nov 2006 20:14:10 +0000 (18:14 -0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:30:56 +0000 (21:30 -0800)
This is in response to a request sent earlier by Eric W. Biederman
and replaces all sysctl numbers for net.dccp.default with CTL_UNNUMBERED.

It has been tested to compile and to work.

Commiter note: I've removed the use of CTL_UNNUMBERED, not setting .ctl_name
               sets it to 0, that is the what CTL_UNNUMBERED is, reason is
               to avoid unneeded source code cluttering.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
include/linux/sysctl.h
net/dccp/sysctl.c

index 61dd99c6c2a561d50d180b1a008dd25ad4e359c5..94316a98e0d006b064a96734e1e1d9302e6225e5 100644 (file)
@@ -606,20 +606,6 @@ enum {
        NET_DCCP_DEFAULT=1,
 };
 
-/* /proc/sys/net/dccp/default */
-enum {
-       NET_DCCP_DEFAULT_SEQ_WINDOW  = 1,
-       NET_DCCP_DEFAULT_RX_CCID     = 2,
-       NET_DCCP_DEFAULT_TX_CCID     = 3,
-       NET_DCCP_DEFAULT_ACK_RATIO   = 4,
-       NET_DCCP_DEFAULT_SEND_ACKVEC = 5,
-       NET_DCCP_DEFAULT_SEND_NDP    = 6,
-       NET_DCCP_DEFAULT_REQ_RETRIES = 7,
-       NET_DCCP_DEFAULT_RETRIES1    = 8,
-       NET_DCCP_DEFAULT_RETRIES2    = 9,
-       NET_DCCP_DEFAULT_TX_QLEN     = 10,
-};
-
 /* /proc/sys/net/ipx */
 enum {
        NET_IPX_PPROP_BROADCASTING=1,
index 4775ba3faa04aff1d473191abd49b282e85d4356..fdcfca3e9208926809e769f469a0fd139050c153 100644 (file)
@@ -20,7 +20,6 @@
 
 static struct ctl_table dccp_default_table[] = {
        {
-               .ctl_name       = NET_DCCP_DEFAULT_SEQ_WINDOW,
                .procname       = "seq_window",
                .data           = &sysctl_dccp_feat_sequence_window,
                .maxlen         = sizeof(sysctl_dccp_feat_sequence_window),
@@ -28,7 +27,6 @@ static struct ctl_table dccp_default_table[] = {
                .proc_handler   = proc_dointvec,
        },
        {
-               .ctl_name       = NET_DCCP_DEFAULT_RX_CCID,
                .procname       = "rx_ccid",
                .data           = &sysctl_dccp_feat_rx_ccid,
                .maxlen         = sizeof(sysctl_dccp_feat_rx_ccid),
@@ -36,7 +34,6 @@ static struct ctl_table dccp_default_table[] = {
                .proc_handler   = proc_dointvec,
        },
        {
-               .ctl_name       = NET_DCCP_DEFAULT_TX_CCID,
                .procname       = "tx_ccid",
                .data           = &sysctl_dccp_feat_tx_ccid,
                .maxlen         = sizeof(sysctl_dccp_feat_tx_ccid),
@@ -44,7 +41,6 @@ static struct ctl_table dccp_default_table[] = {
                .proc_handler   = proc_dointvec,
        },
        {
-               .ctl_name       = NET_DCCP_DEFAULT_ACK_RATIO,
                .procname       = "ack_ratio",
                .data           = &sysctl_dccp_feat_ack_ratio,
                .maxlen         = sizeof(sysctl_dccp_feat_ack_ratio),
@@ -52,7 +48,6 @@ static struct ctl_table dccp_default_table[] = {
                .proc_handler   = proc_dointvec,
        },
        {
-               .ctl_name       = NET_DCCP_DEFAULT_SEND_ACKVEC,
                .procname       = "send_ackvec",
                .data           = &sysctl_dccp_feat_send_ack_vector,
                .maxlen         = sizeof(sysctl_dccp_feat_send_ack_vector),
@@ -60,7 +55,6 @@ static struct ctl_table dccp_default_table[] = {
                .proc_handler   = proc_dointvec,
        },
        {
-               .ctl_name       = NET_DCCP_DEFAULT_SEND_NDP,
                .procname       = "send_ndp",
                .data           = &sysctl_dccp_feat_send_ndp_count,
                .maxlen         = sizeof(sysctl_dccp_feat_send_ndp_count),
@@ -68,7 +62,6 @@ static struct ctl_table dccp_default_table[] = {
                .proc_handler   = proc_dointvec,
        },
        {
-               .ctl_name       = NET_DCCP_DEFAULT_REQ_RETRIES,
                .procname       = "request_retries",
                .data           = &sysctl_dccp_request_retries,
                .maxlen         = sizeof(sysctl_dccp_request_retries),
@@ -76,7 +69,6 @@ static struct ctl_table dccp_default_table[] = {
                .proc_handler   = proc_dointvec,
        },
        {
-               .ctl_name       = NET_DCCP_DEFAULT_RETRIES1,
                .procname       = "retries1",
                .data           = &sysctl_dccp_retries1,
                .maxlen         = sizeof(sysctl_dccp_retries1),
@@ -84,7 +76,6 @@ static struct ctl_table dccp_default_table[] = {
                .proc_handler   = proc_dointvec,
        },
        {
-               .ctl_name       = NET_DCCP_DEFAULT_RETRIES2,
                .procname       = "retries2",
                .data           = &sysctl_dccp_retries2,
                .maxlen         = sizeof(sysctl_dccp_retries2),
@@ -92,7 +83,6 @@ static struct ctl_table dccp_default_table[] = {
                .proc_handler   = proc_dointvec,
        },
        {
-               .ctl_name       = NET_DCCP_DEFAULT_TX_QLEN,
                .procname       = "tx_qlen",
                .data           = &sysctl_dccp_tx_qlen,
                .maxlen         = sizeof(sysctl_dccp_tx_qlen),