Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

tcp.h

Go to the documentation of this file.
00001 /* -*-  Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
00002 /*
00003  * Copyright (c) 1991-1997 Regents of the University of California.
00004  * All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  * 1. Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  * 2. Redistributions in binary form must reproduce the above copyright
00012  *    notice, this list of conditions and the following disclaimer in the
00013  *    documentation and/or other materials provided with the distribution.
00014  * 3. All advertising materials mentioning features or use of this software
00015  *    must display the following acknowledgement:
00016  *      This product includes software developed by the Computer Systems
00017  *      Engineering Group at Lawrence Berkeley Laboratory.
00018  * 4. Neither the name of the University nor of the Laboratory may be used
00019  *    to endorse or promote products derived from this software without
00020  *    specific prior written permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00023  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00025  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00026  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00027  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00028  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00029  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00030  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00031  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00032  * SUCH DAMAGE.
00033  *
00034  * @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/tcp/tcp.h,v 1.107 2003/02/12 04:16:10 sfloyd Exp $ (LBL)
00035  */
00036 #ifndef ns_tcp_h
00037 #define ns_tcp_h
00038 
00039 #include "agent.h"
00040 #include "packet.h"
00041 
00042 //class EventTrace;
00043 
00044 struct hdr_tcp {
00045 #define NSA 3
00046         double ts_;             /* time packet generated (at source) */
00047         double ts_echo_;        /* the echoed timestamp (originally sent by
00048                                    the peer) */
00049         int seqno_;             /* sequence number */
00050         int reason_;            /* reason for a retransmit */
00051         int sack_area_[NSA+1][2];       /* sack blocks: start, end of block */
00052         int sa_length_;         /* Indicate the number of SACKs in this  *
00053                                  * packet.  Adds 2+sack_length*8 bytes   */ 
00054         int ackno_;             /* ACK number for FullTcp */
00055         int hlen_;              /* header len (bytes) for FullTcp */
00056         int tcp_flags_;         /* TCP flags for FullTcp */
00057         int last_rtt_;          /* more recent RTT measurement in ms, */
00058                                 /*   for statistics only */
00059 
00060         static int offset_;     // offset for this header
00061         inline static int& offset() { return offset_; }
00062         inline static hdr_tcp* access(Packet* p) {
00063                 return (hdr_tcp*) p->access(offset_);
00064         }
00065 
00066         /* per-field member functions */
00067         double& ts() { return (ts_); }
00068         double& ts_echo() { return (ts_echo_); }
00069         int& seqno() { return (seqno_); }
00070         int& reason() { return (reason_); }
00071         int& sa_left(int n) { return (sack_area_[n][0]); }
00072         int& sa_right(int n) { return (sack_area_[n][1]); }
00073         int& sa_length() { return (sa_length_); }
00074         int& hlen() { return (hlen_); }
00075         int& ackno() { return (ackno_); }  
00076         int& flags() { return (tcp_flags_); }
00077         int& last_rtt() { return (last_rtt_); }
00078 };
00079 
00080 /* these are used to mark packets as to why we xmitted them */
00081 #define TCP_REASON_TIMEOUT      0x01
00082 #define TCP_REASON_DUPACK       0x02
00083 #define TCP_REASON_RBP          0x03   // used only in tcp-rbp.cc
00084 #define TCP_REASON_PARTIALACK   0x04
00085 
00086 /* these are reasons we adjusted our congestion window */
00087 
00088 #define CWND_ACTION_DUPACK      1       // dup acks/fast retransmit
00089 #define CWND_ACTION_TIMEOUT     2       // retransmission timeout
00090 #define CWND_ACTION_ECN         3       // ECN bit [src quench if supported]
00091 
00092 /* these are bits for how to change the cwnd and ssthresh values */
00093 
00094 #define CLOSE_SSTHRESH_HALF     0x00000001
00095 #define CLOSE_CWND_HALF         0x00000002
00096 #define CLOSE_CWND_RESTART      0x00000004
00097 #define CLOSE_CWND_INIT         0x00000008
00098 #define CLOSE_CWND_ONE          0x00000010
00099 #define CLOSE_SSTHRESH_HALVE    0x00000020
00100 #define CLOSE_CWND_HALVE        0x00000040
00101 #define THREE_QUARTER_SSTHRESH  0x00000080
00102 #define CLOSE_CWND_HALF_WAY     0x00000100
00103 #define CWND_HALF_WITH_MIN      0x00000200
00104 
00105 /*
00106  * tcp_tick_:
00107  * default 0.1,
00108  * 0.3 for 4.3 BSD, 
00109  * 0.01 for new window algorithms,
00110  */
00111 
00112 #define NUMDUPACKS 3            /* This is no longer used.  The variable */
00113                                 /* numdupacks_ is used instead. */
00114 #define TCP_MAXSEQ 1073741824   /* Number that curseq_ is set to for */
00115                                 /* "infinite send" (2^30)            */
00116 
00117 #define TCP_TIMER_RTX           0
00118 #define TCP_TIMER_DELSND        1
00119 #define TCP_TIMER_BURSTSND      2
00120 #define TCP_TIMER_DELACK        3
00121 #define TCP_TIMER_Q         4
00122 #define TCP_TIMER_RESET        5 
00123 
00124 class TcpAgent;
00125 
00126 class RtxTimer : public TimerHandler {
00127 public: 
00128         RtxTimer(TcpAgent *a) : TimerHandler() { a_ = a; }
00129 protected:
00130         virtual void expire(Event *e);
00131         TcpAgent *a_;
00132 };
00133 
00134 class DelSndTimer : public TimerHandler {
00135 public: 
00136         DelSndTimer(TcpAgent *a) : TimerHandler() { a_ = a; }
00137 protected:
00138         virtual void expire(Event *e);
00139         TcpAgent *a_;
00140 };
00141 
00142 class BurstSndTimer : public TimerHandler {
00143 public: 
00144         BurstSndTimer(TcpAgent *a) : TimerHandler() { a_ = a; }
00145 protected:
00146         virtual void expire(Event *e);
00147         TcpAgent *a_;
00148 };
00149 
00150 
00151 class TcpAgent : public Agent {
00152 public:
00153         TcpAgent();
00154         virtual void recv(Packet*, Handler*);
00155         virtual void timeout(int tno);
00156         virtual void timeout_nonrtx(int tno);
00157         int command(int argc, const char*const* argv);
00158         virtual void sendmsg(int nbytes, const char *flags = 0);
00159 
00160         void trace(TracedVar* v);
00161         virtual void advanceby(int delta);
00162 protected:
00163         virtual int window();
00164         virtual double windowd();
00165         void print_if_needed(double memb_time);
00166         void traceAll();
00167         virtual void traceVar(TracedVar* v);
00168         virtual int headersize();   // a tcp header
00169 
00170         virtual void delay_bind_init_all();
00171         virtual int delay_bind_dispatch(const char *varName, const char *localName, TclObject *tracer);
00172 
00173         /*
00174          * State encompassing the round-trip-time estimate.
00175          * srtt and rttvar are stored as fixed point;
00176          * srtt has 3 bits to the right of the binary point, rttvar has 2.
00177          */
00178         TracedInt t_seqno_;     /* sequence number */
00179 #define T_RTT_BITS 0
00180         TracedInt t_rtt_;       /* round trip time */
00181         int T_SRTT_BITS;        /* exponent of weight for updating t_srtt_ */
00182         TracedInt t_srtt_;      /* smoothed round-trip time */
00183         int srtt_init_;         /* initial value for computing t_srtt_ */
00184         int T_RTTVAR_BITS;      /* exponent of weight for updating t_rttvar_ */ 
00185         int rttvar_exp_;        /* exponent of multiple for t_rtxcur_ */
00186         TracedInt t_rttvar_;    /* variance in round-trip time */
00187         int rttvar_init_;       /* initial value for computing t_rttvar_ */
00188         double t_rtxcur_;       /* current retransmit value */
00189         double rtxcur_init_;    /* initial value for t_rtxcur_ */
00190         TracedInt t_backoff_;   /* current multiplier, 1 if not backed off */
00191         virtual void rtt_init();
00192         virtual double rtt_timeout();   /* provide RTO based on RTT estimates */
00193         virtual void rtt_update(double tao);    /* update RTT estimate */
00194         virtual void rtt_backoff();             /* double multiplier */
00195 
00196         double ts_peer_;        /* the most recent timestamp the peer sent */
00197 
00198         /* connection and packet dynamics */
00199         virtual void output(int seqno, int reason = 0);
00200         virtual void send_much(int force, int reason, int maxburst = 0);
00201         virtual void newtimer(Packet*);
00202         virtual void dupack_action();           /* do this on dupacks */
00203         virtual void send_one();                /* do this on 1-2 dupacks */
00204         double linear(double x, double x_1, double y_1, double x_2, double y_2);
00205         /* the "linear" function is for experimental highspeed TCP */
00206         void opencwnd();
00207 
00208         void slowdown(int how);                 /* reduce cwnd/ssthresh */
00209         void ecn(int seqno);            /* react to quench */
00210         virtual void set_initial_window();      /* set IW */
00211         double initial_window();                /* what is IW? */
00212         void reset();
00213         void newack(Packet*);
00214         void tcp_eln(Packet *pkt); /* reaction to ELN (usually wireless) */
00215         void finish(); /* called when the connection is terminated */
00216         void reset_qoption();   /* for QOption with EnblRTTCtr_ */
00217         void rtt_counting();    /* for QOption with EnblRTTCtr_ */
00218         int network_limited();  /* Sending limited by network? */
00219         double limited_slow_start(double cwnd, double max_ssthresh, double increment);
00220                                 /* Limited slow-start for high windows */
00221         virtual int numdupacks(double cwnd);    /* for getting numdupacks_ */
00222         virtual void processQuickStart(Packet *pkt);
00223         virtual void endQuickStart();
00224 
00225         /* Helper functions. Currently used by tcp-asym */
00226         virtual void output_helper(Packet*) { return; }
00227         virtual void send_helper(int) { return; }
00228         virtual void send_idle_helper() { return; }
00229         virtual void recv_helper(Packet*) { return; }
00230         virtual void recv_newack_helper(Packet*);
00231         virtual void partialnewack_helper(Packet*) {};
00232 
00233         /* Timers */
00234         RtxTimer rtx_timer_;
00235         DelSndTimer delsnd_timer_;
00236         BurstSndTimer burstsnd_timer_;
00237         virtual void cancel_timers() {
00238                 rtx_timer_.force_cancel();
00239                 burstsnd_timer_.force_cancel();
00240                 delsnd_timer_.force_cancel();
00241         }
00242         virtual void cancel_rtx_timer() {
00243                 rtx_timer_.force_cancel();
00244         }
00245         virtual void set_rtx_timer();
00246         void reset_rtx_timer(int mild, int backoff = 1);
00247         int timerfix_;          /* set to true to update timer *after* */
00248                                 /* update the RTT, instead of before   */
00249         int rfc2988_;           /* Use updated RFC 2988 timers */
00250         double boot_time_;      /* where between 'ticks' this sytem came up */
00251         double overhead_;
00252         double wnd_;
00253         double wnd_const_;
00254         double wnd_th_;         /* window "threshold" */
00255         double wnd_init_;
00256         double wnd_restart_;
00257         double tcp_tick_;       /* clock granularity */
00258         int wnd_option_;
00259         int wnd_init_option_;   /* 1 for using wnd_init_ */
00260                                 /* 2 for using large initial windows */
00261         double decrease_num_;   /* factor for multiplicative decrease */
00262         double increase_num_;   /* factor for additive increase */
00263         double k_parameter_;     /* k parameter in binomial controls */
00264         double l_parameter_;     /* l parameter in binomial controls */
00265         int precision_reduce_;  /* non-integer reduction of cwnd */
00266         int syn_;               /* 1 for modeling SYN/ACK exchange */
00267         int delay_growth_;      /* delay opening cwnd until 1st data recv'd */
00268         int tcpip_base_hdr_size_;  /* size of base TCP/IP header */
00269         int ts_option_size_;    // header bytes in a ts option
00270         int bug_fix_;           /* 1 for multiple-fast-retransmit fix */
00271         int less_careful_;      /* 1 for Less Careful variant of bug_fix_, */
00272                                 /*  for illustration only  */
00273         int ts_option_;         /* use RFC1323-like timestamps? */
00274         int maxburst_;          /* max # packets can send back-2-back */
00275         int maxcwnd_;           /* max # cwnd can ever be */
00276         int numdupacks_;        /* dup ACKs before fast retransmit */
00277         int numdupacksFrac_;    /* for a larger numdupacks_ with large */
00278                                 /* windows */
00279         double maxrto_;         /* max value of an RTO */
00280         double minrto_;         /* min value of an RTO */
00281         int old_ecn_;           /* For backwards compatibility with the 
00282                                  * old ECN implementation, which never
00283                                  * reduced the congestion window below
00284                                  * one packet. */ 
00285         FILE *plotfile_;
00286         /*
00287          * Dynamic state.
00288          */
00289         TracedInt dupacks_;     /* number of duplicate acks */
00290         TracedInt curseq_;      /* highest seqno "produced by app" */
00291         int last_ack_;          /* largest consecutive ACK, frozen during
00292                                  *              Fast Recovery */
00293         TracedInt highest_ack_; /* not frozen during Fast Recovery */
00294         int recover_;           /* highest pkt sent before dup acks, */
00295                                 /*   timeout, or source quench/ecn */
00296         int last_cwnd_action_;  /* CWND_ACTION_{TIMEOUT,DUPACK,ECN} */
00297         TracedDouble cwnd_;     /* current window */
00298         double base_cwnd_;      /* base window (for experimental purposes) */
00299         double awnd_;           /* averaged window */
00300         TracedInt ssthresh_;    /* slow start threshold */
00301         int count_;             /* used in window increment algorithms */
00302         double fcnt_;           /* used in window increment algorithms */
00303         int rtt_active_;        /* 1 if a rtt sample is pending */
00304         int rtt_seq_;           /* seq # of timed seg if rtt_active_ is 1 */
00305         double rtt_ts_;         /* time at which rtt_seq_ was sent */
00306         TracedInt maxseq_;      /* used for Karn algorithm */
00307                                 /* highest seqno sent so far */
00308         int ecn_;               /* Explicit Congestion Notification */
00309         int cong_action_;       /* Congestion Action.  True to indicate
00310                                    that the sender responded to congestion. */
00311         int ecn_burst_;         /* True when the previous ACK packet
00312                                  *  carried ECN-Echo. */
00313         int ecn_backoff_;       /* True when retransmit timer should begin
00314                                     to be backed off.  */
00315         int ect_;               /* turn on ect bit now? */
00316         int eln_;               /* Explicit Loss Notification (wireless) */
00317         int eln_rxmit_thresh_;  /* Threshold for ELN-triggered rxmissions */
00318         int eln_last_rxmit_;    /* Last packet rxmitted due to ELN info */
00319         double firstsent_;      /* When first packet was sent  --Allman */
00320         double lastreset_;      /* W.N. Last time connection was reset - for */
00321                                 /* detecting pkts from previous incarnations */
00322         int slow_start_restart_; /* boolean: re-init cwnd after connection 
00323                                     goes idle.  On by default. */
00324         int restart_bugfix_;    /* ssthresh is cut down because of
00325                                    timeouts during a connection's idle period.
00326                                    Setting this boolean fixes this problem.
00327                                    For now, it is off by default. */ 
00328         int closed_;            /* whether this connection has closed */
00329         TracedInt ndatapack_;   /* number of data packets sent */
00330         TracedInt ndatabytes_;  /* number of data bytes sent */
00331         TracedInt nackpack_;    /* number of ack packets received */
00332         TracedInt nrexmit_;     /* number of retransmit timeouts 
00333                                    when there was data outstanding */
00334         TracedInt nrexmitpack_; /* number of retransmited packets */
00335         TracedInt nrexmitbytes_; /* number of retransmited bytes */
00336         TracedInt necnresponses_; /* number of times cwnd was reduced
00337                                    in response to an ecn packet -- sylvia */
00338         TracedInt ncwndcuts_;   /* number of times cwnd was reduced 
00339                                    for any reason -- sylvia */
00340         int trace_all_oneline_; /* TCP tracing vars all in one line or not? */
00341         int nam_tracevar_;      /* Output nam's variable trace or just plain 
00342                                    text variable trace? */
00343         int first_decrease_;    /* First decrease of congestion window.  */
00344                                 /* Used for decrease_num_ != 0.5. */
00345         TracedInt singledup_;   /* Send on a single dup ack.  */
00346         int noFastRetrans_;     /* No Fast Retransmit option.  */
00347         int oldCode_;           /* Use old code. */
00348         int useHeaders_;        /* boolean: Add TCP/IP header sizes */
00349 
00350         /* for experimental high-speed TCP */
00351         /* These four parameters define the HighSpeed response function. */
00352         int low_window_;        /* window for turning on high-speed TCP */
00353         int high_window_;       /* target window for new response function */
00354         double high_p_;         /* target drop rate for new response function */
00355         double high_decrease_;  /* decrease rate at target window */
00356         /* The next parameter is for Limited Slow-Start. */
00357         int max_ssthresh_;      /* max value for ssthresh_ */
00358 
00359         /* These three functions are just an easy structuring of the code. */ 
00360         double increase_param();  /* get increase parameter for current cwnd */
00361         double decrease_param();  /* get decrease parameter for current cwnd */
00362         double compute_p();     /* compute p for calculating parameters */
00363         /* The next three parameters are for CPU overhead, for computing */
00364         /*   the HighSpeed parameters less frequently.  A better solution */
00365         /*   might be just to have a look-up array.  */
00366         double cwnd_last_;      /* last cwnd for computed parameters */
00367         double increase_last_;  /* increase param for cwnd_last_ */
00368         double cwnd_frac_;      /* for determining when to recompute params. */
00369         /* end of section for experimental high-speed TCP */
00370 
00371         /* for Quick-Start, experimental. */
00372         int rate_request_;      /* Rate request in pps, for QuickStart. */
00373         int qs_enabled_; /* to enable QuickStart. */
00374         int qs_requested_;
00375         int qs_approved_;
00376         int ttl_diff_;
00377         /* end of section for Quick-Start. */
00378 
00379         /* support for event-tracing */
00380         //EventTrace *et_;
00381         void trace_event(char *eventtype);
00382 
00383         /* these function are now obsolete, see other above */
00384         void closecwnd(int how);
00385         void quench(int how);
00386 
00387         void process_qoption_after_send() ;
00388         void process_qoption_after_ack(int seqno) ;
00389 
00390         int QOption_ ; /* TCP quiescence option */
00391         int EnblRTTCtr_ ; /* are we using a corase grained timer? */
00392         int T_full ; /* last time the window was full */
00393         int T_last ;
00394         int T_prev ;
00395         int T_start ;
00396         int RTT_count ;
00397         int RTT_prev ;
00398         int RTT_goodcount ;
00399         int F_counting ;
00400         int W_used ; 
00401         int W_timed ;
00402         int F_full ; 
00403         int Backoffs ;
00404 
00405         int control_increase_ ; /* If true, don't increase cwnd if sender */
00406                                 /*  is not window-limited.  */
00407         int prev_highest_ack_ ; /* Used to determine if sender is */
00408                                 /*  window-limited.  */
00409 };
00410 
00411 /* TCP Reno */
00412 class RenoTcpAgent : public virtual TcpAgent {
00413  public:
00414         RenoTcpAgent();
00415         virtual int window();
00416         virtual double windowd();
00417         virtual void recv(Packet *pkt, Handler*);
00418         virtual void timeout(int tno);
00419         virtual void dupack_action();
00420  protected:
00421         int allow_fast_retransmit(int last_cwnd_action_);
00422         unsigned int dupwnd_;
00423 };
00424 
00425 /* TCP New Reno */
00426 class NewRenoTcpAgent : public virtual RenoTcpAgent {
00427  public:
00428         NewRenoTcpAgent();
00429         virtual void recv(Packet *pkt, Handler*);
00430         virtual void partialnewack_helper(Packet* pkt);
00431         virtual void dupack_action();
00432  protected:
00433         int newreno_changes_;   /* 0 for fixing unnecessary fast retransmits */
00434                                 /* 1 for additional code from Allman, */
00435                                 /* to implement other algorithms from */
00436                                 /* Hoe's paper, including sending a new */
00437                                 /* packet for every two duplicate ACKs. */
00438                                 /* The default is set to 0. */
00439         int newreno_changes1_;  /* Newreno_changes1_ set to 0 gives the */
00440                                 /* Slow-but-Steady variant of NewReno from */
00441                                 /* RFC 2582, with the retransmit timer reset */
00442                                 /* after each partial new ack. */  
00443                                 /* Newreno_changes1_ set to 1 gives the */
00444                                 /* Impatient variant of NewReno from */
00445                                 /* RFC 2582, with the retransmit timer reset */
00446                                 /* only for the first partial new ack. */
00447                                 /* The default is set to 0 */
00448         void partialnewack(Packet *pkt);
00449         int allow_fast_retransmit(int last_cwnd_action_);
00450         int acked_, new_ssthresh_;  /* used if newreno_changes_ == 1 */
00451         double ack2_, ack3_, basertt_; /* used if newreno_changes_ == 1 */
00452         int firstpartial_;      /* For the first partial ACK. */ 
00453         int partial_window_deflation_; /* 0 if set cwnd to ssthresh upon */
00454                                        /* partial new ack (default) */
00455                                        /* 1 if deflate (cwnd + dupwnd) by */
00456                                        /* amount of data acked */
00457                                        /* "Partial window deflation" is */
00458                                        /* discussed in RFC 2582. */
00459         int exit_recovery_fix_;  /* 0 for setting cwnd to ssthresh upon */
00460                                  /* leaving fast recovery (default) */
00461                                  /* 1 for setting cwnd to min(ssthresh, */
00462                                  /* amnt. of data in network) when leaving */
00463 };
00464 
00465 /* TCP vegas (VegasTcpAgent) */
00466 class VegasTcpAgent : public virtual TcpAgent {
00467  public:
00468         VegasTcpAgent();
00469         ~VegasTcpAgent();
00470         virtual void recv(Packet *pkt, Handler *);
00471         virtual void timeout(int tno);
00472 protected:
00473         double vegastime() {
00474                 return(Scheduler::instance().clock() - firstsent_);
00475         }
00476         virtual void output(int seqno, int reason = 0);
00477         virtual void recv_newack_helper(Packet*);
00478         int vegas_expire(Packet*); 
00479         void reset();
00480         void vegas_inflate_cwnd(int win, double current_time);
00481 
00482         virtual void delay_bind_init_all();
00483         virtual int delay_bind_dispatch(const char *varName, const char *localName, TclObject *tracer);
00484 
00485         double t_cwnd_changed_; // last time cwnd changed
00486         double firstrecv_;      // time recv the 1st ack
00487 
00488         int    v_alpha_;        // vegas thruput thresholds in pkts
00489         int    v_beta_;                 
00490 
00491         int    v_gamma_;        // threshold to change from slow-start to
00492                                 // congestion avoidance, in pkts
00493 
00494         int    v_slowstart_;    // # of pkts to send after slow-start, deflt(2)
00495         int    v_worried_;      // # of pkts to chk after dup ack (1 or 2)
00496 
00497         double v_timeout_;      // based on fine-grained timer
00498         double v_rtt_;          
00499         double v_sa_;           
00500         double v_sd_;   
00501 
00502         int    v_cntRTT_;       // # of rtt measured within one rtt
00503         double v_sumRTT_;       // sum of rtt measured within one rtt
00504 
00505         double v_begtime_;      // tagged pkt sent
00506         int    v_begseq_;       // tagged pkt seqno
00507 
00508         double* v_sendtime_;    // each unacked pkt's sendtime is recorded.
00509         int*   v_transmits_;    // # of retx for an unacked pkt
00510 
00511         int    v_maxwnd_;       // maxwnd size for v_sendtime_[]
00512         double v_newcwnd_;      // record un-inflated cwnd
00513 
00514         double v_baseRTT_;      // min of all rtt
00515 
00516         double v_incr_;         // amount cwnd is increased in the next rtt
00517         int    v_inc_flag_;     // if cwnd is allowed to incr for this rtt
00518 
00519         double v_actual_;       // actual send rate (pkt/s; needed for tcp-rbp)
00520 
00521         int ns_vegas_fix_level_;   // see comment at end of tcp-vegas.cc for details of fixes
00522 };
00523 
00524 // Local Variables:
00525 // mode:c++
00526 // End:
00527 
00528 #endif

Generated on Tue Apr 20 12:14:36 2004 for NS2.26SourcesOriginal by doxygen 1.3.3