aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/dccp.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/dccp.h')
-rw-r--r--net/dccp/dccp.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index b63a82ccb2b2..5281190aa19c 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -334,7 +334,14 @@ extern struct sk_buff *dccp_ctl_make_reset(struct sock *sk,
334extern int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code); 334extern int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code);
335extern void dccp_send_close(struct sock *sk, const int active); 335extern void dccp_send_close(struct sock *sk, const int active);
336extern int dccp_invalid_packet(struct sk_buff *skb); 336extern int dccp_invalid_packet(struct sk_buff *skb);
337extern u32 dccp_sample_rtt(struct sock *sk, long delta); 337
338static inline u32 dccp_sane_rtt(long usec_sample)
339{
340 if (unlikely(usec_sample <= 0 || usec_sample > DCCP_SANE_RTT_MAX))
341 DCCP_WARN("RTT sample %ld out of bounds!\n", usec_sample);
342 return clamp_val(usec_sample, DCCP_SANE_RTT_MIN, DCCP_SANE_RTT_MAX);
343}
344extern u32 dccp_sample_rtt(struct sock *sk, long delta);
338 345
339static inline int dccp_bad_service_code(const struct sock *sk, 346static inline int dccp_bad_service_code(const struct sock *sk,
340 const __be32 service) 347 const __be32 service)