aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid2.h
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2010-08-29 15:23:10 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-30 16:45:25 -0400
commitd82b6f85c1d73340ef4a26bd0b247ac14610cd83 (patch)
tree633b7aa259c75a1620783cd65130436b5179a9fa /net/dccp/ccids/ccid2.h
parentdca43c75e7e545694a9dd6288553f55c53e2a3a3 (diff)
dccp ccid-2: Use u32 timestamps uniformly
Since CCID-2 is de facto a mini implementation of TCP, it makes sense to share as much code as possible. Hence this patch aligns CCID-2 timestamping with TCP timestamping. This also halves the space consumption (on 64-bit systems). The necessary include file <net/tcp.h> is already included by way of net/dccp.h. Redundant includes have been removed. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids/ccid2.h')
-rw-r--r--net/dccp/ccids/ccid2.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/net/dccp/ccids/ccid2.h b/net/dccp/ccids/ccid2.h
index b017843ba44d..9731c2dc1487 100644
--- a/net/dccp/ccids/ccid2.h
+++ b/net/dccp/ccids/ccid2.h
@@ -18,18 +18,23 @@
18#ifndef _DCCP_CCID2_H_ 18#ifndef _DCCP_CCID2_H_
19#define _DCCP_CCID2_H_ 19#define _DCCP_CCID2_H_
20 20
21#include <linux/dccp.h>
22#include <linux/timer.h> 21#include <linux/timer.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include "../ccid.h" 23#include "../ccid.h"
24#include "../dccp.h"
25
26/*
27 * CCID-2 timestamping faces the same issues as TCP timestamping.
28 * Hence we reuse/share as much of the code as possible.
29 */
30#define ccid2_time_stamp tcp_time_stamp
31
25/* NUMDUPACK parameter from RFC 4341, p. 6 */ 32/* NUMDUPACK parameter from RFC 4341, p. 6 */
26#define NUMDUPACK 3 33#define NUMDUPACK 3
27 34
28struct sock;
29
30struct ccid2_seq { 35struct ccid2_seq {
31 u64 ccid2s_seq; 36 u64 ccid2s_seq;
32 unsigned long ccid2s_sent; 37 u32 ccid2s_sent;
33 int ccid2s_acked; 38 int ccid2s_acked;
34 struct ccid2_seq *ccid2s_prev; 39 struct ccid2_seq *ccid2s_prev;
35 struct ccid2_seq *ccid2s_next; 40 struct ccid2_seq *ccid2s_next;
@@ -72,7 +77,7 @@ struct ccid2_hc_tx_sock {
72 77
73 u64 tx_rpseq; 78 u64 tx_rpseq;
74 int tx_rpdupack; 79 int tx_rpdupack;
75 unsigned long tx_last_cong; 80 u32 tx_last_cong;
76 u64 tx_high_ack; 81 u64 tx_high_ack;
77}; 82};
78 83