···4949 return b > 20 ? tmp / (b / 10) : tmp;5050}51515252-#ifdef CCID3_DEBUG5353-extern int ccid3_debug;5252+static int ccid3_debug;54535454+#ifdef CCID3_DEBUG5555#define ccid3_pr_debug(format, a...) \5656 do { if (ccid3_debug) \5757 printk(KERN_DEBUG "%s: " format, __FUNCTION__, ##a); \···5959#else6060#define ccid3_pr_debug(format, a...)6161#endif6262-6363-#define TFRC_MIN_PACKET_SIZE 166464-#define TFRC_STD_PACKET_SIZE 2566565-#define TFRC_MAX_PACKET_SIZE 655356666-6767-#define TFRC_INITIAL_TIMEOUT (2 * USEC_PER_SEC)6868-/* two seconds as per CCID3 spec 11 */6969-7070-#define TFRC_OPSYS_HALF_TIME_GRAN (USEC_PER_SEC / (2 * HZ))7171-/* above is in usecs - half the scheduling granularity as per RFC3448 4.6 */7272-7373-#define TFRC_WIN_COUNT_PER_RTT 47474-#define TFRC_WIN_COUNT_LIMIT 167575-7676-#define TFRC_MAX_BACK_OFF_TIME 647777-/* above is in seconds */7878-7979-#define TFRC_SMALLEST_P 408080-8181-#define TFRC_RECV_IVAL_F_LENGTH 8 /* length(w[]) */8282-8383-/* Number of later packets received before one is considered lost */8484-#define TFRC_RECV_NUM_LATE_LOSS 38585-8686-enum ccid3_options {8787- TFRC_OPT_LOSS_EVENT_RATE = 192,8888- TFRC_OPT_LOSS_INTERVALS = 193,8989- TFRC_OPT_RECEIVE_RATE = 194,9090-};9191-9292-static int ccid3_debug;93629463static struct dccp_tx_hist *ccid3_tx_hist;9564static struct dccp_rx_hist *ccid3_rx_hist;
+37-5
net/dccp/ccids/ccid3.h
···3636#ifndef _DCCP_CCID3_H_3737#define _DCCP_CCID3_H_38383939-#include <linux/types.h>3939+#include <linux/config.h>4040#include <linux/list.h>4141+#include <linux/time.h>4242+#include <linux/types.h>4343+4444+#define TFRC_MIN_PACKET_SIZE 164545+#define TFRC_STD_PACKET_SIZE 2564646+#define TFRC_MAX_PACKET_SIZE 655354747+4848+/* Two seconds as per CCID3 spec */4949+#define TFRC_INITIAL_TIMEOUT (2 * USEC_PER_SEC)5050+5151+/* In usecs - half the scheduling granularity as per RFC3448 4.6 */5252+#define TFRC_OPSYS_HALF_TIME_GRAN (USEC_PER_SEC / (2 * HZ))5353+5454+#define TFRC_WIN_COUNT_PER_RTT 45555+#define TFRC_WIN_COUNT_LIMIT 165656+5757+/* In seconds */5858+#define TFRC_MAX_BACK_OFF_TIME 645959+6060+#define TFRC_SMALLEST_P 406161+6262+#define TFRC_RECV_IVAL_F_LENGTH 86363+6464+/* Number of later packets received before one is considered lost */6565+#define TFRC_RECV_NUM_LATE_LOSS 36666+6767+enum ccid3_options {6868+ TFRC_OPT_LOSS_EVENT_RATE = 192,6969+ TFRC_OPT_LOSS_INTERVALS = 193,7070+ TFRC_OPT_RECEIVE_RATE = 194,7171+};41724273struct ccid3_options_received {4374 u64 ccid3or_seqno:48,···7847 u32 ccid3or_receive_rate;7948};80498181-/** struct ccid3_hc_tx_sock - CCID3 sender half connection congestion control block5050+/** struct ccid3_hc_tx_sock - CCID3 sender half connection sock8251 *8352 * @ccid3hctx_state - Sender state8453 * @ccid3hctx_x - Current sending rate···8857 * @ccid3hctx_rtt - Estimate of current round trip time in usecs8958 * @@ccid3hctx_p - Current loss event rate (0-1) scaled by 10000009059 * @ccid3hctx_last_win_count - Last window counter sent9191- * @ccid3hctx_t_last_win_count - Timestamp of earliest packet with last_win_count value sent6060+ * @ccid3hctx_t_last_win_count - Timestamp of earliest packet6161+ * with last_win_count value sent9262 * @ccid3hctx_no_feedback_timer - Handle to no feedback timer9363 * @ccid3hctx_idle - FIXME9464 * @ccid3hctx_t_ld - Time last doubled during slow start···144112};145113146114#define ccid3_hc_tx_field(s,field) (s->dccps_hc_tx_ccid_private == NULL ? 0 : \147147- ((struct ccid3_hc_tx_sock *)s->dccps_hc_tx_ccid_private)->ccid3hctx_##field)115115+ ((struct ccid3_hc_tx_sock *)s->dccps_hc_tx_ccid_private)->ccid3hctx_##field)148116149117#define ccid3_hc_rx_field(s,field) (s->dccps_hc_rx_ccid_private == NULL ? 0 : \150150- ((struct ccid3_hc_rx_sock *)s->dccps_hc_rx_ccid_private)->ccid3hcrx_##field)118118+ ((struct ccid3_hc_rx_sock *)s->dccps_hc_rx_ccid_private)->ccid3hcrx_##field)151119152120#endif /* _DCCP_CCID3_H_ */