aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/options.c
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2014-01-04 16:46:11 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-04 20:18:49 -0500
commitfd34d627aee8f32d6e54fdc0347be7a18e2d65ee (patch)
tree7d7d1d30719c2299c752f8bfbd4be2cb309dbbcc /net/dccp/options.c
parentcdf3e274cf1b36e9a2fef2d175cabc566af841b2 (diff)
dccp: remove obsolete code
This function is defined but not used. Remove it now, can be resurrected if ever needed. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/options.c')
-rw-r--r--net/dccp/options.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c
index a58e0b634050..9bce31886bda 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -343,38 +343,6 @@ static inline int dccp_elapsed_time_len(const u32 elapsed_time)
343 return elapsed_time == 0 ? 0 : elapsed_time <= 0xFFFF ? 2 : 4; 343 return elapsed_time == 0 ? 0 : elapsed_time <= 0xFFFF ? 2 : 4;
344} 344}
345 345
346/* FIXME: This function is currently not used anywhere */
347int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed_time)
348{
349 const int elapsed_time_len = dccp_elapsed_time_len(elapsed_time);
350 const int len = 2 + elapsed_time_len;
351 unsigned char *to;
352
353 if (elapsed_time_len == 0)
354 return 0;
355
356 if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN)
357 return -1;
358
359 DCCP_SKB_CB(skb)->dccpd_opt_len += len;
360
361 to = skb_push(skb, len);
362 *to++ = DCCPO_ELAPSED_TIME;
363 *to++ = len;
364
365 if (elapsed_time_len == 2) {
366 const __be16 var16 = htons((u16)elapsed_time);
367 memcpy(to, &var16, 2);
368 } else {
369 const __be32 var32 = htonl(elapsed_time);
370 memcpy(to, &var32, 4);
371 }
372
373 return 0;
374}
375
376EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);
377
378static int dccp_insert_option_timestamp(struct sk_buff *skb) 346static int dccp_insert_option_timestamp(struct sk_buff *skb)
379{ 347{
380 __be32 now = htonl(dccp_timestamp()); 348 __be32 now = htonl(dccp_timestamp());