diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2006-11-13 10:25:41 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:19 -0500 |
commit | afb0a34dd3e20b3f534de19993271b8664cf10bb (patch) | |
tree | f7660923d8dfa7e75ea655b99a6b608d67dea327 /net | |
parent | 2e2e9e92bd723244ea20fa488b1780111f2b05e1 (diff) |
[DCCP]: Introduce a consistent naming scheme for sysctls
In order to make their function clearer and obtain a consistent naming
scheme to identify sysctls, all existing DCCP sysctls have been prefixed
with `sysctl_dccp', following the same convention as used by TCP.
Feature-specific sysctls retain the `feat' in the middle, although the
`default' has been dropped, since it is obvious from use.
Also removed a duplicate `dccp_feat_default_sequence_window' in ipv4.c.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/dccp.h | 12 | ||||
-rw-r--r-- | net/dccp/ipv4.c | 1 | ||||
-rw-r--r-- | net/dccp/minisocks.c | 2 | ||||
-rw-r--r-- | net/dccp/options.c | 26 | ||||
-rw-r--r-- | net/dccp/sysctl.c | 24 |
5 files changed, 32 insertions, 33 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index e7b96074a1b1..363fa520056e 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -68,12 +68,12 @@ extern void dccp_time_wait(struct sock *sk, int state, int timeo); | |||
68 | extern int sysctl_dccp_request_retries; | 68 | extern int sysctl_dccp_request_retries; |
69 | extern int sysctl_dccp_retries1; | 69 | extern int sysctl_dccp_retries1; |
70 | extern int sysctl_dccp_retries2; | 70 | extern int sysctl_dccp_retries2; |
71 | extern int dccp_feat_default_sequence_window; | 71 | extern int sysctl_dccp_feat_sequence_window; |
72 | extern int dccp_feat_default_rx_ccid; | 72 | extern int sysctl_dccp_feat_rx_ccid; |
73 | extern int dccp_feat_default_tx_ccid; | 73 | extern int sysctl_dccp_feat_tx_ccid; |
74 | extern int dccp_feat_default_ack_ratio; | 74 | extern int sysctl_dccp_feat_ack_ratio; |
75 | extern int dccp_feat_default_send_ack_vector; | 75 | extern int sysctl_dccp_feat_send_ack_vector; |
76 | extern int dccp_feat_default_send_ndp_count; | 76 | extern int sysctl_dccp_feat_send_ndp_count; |
77 | 77 | ||
78 | /* is seq1 < seq2 ? */ | 78 | /* is seq1 < seq2 ? */ |
79 | static inline int before48(const u64 seq1, const u64 seq2) | 79 | static inline int before48(const u64 seq1, const u64 seq2) |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 496112080f3d..84c05405984e 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -651,7 +651,6 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
651 | ireq = inet_rsk(req); | 651 | ireq = inet_rsk(req); |
652 | ireq->loc_addr = skb->nh.iph->daddr; | 652 | ireq->loc_addr = skb->nh.iph->daddr; |
653 | ireq->rmt_addr = skb->nh.iph->saddr; | 653 | ireq->rmt_addr = skb->nh.iph->saddr; |
654 | req->rcv_wnd = dccp_feat_default_sequence_window; | ||
655 | ireq->opt = NULL; | 654 | ireq->opt = NULL; |
656 | 655 | ||
657 | /* | 656 | /* |
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index 5b2773efd7c7..0c49733f5be1 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -300,7 +300,7 @@ void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb) | |||
300 | { | 300 | { |
301 | inet_rsk(req)->rmt_port = dccp_hdr(skb)->dccph_sport; | 301 | inet_rsk(req)->rmt_port = dccp_hdr(skb)->dccph_sport; |
302 | inet_rsk(req)->acked = 0; | 302 | inet_rsk(req)->acked = 0; |
303 | req->rcv_wnd = dccp_feat_default_sequence_window; | 303 | req->rcv_wnd = sysctl_dccp_feat_sequence_window; |
304 | } | 304 | } |
305 | 305 | ||
306 | EXPORT_SYMBOL_GPL(dccp_reqsk_init); | 306 | EXPORT_SYMBOL_GPL(dccp_reqsk_init); |
diff --git a/net/dccp/options.c b/net/dccp/options.c index fb0db1f7cd7b..121e794fe454 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c | |||
@@ -22,23 +22,23 @@ | |||
22 | #include "dccp.h" | 22 | #include "dccp.h" |
23 | #include "feat.h" | 23 | #include "feat.h" |
24 | 24 | ||
25 | int dccp_feat_default_sequence_window = DCCPF_INITIAL_SEQUENCE_WINDOW; | 25 | int sysctl_dccp_feat_sequence_window = DCCPF_INITIAL_SEQUENCE_WINDOW; |
26 | int dccp_feat_default_rx_ccid = DCCPF_INITIAL_CCID; | 26 | int sysctl_dccp_feat_rx_ccid = DCCPF_INITIAL_CCID; |
27 | int dccp_feat_default_tx_ccid = DCCPF_INITIAL_CCID; | 27 | int sysctl_dccp_feat_tx_ccid = DCCPF_INITIAL_CCID; |
28 | int dccp_feat_default_ack_ratio = DCCPF_INITIAL_ACK_RATIO; | 28 | int sysctl_dccp_feat_ack_ratio = DCCPF_INITIAL_ACK_RATIO; |
29 | int dccp_feat_default_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR; | 29 | int sysctl_dccp_feat_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR; |
30 | int dccp_feat_default_send_ndp_count = DCCPF_INITIAL_SEND_NDP_COUNT; | 30 | int sysctl_dccp_feat_send_ndp_count = DCCPF_INITIAL_SEND_NDP_COUNT; |
31 | 31 | ||
32 | EXPORT_SYMBOL_GPL(dccp_feat_default_sequence_window); | 32 | EXPORT_SYMBOL_GPL(sysctl_dccp_feat_sequence_window); |
33 | 33 | ||
34 | void dccp_minisock_init(struct dccp_minisock *dmsk) | 34 | void dccp_minisock_init(struct dccp_minisock *dmsk) |
35 | { | 35 | { |
36 | dmsk->dccpms_sequence_window = dccp_feat_default_sequence_window; | 36 | dmsk->dccpms_sequence_window = sysctl_dccp_feat_sequence_window; |
37 | dmsk->dccpms_rx_ccid = dccp_feat_default_rx_ccid; | 37 | dmsk->dccpms_rx_ccid = sysctl_dccp_feat_rx_ccid; |
38 | dmsk->dccpms_tx_ccid = dccp_feat_default_tx_ccid; | 38 | dmsk->dccpms_tx_ccid = sysctl_dccp_feat_tx_ccid; |
39 | dmsk->dccpms_ack_ratio = dccp_feat_default_ack_ratio; | 39 | dmsk->dccpms_ack_ratio = sysctl_dccp_feat_ack_ratio; |
40 | dmsk->dccpms_send_ack_vector = dccp_feat_default_send_ack_vector; | 40 | dmsk->dccpms_send_ack_vector = sysctl_dccp_feat_send_ack_vector; |
41 | dmsk->dccpms_send_ndp_count = dccp_feat_default_send_ndp_count; | 41 | dmsk->dccpms_send_ndp_count = sysctl_dccp_feat_send_ndp_count; |
42 | } | 42 | } |
43 | 43 | ||
44 | static u32 dccp_decode_value_var(const unsigned char *bf, const u8 len) | 44 | static u32 dccp_decode_value_var(const unsigned char *bf, const u8 len) |
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index 7b09f2179985..8b62061e5701 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c | |||
@@ -22,48 +22,48 @@ static struct ctl_table dccp_default_table[] = { | |||
22 | { | 22 | { |
23 | .ctl_name = NET_DCCP_DEFAULT_SEQ_WINDOW, | 23 | .ctl_name = NET_DCCP_DEFAULT_SEQ_WINDOW, |
24 | .procname = "seq_window", | 24 | .procname = "seq_window", |
25 | .data = &dccp_feat_default_sequence_window, | 25 | .data = &sysctl_dccp_feat_sequence_window, |
26 | .maxlen = sizeof(dccp_feat_default_sequence_window), | 26 | .maxlen = sizeof(sysctl_dccp_feat_sequence_window), |
27 | .mode = 0644, | 27 | .mode = 0644, |
28 | .proc_handler = proc_dointvec, | 28 | .proc_handler = proc_dointvec, |
29 | }, | 29 | }, |
30 | { | 30 | { |
31 | .ctl_name = NET_DCCP_DEFAULT_RX_CCID, | 31 | .ctl_name = NET_DCCP_DEFAULT_RX_CCID, |
32 | .procname = "rx_ccid", | 32 | .procname = "rx_ccid", |
33 | .data = &dccp_feat_default_rx_ccid, | 33 | .data = &sysctl_dccp_feat_rx_ccid, |
34 | .maxlen = sizeof(dccp_feat_default_rx_ccid), | 34 | .maxlen = sizeof(sysctl_dccp_feat_rx_ccid), |
35 | .mode = 0644, | 35 | .mode = 0644, |
36 | .proc_handler = proc_dointvec, | 36 | .proc_handler = proc_dointvec, |
37 | }, | 37 | }, |
38 | { | 38 | { |
39 | .ctl_name = NET_DCCP_DEFAULT_TX_CCID, | 39 | .ctl_name = NET_DCCP_DEFAULT_TX_CCID, |
40 | .procname = "tx_ccid", | 40 | .procname = "tx_ccid", |
41 | .data = &dccp_feat_default_tx_ccid, | 41 | .data = &sysctl_dccp_feat_tx_ccid, |
42 | .maxlen = sizeof(dccp_feat_default_tx_ccid), | 42 | .maxlen = sizeof(sysctl_dccp_feat_tx_ccid), |
43 | .mode = 0644, | 43 | .mode = 0644, |
44 | .proc_handler = proc_dointvec, | 44 | .proc_handler = proc_dointvec, |
45 | }, | 45 | }, |
46 | { | 46 | { |
47 | .ctl_name = NET_DCCP_DEFAULT_ACK_RATIO, | 47 | .ctl_name = NET_DCCP_DEFAULT_ACK_RATIO, |
48 | .procname = "ack_ratio", | 48 | .procname = "ack_ratio", |
49 | .data = &dccp_feat_default_ack_ratio, | 49 | .data = &sysctl_dccp_feat_ack_ratio, |
50 | .maxlen = sizeof(dccp_feat_default_ack_ratio), | 50 | .maxlen = sizeof(sysctl_dccp_feat_ack_ratio), |
51 | .mode = 0644, | 51 | .mode = 0644, |
52 | .proc_handler = proc_dointvec, | 52 | .proc_handler = proc_dointvec, |
53 | }, | 53 | }, |
54 | { | 54 | { |
55 | .ctl_name = NET_DCCP_DEFAULT_SEND_ACKVEC, | 55 | .ctl_name = NET_DCCP_DEFAULT_SEND_ACKVEC, |
56 | .procname = "send_ackvec", | 56 | .procname = "send_ackvec", |
57 | .data = &dccp_feat_default_send_ack_vector, | 57 | .data = &sysctl_dccp_feat_send_ack_vector, |
58 | .maxlen = sizeof(dccp_feat_default_send_ack_vector), | 58 | .maxlen = sizeof(sysctl_dccp_feat_send_ack_vector), |
59 | .mode = 0644, | 59 | .mode = 0644, |
60 | .proc_handler = proc_dointvec, | 60 | .proc_handler = proc_dointvec, |
61 | }, | 61 | }, |
62 | { | 62 | { |
63 | .ctl_name = NET_DCCP_DEFAULT_SEND_NDP, | 63 | .ctl_name = NET_DCCP_DEFAULT_SEND_NDP, |
64 | .procname = "send_ndp", | 64 | .procname = "send_ndp", |
65 | .data = &dccp_feat_default_send_ndp_count, | 65 | .data = &sysctl_dccp_feat_send_ndp_count, |
66 | .maxlen = sizeof(dccp_feat_default_send_ndp_count), | 66 | .maxlen = sizeof(sysctl_dccp_feat_send_ndp_count), |
67 | .mode = 0644, | 67 | .mode = 0644, |
68 | .proc_handler = proc_dointvec, | 68 | .proc_handler = proc_dointvec, |
69 | }, | 69 | }, |