aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-18 03:18:32 -0400
committerDavid S. Miller <davem@davemloft.net>2005-09-18 03:18:32 -0400
commit65299d6c3cfb49cc3eee4fc483e7edd23ea7b2ed (patch)
tree111ec511694c75d2bc0f7404f6ea02b6230cae7a /net/dccp/ccids
parentae31c3399d17b1f7bc1742724f70476b5417744f (diff)
[CCID3]: Introduce include/linux/tfrc.h
Moving the TFRC sender and receiver variables to separate structs, so that we can copy these structs to userspace thru getsockopt, dccp_diag, etc. 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.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h
index eb248778eea3..0bde4583d091 100644
--- a/net/dccp/ccids/ccid3.h
+++ b/net/dccp/ccids/ccid3.h
@@ -40,6 +40,7 @@
40#include <linux/list.h> 40#include <linux/list.h>
41#include <linux/time.h> 41#include <linux/time.h>
42#include <linux/types.h> 42#include <linux/types.h>
43#include <linux/tfrc.h>
43 44
44#define TFRC_MIN_PACKET_SIZE 16 45#define TFRC_MIN_PACKET_SIZE 16
45#define TFRC_STD_PACKET_SIZE 256 46#define TFRC_STD_PACKET_SIZE 256
@@ -93,12 +94,15 @@ struct ccid3_options_received {
93 * @ccid3hctx_hist - Packet history 94 * @ccid3hctx_hist - Packet history
94 */ 95 */
95struct ccid3_hc_tx_sock { 96struct ccid3_hc_tx_sock {
96 u32 ccid3hctx_x; 97 struct tfrc_tx_info ccid3hctx_tfrc;
97 u32 ccid3hctx_x_recv; 98#define ccid3hctx_x ccid3hctx_tfrc.tfrctx_x
98 u32 ccid3hctx_x_calc; 99#define ccid3hctx_x_recv ccid3hctx_tfrc.tfrctx_x_recv
100#define ccid3hctx_x_calc ccid3hctx_tfrc.tfrctx_x_calc
101#define ccid3hctx_rtt ccid3hctx_tfrc.tfrctx_rtt
102#define ccid3hctx_p ccid3hctx_tfrc.tfrctx_p
103#define ccid3hctx_t_rto ccid3hctx_tfrc.tfrctx_rto
104#define ccid3hctx_t_ipi ccid3hctx_tfrc.tfrctx_ipi
99 u16 ccid3hctx_s; 105 u16 ccid3hctx_s;
100 u32 ccid3hctx_rtt;
101 u32 ccid3hctx_p;
102 u8 ccid3hctx_state; 106 u8 ccid3hctx_state;
103 u8 ccid3hctx_last_win_count; 107 u8 ccid3hctx_last_win_count;
104 u8 ccid3hctx_idle; 108 u8 ccid3hctx_idle;
@@ -106,19 +110,19 @@ struct ccid3_hc_tx_sock {
106 struct timer_list ccid3hctx_no_feedback_timer; 110 struct timer_list ccid3hctx_no_feedback_timer;
107 struct timeval ccid3hctx_t_ld; 111 struct timeval ccid3hctx_t_ld;
108 struct timeval ccid3hctx_t_nom; 112 struct timeval ccid3hctx_t_nom;
109 u32 ccid3hctx_t_rto;
110 u32 ccid3hctx_t_ipi;
111 u32 ccid3hctx_delta; 113 u32 ccid3hctx_delta;
112 struct list_head ccid3hctx_hist; 114 struct list_head ccid3hctx_hist;
113 struct ccid3_options_received ccid3hctx_options_received; 115 struct ccid3_options_received ccid3hctx_options_received;
114}; 116};
115 117
116struct ccid3_hc_rx_sock { 118struct ccid3_hc_rx_sock {
119 struct tfrc_rx_info ccid3hcrx_tfrc;
120#define ccid3hcrx_x_recv ccid3hcrx_tfrc.tfrcrx_x_recv
121#define ccid3hcrx_rtt ccid3hcrx_tfrc.tfrcrx_rtt
122#define ccid3hcrx_p ccid3hcrx_tfrc.tfrcrx_p
117 u64 ccid3hcrx_seqno_last_counter:48, 123 u64 ccid3hcrx_seqno_last_counter:48,
118 ccid3hcrx_state:8, 124 ccid3hcrx_state:8,
119 ccid3hcrx_last_counter:4; 125 ccid3hcrx_last_counter:4;
120 u32 ccid3hcrx_rtt;
121 u32 ccid3hcrx_p;
122 u32 ccid3hcrx_bytes_recv; 126 u32 ccid3hcrx_bytes_recv;
123 struct timeval ccid3hcrx_tstamp_last_feedback; 127 struct timeval ccid3hcrx_tstamp_last_feedback;
124 struct timeval ccid3hcrx_tstamp_last_ack; 128 struct timeval ccid3hcrx_tstamp_last_ack;
@@ -127,7 +131,6 @@ struct ccid3_hc_rx_sock {
127 u16 ccid3hcrx_s; 131 u16 ccid3hcrx_s;
128 u32 ccid3hcrx_pinv; 132 u32 ccid3hcrx_pinv;
129 u32 ccid3hcrx_elapsed_time; 133 u32 ccid3hcrx_elapsed_time;
130 u32 ccid3hcrx_x_recv;
131}; 134};
132 135
133static inline struct ccid3_hc_tx_sock *ccid3_hc_tx_sk(const struct sock *sk) 136static inline struct ccid3_hc_tx_sock *ccid3_hc_tx_sk(const struct sock *sk)