Skip to content

Commit

Permalink
dccp: remove obsolete code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Jan 5, 2014
1 parent cdf3e27 commit fd34d62
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
1 change: 0 additions & 1 deletion net/dccp/dccp.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ void dccp_feat_list_purge(struct list_head *fn_list);

int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
int dccp_insert_options_rsk(struct dccp_request_sock *, struct sk_buff *);
int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed);
u32 dccp_timestamp(void);
void dccp_timestamping_init(void);
int dccp_insert_option(struct sk_buff *skb, unsigned char option,
Expand Down
32 changes: 0 additions & 32 deletions net/dccp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,38 +343,6 @@ static inline int dccp_elapsed_time_len(const u32 elapsed_time)
return elapsed_time == 0 ? 0 : elapsed_time <= 0xFFFF ? 2 : 4;
}

/* FIXME: This function is currently not used anywhere */
int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed_time)
{
const int elapsed_time_len = dccp_elapsed_time_len(elapsed_time);
const int len = 2 + elapsed_time_len;
unsigned char *to;

if (elapsed_time_len == 0)
return 0;

if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN)
return -1;

DCCP_SKB_CB(skb)->dccpd_opt_len += len;

to = skb_push(skb, len);
*to++ = DCCPO_ELAPSED_TIME;
*to++ = len;

if (elapsed_time_len == 2) {
const __be16 var16 = htons((u16)elapsed_time);
memcpy(to, &var16, 2);
} else {
const __be32 var32 = htonl(elapsed_time);
memcpy(to, &var32, 4);
}

return 0;
}

EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);

static int dccp_insert_option_timestamp(struct sk_buff *skb)
{
__be32 now = htonl(dccp_timestamp());
Expand Down

0 comments on commit fd34d62

Please sign in to comment.