aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/options.c')
-rw-r--r--net/dccp/options.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 7d73b33a6043..3ecd319c0f59 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -23,19 +23,21 @@
23#include "dccp.h" 23#include "dccp.h"
24#include "feat.h" 24#include "feat.h"
25 25
26/* stores the default values for new connection. may be changed with sysctl */ 26int dccp_feat_default_sequence_window = DCCPF_INITIAL_SEQUENCE_WINDOW;
27static const struct dccp_options dccpo_default_values = { 27int dccp_feat_default_rx_ccid = DCCPF_INITIAL_CCID;
28 .dccpo_sequence_window = DCCPF_INITIAL_SEQUENCE_WINDOW, 28int dccp_feat_default_tx_ccid = DCCPF_INITIAL_CCID;
29 .dccpo_rx_ccid = DCCPF_INITIAL_CCID, 29int dccp_feat_default_ack_ratio = DCCPF_INITIAL_ACK_RATIO;
30 .dccpo_tx_ccid = DCCPF_INITIAL_CCID, 30int dccp_feat_default_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR;
31 .dccpo_ack_ratio = DCCPF_INITIAL_ACK_RATIO, 31int dccp_feat_default_send_ndp_count = DCCPF_INITIAL_SEND_NDP_COUNT;
32 .dccpo_send_ack_vector = DCCPF_INITIAL_SEND_ACK_VECTOR,
33 .dccpo_send_ndp_count = DCCPF_INITIAL_SEND_NDP_COUNT,
34};
35 32
36void dccp_options_init(struct dccp_options *dccpo) 33void dccp_options_init(struct dccp_options *dccpo)
37{ 34{
38 memcpy(dccpo, &dccpo_default_values, sizeof(*dccpo)); 35 dccpo->dccpo_sequence_window = dccp_feat_default_sequence_window;
36 dccpo->dccpo_rx_ccid = dccp_feat_default_rx_ccid;
37 dccpo->dccpo_tx_ccid = dccp_feat_default_tx_ccid;
38 dccpo->dccpo_ack_ratio = dccp_feat_default_ack_ratio;
39 dccpo->dccpo_send_ack_vector = dccp_feat_default_send_ack_vector;
40 dccpo->dccpo_send_ndp_count = dccp_feat_default_send_ndp_count;
39} 41}
40 42
41static u32 dccp_decode_value_var(const unsigned char *bf, const u8 len) 43static u32 dccp_decode_value_var(const unsigned char *bf, const u8 len)