diff options
author | Ian McDonald <iam4@cs.waikato.ac.nz> | 2005-08-19 23:23:43 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 19:02:34 -0400 |
commit | 1bc0986957b63a2fbbc46ab95d3d1d72830bda83 (patch) | |
tree | 8be8f0e0e19f58cc5cc9cb7d789f3283436712ed /net/dccp/ccids | |
parent | bf0ff9e578ba7dd8331005f00ad7310122011f43 (diff) |
[DCCP]: Fix the timestamp options
This changes timestamp, timestamp echo, and elapsed time to use units of 10
usecs as per DCCP spec. This has been tested to verify that times are correct.
Also fixed up length and used hton/ntoh more.
Still to add in later patches:
- actually use elapsed time to adjust RTT
(commented out as was prior to this patch)
- send options at times more closely following the spec
(content is now correct)
Signed-off-by: Ian McDonald <iam4@cs.waikato.ac.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids')
-rw-r--r-- | net/dccp/ccids/ccid3.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 2dd3e94ba8f4..694149061b8b 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -2,12 +2,12 @@ | |||
2 | * net/dccp/ccids/ccid3.c | 2 | * net/dccp/ccids/ccid3.c |
3 | * | 3 | * |
4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. |
5 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | ||
5 | * | 6 | * |
6 | * An implementation of the DCCP protocol | 7 | * An implementation of the DCCP protocol |
7 | * | 8 | * |
8 | * This code has been developed by the University of Waikato WAND | 9 | * This code has been developed by the University of Waikato WAND |
9 | * research group. For further information please see http://www.wand.net.nz/ | 10 | * research group. For further information please see http://www.wand.net.nz/ |
10 | * or e-mail Ian McDonald - iam4@cs.waikato.ac.nz | ||
11 | * | 11 | * |
12 | * This code also uses code from Lulea University, rereleased as GPL by its | 12 | * This code also uses code from Lulea University, rereleased as GPL by its |
13 | * authors: | 13 | * authors: |
@@ -174,14 +174,6 @@ static inline void timeval_fix(struct timeval *tv) | |||
174 | } | 174 | } |
175 | } | 175 | } |
176 | 176 | ||
177 | /* returns the difference in usecs between timeval passed in and current time */ | ||
178 | static inline u32 now_delta(struct timeval tv) { | ||
179 | struct timeval now; | ||
180 | |||
181 | do_gettimeofday(&now); | ||
182 | return ((now.tv_sec-tv.tv_sec)*1000000+now.tv_usec-tv.tv_usec); | ||
183 | } | ||
184 | |||
185 | #define CALCX_ARRSIZE 500 | 177 | #define CALCX_ARRSIZE 500 |
186 | 178 | ||
187 | #define CALCX_SPLIT 50000 | 179 | #define CALCX_SPLIT 50000 |
@@ -1110,7 +1102,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
1110 | struct ccid3_options_received *opt_recv; | 1102 | struct ccid3_options_received *opt_recv; |
1111 | struct dccp_tx_hist_entry *packet; | 1103 | struct dccp_tx_hist_entry *packet; |
1112 | unsigned long next_tmout; | 1104 | unsigned long next_tmout; |
1113 | u16 t_elapsed; | 1105 | u32 t_elapsed; |
1114 | u32 pinv; | 1106 | u32 pinv; |
1115 | u32 x_recv; | 1107 | u32 x_recv; |
1116 | u32 r_sample; | 1108 | u32 r_sample; |