123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- #ifndef _DCCP_CCID2_H_
- #define _DCCP_CCID2_H_
- #include <linux/timer.h>
- #include <linux/types.h>
- #include "../ccid.h"
- #include "../dccp.h"
- #define ccid2_time_stamp tcp_time_stamp
- #define NUMDUPACK 3
- struct ccid2_seq {
- u64 ccid2s_seq;
- u32 ccid2s_sent;
- int ccid2s_acked;
- struct ccid2_seq *ccid2s_prev;
- struct ccid2_seq *ccid2s_next;
- };
- #define CCID2_SEQBUF_LEN 1024
- #define CCID2_SEQBUF_MAX 128
- #define CCID2_WIN_CHANGE_FACTOR 5
- struct ccid2_hc_tx_sock {
- u32 tx_cwnd;
- u32 tx_ssthresh;
- u32 tx_pipe;
- u32 tx_packets_acked;
- struct ccid2_seq *tx_seqbuf[CCID2_SEQBUF_MAX];
- int tx_seqbufc;
- struct ccid2_seq *tx_seqh;
- struct ccid2_seq *tx_seqt;
-
- u32 tx_srtt,
- tx_mdev,
- tx_mdev_max,
- tx_rttvar,
- tx_rto;
- u64 tx_rtt_seq:48;
- struct timer_list tx_rtotimer;
-
- u32 tx_cwnd_used,
- tx_expected_wnd,
- tx_cwnd_stamp,
- tx_lsndtime;
- u64 tx_rpseq;
- int tx_rpdupack;
- u32 tx_last_cong;
- u64 tx_high_ack;
- struct list_head tx_av_chunks;
- };
- static inline bool ccid2_cwnd_network_limited(struct ccid2_hc_tx_sock *hc)
- {
- return hc->tx_pipe >= hc->tx_cwnd;
- }
- static inline u32 rfc3390_bytes_to_packets(const u32 smss)
- {
- return smss <= 1095 ? 4 : (smss > 2190 ? 2 : 3);
- }
- struct ccid2_hc_rx_sock {
- u32 rx_num_data_pkts;
- };
- static inline struct ccid2_hc_tx_sock *ccid2_hc_tx_sk(const struct sock *sk)
- {
- return ccid_priv(dccp_sk(sk)->dccps_hc_tx_ccid);
- }
- static inline struct ccid2_hc_rx_sock *ccid2_hc_rx_sk(const struct sock *sk)
- {
- return ccid_priv(dccp_sk(sk)->dccps_hc_rx_ccid);
- }
- #endif
|