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.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 4efdce47000b..aab72b8d0703 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -4,7 +4,8 @@
4 * net/dccp/dccp.h 4 * net/dccp/dccp.h
5 * 5 *
6 * An implementation of the DCCP protocol 6 * An implementation of the DCCP protocol
7 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> 7 * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8 * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz>
8 * 9 *
9 * This program is free software; you can redistribute it and/or modify it 10 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License version 2 as 11 * under the terms of the GNU General Public License version 2 as
@@ -404,6 +405,7 @@ extern struct socket *dccp_ctl_socket;
404 * @dccpap_ack_nonce - the one-bit sum of the ECN Nonces for all State 0. 405 * @dccpap_ack_nonce - the one-bit sum of the ECN Nonces for all State 0.
405 * 406 *
406 * @dccpap_buf_len - circular buffer length 407 * @dccpap_buf_len - circular buffer length
408 * @dccpap_time - the time in usecs
407 * @dccpap_buf - circular buffer of acknowledgeable packets 409 * @dccpap_buf - circular buffer of acknowledgeable packets
408 */ 410 */
409struct dccp_ackpkts { 411struct dccp_ackpkts {
@@ -416,7 +418,7 @@ struct dccp_ackpkts {
416 unsigned int dccpap_buf_vector_len; 418 unsigned int dccpap_buf_vector_len;
417 unsigned int dccpap_ack_vector_len; 419 unsigned int dccpap_ack_vector_len;
418 unsigned int dccpap_buf_len; 420 unsigned int dccpap_buf_len;
419 unsigned long dccpap_time; 421 struct timeval dccpap_time;
420 u8 dccpap_buf_nonce; 422 u8 dccpap_buf_nonce;
421 u8 dccpap_ack_nonce; 423 u8 dccpap_ack_nonce;
422 u8 dccpap_buf[0]; 424 u8 dccpap_buf[0];
@@ -430,6 +432,19 @@ extern int dccp_ackpkts_add(struct dccp_ackpkts *ap, u64 ackno, u8 state);
430extern void dccp_ackpkts_check_rcv_ackno(struct dccp_ackpkts *ap, 432extern void dccp_ackpkts_check_rcv_ackno(struct dccp_ackpkts *ap,
431 struct sock *sk, u64 ackno); 433 struct sock *sk, u64 ackno);
432 434
435/*
436 * Returns the difference in usecs between timeval
437 * passed in and current time
438 */
439static inline u32 now_delta(struct timeval tv)
440{
441 struct timeval now;
442
443 do_gettimeofday(&now);
444 return (now.tv_sec - tv.tv_sec) * USEC_PER_SEC +
445 (now.tv_usec - tv.tv_usec);
446}
447
433#ifdef CONFIG_IP_DCCP_DEBUG 448#ifdef CONFIG_IP_DCCP_DEBUG
434extern void dccp_ackvector_print(const u64 ackno, 449extern void dccp_ackvector_print(const u64 ackno,
435 const unsigned char *vector, int len); 450 const unsigned char *vector, int len);