| Arnaldo Carvalho de Melo | 65299d6 | 2005-09-18 00:18:32 -0700 | [diff] [blame] | 1 | #ifndef _LINUX_TFRC_H_ | 
 | 2 | #define _LINUX_TFRC_H_ | 
 | 3 | /* | 
| Gerrit Renker | d61c167 | 2006-11-27 12:31:45 -0200 | [diff] [blame] | 4 |  *  TFRC - Data Structures for the TCP-Friendly Rate Control congestion | 
 | 5 |  *         control mechanism as specified in RFC 3448. | 
| Arnaldo Carvalho de Melo | 65299d6 | 2005-09-18 00:18:32 -0700 | [diff] [blame] | 6 |  * | 
 | 7 |  *  Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 
 | 8 |  *  Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | 
 | 9 |  *  Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 
 | 10 |  *  Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon | 
 | 11 |  * | 
 | 12 |  *  This program is free software; you can redistribute it and/or modify | 
 | 13 |  *  it under the terms of the GNU General Public License as published by | 
 | 14 |  *  the Free Software Foundation; either version 2 of the License, or | 
 | 15 |  *  (at your option) any later version. | 
 | 16 |  */ | 
| Arnaldo Carvalho de Melo | 65299d6 | 2005-09-18 00:18:32 -0700 | [diff] [blame] | 17 | #include <linux/types.h> | 
 | 18 |  | 
| Gerrit Renker | d61c167 | 2006-11-27 12:31:45 -0200 | [diff] [blame] | 19 | /** 	tfrc_rx_info    -    TFRC Receiver Data Structure | 
 | 20 |  * | 
 | 21 |  * 	@tfrcrx_x_recv:	receiver estimate of sending rate (3.2.2) | 
 | 22 |  * 	@tfrcrx_rtt:	round-trip-time (communicated by sender) | 
 | 23 |  * 	@tfrcrx_p:	current estimate of loss event rate (3.2.2) | 
 | 24 |  */ | 
| Arnaldo Carvalho de Melo | 65299d6 | 2005-09-18 00:18:32 -0700 | [diff] [blame] | 25 | struct tfrc_rx_info { | 
 | 26 |   	__u32 tfrcrx_x_recv; | 
 | 27 | 	__u32 tfrcrx_rtt; | 
 | 28 |   	__u32 tfrcrx_p; | 
 | 29 | }; | 
 | 30 |  | 
| Gerrit Renker | d61c167 | 2006-11-27 12:31:45 -0200 | [diff] [blame] | 31 | /** 	tfrc_tx_info    -    TFRC Sender Data Structure | 
 | 32 |  * | 
 | 33 |  * 	@tfrctx_x:	computed transmit rate (4.3 (4)) | 
 | 34 |  * 	@tfrctx_x_recv: receiver estimate of send rate (4.3) | 
 | 35 |  * 	@tfrctx_x_calc:	return value of throughput equation (3.1) | 
 | 36 |  * 	@tfrctx_rtt:	(moving average) estimate of RTT (4.3) | 
 | 37 |  * 	@tfrctx_p:	current loss event rate (5.4) | 
 | 38 |  * 	@tfrctx_rto:	estimate of RTO, equals 4*RTT (4.3) | 
 | 39 |  * 	@tfrctx_ipi:	inter-packet interval (4.6) | 
| Gerrit Renker | 1a21e49 | 2006-12-10 00:02:12 -0200 | [diff] [blame] | 40 |  * | 
 | 41 |  *  Note: X and X_recv are both maintained in units of 64 * bytes/second. This | 
 | 42 |  *        enables a finer resolution of sending rates and avoids problems with | 
 | 43 |  *        integer arithmetic; u32 is not sufficient as scaling consumes 6 bits. | 
| Gerrit Renker | d61c167 | 2006-11-27 12:31:45 -0200 | [diff] [blame] | 44 |  */ | 
| Arnaldo Carvalho de Melo | 65299d6 | 2005-09-18 00:18:32 -0700 | [diff] [blame] | 45 | struct tfrc_tx_info { | 
| Gerrit Renker | 1a21e49 | 2006-12-10 00:02:12 -0200 | [diff] [blame] | 46 | 	__u64 tfrctx_x; | 
 | 47 | 	__u64 tfrctx_x_recv; | 
| Arnaldo Carvalho de Melo | 65299d6 | 2005-09-18 00:18:32 -0700 | [diff] [blame] | 48 | 	__u32 tfrctx_x_calc; | 
 | 49 | 	__u32 tfrctx_rtt; | 
 | 50 | 	__u32 tfrctx_p; | 
 | 51 | 	__u32 tfrctx_rto; | 
 | 52 | 	__u32 tfrctx_ipi; | 
 | 53 | }; | 
 | 54 |  | 
 | 55 | #endif /* _LINUX_TFRC_H_ */ |