diff options
-rw-r--r-- | net/dccp/dccp.h | 2 | ||||
-rw-r--r-- | net/dccp/feat.c | 10 | ||||
-rw-r--r-- | net/dccp/feat.h | 1 | ||||
-rw-r--r-- | net/dccp/options.c | 4 | ||||
-rw-r--r-- | net/dccp/proto.c | 48 |
5 files changed, 25 insertions, 40 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 3ccef1b70fee..019d6ffee354 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -246,7 +246,6 @@ static inline void dccp_clear_xmit_timers(struct sock *sk) | |||
246 | extern unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu); | 246 | extern unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu); |
247 | 247 | ||
248 | extern const char *dccp_packet_name(const int type); | 248 | extern const char *dccp_packet_name(const int type); |
249 | extern const char *dccp_state_name(const int state); | ||
250 | 249 | ||
251 | extern void dccp_set_state(struct sock *sk, const int state); | 250 | extern void dccp_set_state(struct sock *sk, const int state); |
252 | extern void dccp_done(struct sock *sk); | 251 | extern void dccp_done(struct sock *sk); |
@@ -449,7 +448,6 @@ extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*); | |||
449 | extern int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed); | 448 | extern int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed); |
450 | extern u32 dccp_timestamp(void); | 449 | extern u32 dccp_timestamp(void); |
451 | extern void dccp_timestamping_init(void); | 450 | extern void dccp_timestamping_init(void); |
452 | extern int dccp_insert_option_timestamp(struct sk_buff *skb); | ||
453 | extern int dccp_insert_option(struct sk_buff *skb, unsigned char option, | 451 | extern int dccp_insert_option(struct sk_buff *skb, unsigned char option, |
454 | const void *value, unsigned char len); | 452 | const void *value, unsigned char len); |
455 | 453 | ||
diff --git a/net/dccp/feat.c b/net/dccp/feat.c index df7dd26cf07e..568def952722 100644 --- a/net/dccp/feat.c +++ b/net/dccp/feat.c | |||
@@ -730,16 +730,6 @@ int dccp_feat_register_sp(struct sock *sk, u8 feat, u8 is_local, | |||
730 | 0, list, len); | 730 | 0, list, len); |
731 | } | 731 | } |
732 | 732 | ||
733 | /* Analogous to dccp_feat_register_sp(), but for non-negotiable values */ | ||
734 | int dccp_feat_register_nn(struct sock *sk, u8 feat, u64 val) | ||
735 | { | ||
736 | /* any changes must be registered before establishing the connection */ | ||
737 | if (sk->sk_state != DCCP_CLOSED) | ||
738 | return -EISCONN; | ||
739 | if (dccp_feat_type(feat) != FEAT_NN) | ||
740 | return -EINVAL; | ||
741 | return __feat_register_nn(&dccp_sk(sk)->dccps_featneg, feat, 0, val); | ||
742 | } | ||
743 | 733 | ||
744 | /* | 734 | /* |
745 | * Tracking features whose value depend on the choice of CCID | 735 | * Tracking features whose value depend on the choice of CCID |
diff --git a/net/dccp/feat.h b/net/dccp/feat.h index f96721619def..e56a4e5e634e 100644 --- a/net/dccp/feat.h +++ b/net/dccp/feat.h | |||
@@ -111,7 +111,6 @@ extern int dccp_feat_init(struct sock *sk); | |||
111 | extern void dccp_feat_initialise_sysctls(void); | 111 | extern void dccp_feat_initialise_sysctls(void); |
112 | extern int dccp_feat_register_sp(struct sock *sk, u8 feat, u8 is_local, | 112 | extern int dccp_feat_register_sp(struct sock *sk, u8 feat, u8 is_local, |
113 | u8 const *list, u8 len); | 113 | u8 const *list, u8 len); |
114 | extern int dccp_feat_register_nn(struct sock *sk, u8 feat, u64 val); | ||
115 | extern int dccp_feat_parse_options(struct sock *, struct dccp_request_sock *, | 114 | extern int dccp_feat_parse_options(struct sock *, struct dccp_request_sock *, |
116 | u8 mand, u8 opt, u8 feat, u8 *val, u8 len); | 115 | u8 mand, u8 opt, u8 feat, u8 *val, u8 len); |
117 | extern int dccp_feat_clone_list(struct list_head const *, struct list_head *); | 116 | extern int dccp_feat_clone_list(struct list_head const *, struct list_head *); |
diff --git a/net/dccp/options.c b/net/dccp/options.c index 92718511eac5..d4b1ae0daacb 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c | |||
@@ -369,7 +369,7 @@ int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed_time) | |||
369 | 369 | ||
370 | EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time); | 370 | EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time); |
371 | 371 | ||
372 | int dccp_insert_option_timestamp(struct sk_buff *skb) | 372 | static int dccp_insert_option_timestamp(struct sk_buff *skb) |
373 | { | 373 | { |
374 | __be32 now = htonl(dccp_timestamp()); | 374 | __be32 now = htonl(dccp_timestamp()); |
375 | /* yes this will overflow but that is the point as we want a | 375 | /* yes this will overflow but that is the point as we want a |
@@ -378,8 +378,6 @@ int dccp_insert_option_timestamp(struct sk_buff *skb) | |||
378 | return dccp_insert_option(skb, DCCPO_TIMESTAMP, &now, sizeof(now)); | 378 | return dccp_insert_option(skb, DCCPO_TIMESTAMP, &now, sizeof(now)); |
379 | } | 379 | } |
380 | 380 | ||
381 | EXPORT_SYMBOL_GPL(dccp_insert_option_timestamp); | ||
382 | |||
383 | static int dccp_insert_option_timestamp_echo(struct dccp_sock *dp, | 381 | static int dccp_insert_option_timestamp_echo(struct dccp_sock *dp, |
384 | struct dccp_request_sock *dreq, | 382 | struct dccp_request_sock *dreq, |
385 | struct sk_buff *skb) | 383 | struct sk_buff *skb) |
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 096250d1323b..b054ba1f55d2 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -50,6 +50,30 @@ EXPORT_SYMBOL_GPL(dccp_hashinfo); | |||
50 | /* the maximum queue length for tx in packets. 0 is no limit */ | 50 | /* the maximum queue length for tx in packets. 0 is no limit */ |
51 | int sysctl_dccp_tx_qlen __read_mostly = 5; | 51 | int sysctl_dccp_tx_qlen __read_mostly = 5; |
52 | 52 | ||
53 | #ifdef CONFIG_IP_DCCP_DEBUG | ||
54 | static const char *dccp_state_name(const int state) | ||
55 | { | ||
56 | static const char *const dccp_state_names[] = { | ||
57 | [DCCP_OPEN] = "OPEN", | ||
58 | [DCCP_REQUESTING] = "REQUESTING", | ||
59 | [DCCP_PARTOPEN] = "PARTOPEN", | ||
60 | [DCCP_LISTEN] = "LISTEN", | ||
61 | [DCCP_RESPOND] = "RESPOND", | ||
62 | [DCCP_CLOSING] = "CLOSING", | ||
63 | [DCCP_ACTIVE_CLOSEREQ] = "CLOSEREQ", | ||
64 | [DCCP_PASSIVE_CLOSE] = "PASSIVE_CLOSE", | ||
65 | [DCCP_PASSIVE_CLOSEREQ] = "PASSIVE_CLOSEREQ", | ||
66 | [DCCP_TIME_WAIT] = "TIME_WAIT", | ||
67 | [DCCP_CLOSED] = "CLOSED", | ||
68 | }; | ||
69 | |||
70 | if (state >= DCCP_MAX_STATES) | ||
71 | return "INVALID STATE!"; | ||
72 | else | ||
73 | return dccp_state_names[state]; | ||
74 | } | ||
75 | #endif | ||
76 | |||
53 | void dccp_set_state(struct sock *sk, const int state) | 77 | void dccp_set_state(struct sock *sk, const int state) |
54 | { | 78 | { |
55 | const int oldstate = sk->sk_state; | 79 | const int oldstate = sk->sk_state; |
@@ -146,30 +170,6 @@ const char *dccp_packet_name(const int type) | |||
146 | 170 | ||
147 | EXPORT_SYMBOL_GPL(dccp_packet_name); | 171 | EXPORT_SYMBOL_GPL(dccp_packet_name); |
148 | 172 | ||
149 | const char *dccp_state_name(const int state) | ||
150 | { | ||
151 | static const char *const dccp_state_names[] = { | ||
152 | [DCCP_OPEN] = "OPEN", | ||
153 | [DCCP_REQUESTING] = "REQUESTING", | ||
154 | [DCCP_PARTOPEN] = "PARTOPEN", | ||
155 | [DCCP_LISTEN] = "LISTEN", | ||
156 | [DCCP_RESPOND] = "RESPOND", | ||
157 | [DCCP_CLOSING] = "CLOSING", | ||
158 | [DCCP_ACTIVE_CLOSEREQ] = "CLOSEREQ", | ||
159 | [DCCP_PASSIVE_CLOSE] = "PASSIVE_CLOSE", | ||
160 | [DCCP_PASSIVE_CLOSEREQ] = "PASSIVE_CLOSEREQ", | ||
161 | [DCCP_TIME_WAIT] = "TIME_WAIT", | ||
162 | [DCCP_CLOSED] = "CLOSED", | ||
163 | }; | ||
164 | |||
165 | if (state >= DCCP_MAX_STATES) | ||
166 | return "INVALID STATE!"; | ||
167 | else | ||
168 | return dccp_state_names[state]; | ||
169 | } | ||
170 | |||
171 | EXPORT_SYMBOL_GPL(dccp_state_name); | ||
172 | |||
173 | int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) | 173 | int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) |
174 | { | 174 | { |
175 | struct dccp_sock *dp = dccp_sk(sk); | 175 | struct dccp_sock *dp = dccp_sk(sk); |