#include <tcp-full-bay.h>
Inheritance diagram for BayFullTcpAgent:


Definition at line 131 of file tcp-full-bay.h.
Public Member Functions | |
| nsaddr_t & | addr () |
| int | advance (int, int) |
| void | advance (int) |
| virtual void | advanceby (int delta) |
| virtual void | attachApp (Application *app) |
| BayFullTcpAgent () | |
| virtual void | close () |
| int | command (int argc, const char *const *argv) |
| virtual void | connect (nsaddr_t dst) |
| nsaddr_t & | daddr () |
| virtual void | debug (const char *fmt,...) |
| int | delay_bind_dispatch (const char *varName, const char *localName, TclObject *tracer) |
| void | delay_bind_init_all () |
| nsaddr_t & | dport () |
| virtual void | drop (Packet *p) |
| packet_t | get_pkttype () |
| int | isdebug () const |
| nsaddr_t & | port () |
| virtual void | recv (Packet *p, const char *s) |
| virtual void | recv (Packet *pkt, Handler *) |
| void | recvOnly (Packet *) |
| virtual void | send (int nbytes) |
| virtual void | send (int sz, AppData *data) |
| void | send (Packet *p, Handler *h) |
| virtual void | sendmsg (int sz, AppData *, const char *flags=0) |
| virtual void | sendmsg (int nbytes, const char *flags=0) |
| virtual void | sendto (int nbytes, const char *flags, ns_addr_t dst) |
| virtual void | sendto (int nbytes, const char *flags, nsaddr_t dst) |
| virtual void | sendto (int sz, AppData *, const char *flags, ns_addr_t dst) |
| virtual void | sendto (int sz, AppData *, const char *flags, nsaddr_t dst) |
| void | set_pkttype (packet_t pkttype) |
| void | setDropTarget (NsObject *dt) |
| virtual int & | size () |
| int | state () |
| void | target (NsObject *target) |
| NsObject * | target () |
| virtual void | timeout (int tno) |
| virtual void | timeout_nonrtx (int tno) |
| void | trace (TracedVar *v) |
| ~BayFullTcpAgent () | |
Protected Member Functions | |
| void | addAgentTrace (const char *name) |
| Packet * | allocpkt (int) const |
| Packet * | allocpkt () const |
| void | cancel_rtx_timeout () |
| virtual void | cancel_rtx_timer () |
| virtual void | cancel_timers () |
| void | closecwnd (int how) |
| void | connect () |
| double | decrease_param () |
| void | deleteAgentTrace () |
| virtual void | drop (Packet *p, const char *s) |
| void | dumpTracedVars () |
| virtual void | dupack_action () |
| void | ecn (int seqno) |
| virtual void | endQuickStart () |
| void | fast_retransmit (int) |
| void | finish () |
| int | force_wnd (int num) |
| void | handle (Event *) |
| int | headersize () |
| virtual void | idle () |
| double | increase_param () |
| double | initial_window () |
| void | initpkt (Packet *) const |
| void | insertOldValue (TracedVar *v, const char *value) |
| double | limited_slow_start (double cwnd, double max_ssthresh, double increment) |
| double | linear (double x, double x_1, double y_1, double x_2, double y_2) |
| void | listen () |
| OldValue * | lookupOldValue (TracedVar *v) |
| int | lossQuickStart () |
| void | monitorAgentTrace () |
| int | need_send () |
| int | network_limited () |
| void | newack (Packet *pkt) |
| virtual void | newtimer (Packet *) |
| double | now () |
| virtual int | numdupacks (double cwnd) |
| void | opencwnd () |
| int | outflags () |
| void | output (int seqno, int reason=0) |
| virtual void | output_helper (Packet *) |
| virtual void | partialnewack_helper (Packet *) |
| int | predict_ok (Packet *) |
| void | print_if_needed (double memb_time) |
| void | process_qoption_after_ack (int seqno) |
| void | process_qoption_after_send () |
| virtual void | processQuickStart (Packet *pkt) |
| void | quench (int how) |
| virtual void | recv_frto_helper (Packet *) |
| virtual void | recv_helper (Packet *) |
| virtual void | recv_newack_helper (Packet *) |
| virtual void | recvBytes (int bytes) |
| void | reinit () |
| void | reset () |
| void | reset_qoption () |
| void | reset_rtx_timer (int mild, int backoff=1) |
| void | reset_rtx_timer (int) |
| virtual void | rtt_backoff () |
| void | rtt_counting () |
| virtual void | rtt_init () |
| virtual double | rtt_timeout () |
| virtual void | rtt_update (double tao) |
| virtual void | send_helper (int) |
| virtual void | send_idle_helper () |
| void | send_much (int force, int reason, int maxburst=0) |
| virtual void | send_one () |
| void | sendpacket (int seqno, int ackno, int pflags, int datalen, int reason) |
| virtual void | set_initial_window () |
| virtual void | set_rtx_timer () |
| void | slowdown (int how) |
| void | spurious_timeout () |
| void | tcp_eln (Packet *pkt) |
| void | trace_event (char *eventtype) |
| void | traceAll () |
| virtual void | traceVar (TracedVar *v) |
| void | usrclosed () |
| virtual int | window () |
| virtual double | windowd () |
Protected Attributes | |
| int | aggressive_maxburst_ |
| BayTcpAppAgent * | app_ |
| double | awnd_ |
| int | Backoffs |
| double | base_cwnd_ |
| double | boot_time_ |
| int | bug_fix_ |
| int | bugfix_ack_ |
| int | bugfix_ts_ |
| BurstSndTimer | burstsnd_timer_ |
| Tcl_Channel | channel_ |
| int | close_on_empty_ |
| int | closed_ |
| int | cong_action_ |
| int | control_increase_ |
| int | count_ |
| TracedInt | curseq_ |
| TracedDouble | cwnd_ |
| int | cwnd_range_ |
| int | data_on_syn_ |
| int | debug_ |
| double | decrease_num_ |
| int | defttl_ |
| double | delack_interval_ |
| BayDelAckTimer | delack_timer_ |
| int | delay_growth_ |
| DelSndTimer | delsnd_timer_ |
| NsObject * | drop_ |
| ns_addr_t | dst_ |
| int | dupack_reset_ |
| TracedInt | dupacks_ |
| int | dupseg_fix_ |
| int | ecn_ |
| int | ecn_backoff_ |
| int | ecn_burst_ |
| int | ect_ |
| int | eln_ |
| int | eln_last_rxmit_ |
| int | eln_rxmit_thresh_ |
| int | EnblRTTCtr_ |
| EventTrace * | et_ |
| int | exitFastRetrans_ |
| int | F_counting |
| int | F_full |
| double | fcnt_ |
| int | fid_ |
| int | first_data_ |
| int | first_decrease_ |
| double | firstsent_ |
| int | flags_ |
| int | frto_ |
| int | frto_enabled_ |
| ns_addr_t | here_ |
| double | high_decrease_ |
| double | high_p_ |
| int | high_window_ |
| TracedInt | highest_ack_ |
| hstcp | hstcp_ |
| double | increase_num_ |
| int | iss_ |
| double | k_parameter_ |
| double | l_parameter_ |
| int | last_ack_ |
| int | last_ack_sent_ |
| int | last_cwnd_action_ |
| double | lastreset_ |
| int | less_careful_ |
| int | LimTransmitFix_ |
| int | low_window_ |
| int | max_ssthresh_ |
| int | maxburst_ |
| int | maxcwnd_ |
| double | maxrto_ |
| int | maxseg_ |
| TracedInt | maxseq_ |
| double | minrto_ |
| TracedInt | nackpack_ |
| int | nam_tracevar_ |
| TracedInt | ncwndcuts1_ |
| TracedInt | ncwndcuts_ |
| TracedInt | ndatabytes_ |
| TracedInt | ndatapack_ |
| TracedInt | necnresponses_ |
| int | nodelay_ |
| int | noFastRetrans_ |
| TracedInt | nrexmit_ |
| TracedInt | nrexmitbytes_ |
| TracedInt | nrexmitpack_ |
| int | numdupacks_ |
| int | numdupacksFrac_ |
| int | old_ecn_ |
| int | oldCode_ |
| OldValue * | oldValueList_ |
| double | overhead_ |
| int | pipe_prev_ |
| FILE * | plotfile_ |
| int | precision_reduce_ |
| int | prev_highest_ack_ |
| int | prio_ |
| int | QOption_ |
| int | qs_approved_ |
| int | qs_cwnd_ |
| int | qs_enabled_ |
| int | qs_request_mode_ |
| int | qs_requested_ |
| int | qs_rtt_ |
| int | qs_thresh_ |
| int | qs_window_ |
| int | rate_request_ |
| int | rcv_nxt_ |
| int | recover_ |
| int | recover_cause_ |
| int | restart_bugfix_ |
| int | rfc2988_ |
| BayReassemblyQueue | rq_ |
| int | rtt_active_ |
| int | RTT_count |
| int | RTT_goodcount |
| int | RTT_prev |
| int | rtt_seq_ |
| double | rtt_ts_ |
| int | rttvar_exp_ |
| int | rttvar_init_ |
| RtxTimer | rtx_timer_ |
| double | rtxcur_init_ |
| int | segs_per_ack_ |
| int | SetCWRonRetransmit_ |
| int | sfrto_enabled_ |
| TracedInt | singledup_ |
| int | size_ |
| int | slow_start_restart_ |
| int | spurious_response_ |
| int | srtt_init_ |
| TracedInt | ssthresh_ |
| int | state_ |
| int | switch_spa_thresh_ |
| int | syn_ |
| TracedInt | t_backoff_ |
| int | T_full |
| int | T_last |
| int | T_prev |
| TracedInt | t_rtt_ |
| TracedInt | t_rttvar_ |
| int | T_RTTVAR_BITS |
| double | t_rtxcur_ |
| TracedInt | t_seqno_ |
| TracedInt | t_srtt_ |
| int | T_SRTT_BITS |
| int | T_start |
| NsObject * | target_ |
| int | tcp_qs_recovery_ |
| double | tcp_tick_ |
| int | tcpip_base_hdr_size_ |
| int | tcprexmtthresh_ |
| int | timerfix_ |
| int | trace_all_oneline_ |
| char * | traceName_ |
| double | ts_echo_ |
| int | ts_option_ |
| int | ts_option_size_ |
| double | ts_peer_ |
| int | ts_resetRTO_ |
| double * | tss |
| int | tss_size_ |
| int | ttl_diff_ |
| packet_t | type_ |
| int | useHeaders_ |
| int | W_timed |
| int | W_used |
| double | wnd_ |
| double | wnd_const_ |
| double | wnd_init_ |
| int | wnd_init_option_ |
| int | wnd_option_ |
| double | wnd_restart_ |
| double | wnd_th_ |
Static Protected Attributes | |
| static int | uidcnt_ |
|
|
Definition at line 135 of file tcp-full-bay.cc. References data_on_syn_, delack_interval_, dupack_reset_, dupseg_fix_, iss_, maxseg_, nodelay_, segs_per_ack_, and tcprexmtthresh_. 00135 : flags_(0), 00136 state_(TCPS_CLOSED), rq_(rcv_nxt_), last_ack_sent_(0), app_(0), 00137 delack_timer_(this) 00138 { 00139 bind("segsperack_", &segs_per_ack_); 00140 bind("segsize_", &maxseg_); 00141 bind("tcprexmtthresh_", &tcprexmtthresh_); 00142 bind("iss_", &iss_); 00143 bind_bool("nodelay_", &nodelay_); 00144 bind_bool("data_on_syn_",&data_on_syn_); 00145 bind_bool("dupseg_fix_", &dupseg_fix_); 00146 bind_bool("dupack_reset_", &dupack_reset_); 00147 bind("interval_", &delack_interval_); 00148 }
|
|
|
Definition at line 224 of file tcp-full-bay.cc. References BayReassemblyQueue::clear(), and rq_. 00225 { 00226 /* 00227 * not required any more 00228 register i; 00229 for (i = 0; i < NTIMER; i++) 00230 if (pending_[i]) 00231 cancel(i); 00232 */ 00233 rq_.clear(); 00234 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 326 of file agent.cc. References ns_addr_t::addr_, Agent::channel_, Scheduler::clock(), Agent::dst_, Agent::here_, Scheduler::instance(), TIME_FORMAT, and Agent::traceName_. Referenced by Agent::command(). 00327 { 00328 char wrk[256]; 00329 int n; 00330 double curTime = (&Scheduler::instance() == NULL ? 0 : 00331 Scheduler::instance().clock()); 00332 00333 sprintf(wrk, "a -t "TIME_FORMAT" -s %d -d %d -n %s", 00334 curTime, here_.addr_, dst_.addr_, name); 00335 n = strlen(wrk); 00336 wrk[n] = '\n'; 00337 wrk[n+1] = 0; 00338 if (channel_) 00339 (void)Tcl_Write(channel_, wrk, n+1); 00340 // keep agent trace name 00341 if (traceName_ != NULL) 00342 delete[] traceName_; 00343 traceName_ = new char[strlen(name)+1]; 00344 strcpy(traceName_, name); 00345 }
Here is the call graph for this function: ![]() |
|
|
||||||||||||
|
Definition at line 280 of file tcp-full-bay.cc. References close_on_empty_, connect(), TcpAgent::curseq_, iss_, reinit(), state_, TCPS_CLOSED, and TCPS_ESTABLISHED. 00281 { 00282 close_on_empty_ = close_flag; 00283 00284 // 00285 // state-specific operations: 00286 // if CLOSED, do an active open/connect 00287 // if ESTABLISHED, just try to send more 00288 // if above ESTABLISHED, we are closing, so don't allow 00289 // if anything else (establishing), do nothing here 00290 // 00291 if (state_ > TCPS_ESTABLISHED) { 00292 return 0; //try again later, please 00293 } else if (state_ == TCPS_CLOSED) { 00294 curseq_ = iss_ + n; 00295 reinit(); 00296 connect(); // initiate new connection 00297 } 00298 else if (state_ == TCPS_ESTABLISHED) 00299 curseq_ += n; 00300 else 00301 return 0; 00302 return 1; 00303 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 246 of file tcp-full-bay.cc. References connect(), TcpAgent::curseq_, maxseg_, now(), REASON_NORMAL, send_much(), state_, TCPS_CLOSED, and TCPS_ESTABLISHED. Referenced by command(), FtpSrvrAgent::recv(), and FtpClientAgent::sendget(). 00247 { 00248 // XXX hack: 00249 // because np is in packets and a data source 00250 // may pass a *huge* number as a way to tell us 00251 // to go forever, just look for the huge number 00252 // and if it's there, pre-divide it 00253 if (np >= 0x10000000) 00254 np /= maxseg_; 00255 00256 curseq_ += (np * maxseg_); 00257 00258 // 00259 // state-specific operations: 00260 // if CLOSED, do an active open/connect 00261 // if ESTABLISHED, just try to send more 00262 // if above ESTABLISHED, we are closing, so don't allow 00263 // if anything else (establishing), do nothing here 00264 // 00265 if (state_ > TCPS_ESTABLISHED) { 00266 fprintf(stderr, 00267 "%f: BayFullTcpAgent::advance(%s): cannot advance while in state %d\n", 00268 now(), name(), state_); 00269 return; 00270 } else if (state_ == TCPS_CLOSED) { 00271 connect(); // initiate new connection 00272 } else if (state_ == TCPS_ESTABLISHED) 00273 send_much(0, REASON_NORMAL, 0); 00274 return; 00275 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in FullTcpAgent. Definition at line 777 of file tcp.cc. References TcpAgent::closed_, TcpAgent::curseq_, TcpAgent::maxburst_, and TcpAgent::send_much(). Referenced by TcpAgent::command(). 00778 { 00779 curseq_ += delta; 00780 if (delta > 0) 00781 closed_ = 0; 00782 send_much(0, 0, maxburst_); 00783 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 528 of file agent.cc. References Packet::allocdata(), and Agent::allocpkt(). 00529 { 00530 Packet* p = allocpkt(); 00531 00532 if (n > 0) 00533 p->allocdata(n); 00534 00535 return(p); 00536 }
Here is the call graph for this function: ![]() |
|
|
|
Definition at line 372 of file agent.cc. References Agent::app_. Referenced by WormApp::command(), HttpMInvalCache::command(), Application::command(), TcpApp::TcpApp(), and TcpApp::~TcpApp(). 00373 { 00374 app_ = app; 00375 }
|
|
|
Definition at line 520 of file tcp-full-bay.cc. References TimerHandler::cancel(), TcpAgent::rtx_timer_, TimerHandler::status(), and TIMER_PENDING. Referenced by newack(), recv(), and reinit(). 00521 { 00522 if (rtx_timer_.status() == TIMER_PENDING) { 00523 rtx_timer_.cancel(); 00524 } 00525 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in TcpFsAgent, RenoTcpFsAgent, NewRenoTcpFsAgent, and TcpSessionAgent. Definition at line 280 of file tcp.h. References TimerHandler::force_cancel(), and TcpAgent::rtx_timer_. Referenced by SackFullTcpAgent::dupack_action(), FullTcpAgent::dupack_action(), FullTcpAgent::newack(), TcpAgent::newtimer(), and TcpAgent::recv_newack_helper(). 00280 { 00281 rtx_timer_.force_cancel(); 00282 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in TcpFsAgent, RenoTcpFsAgent, NewRenoTcpFsAgent, FullTcpAgent, and TcpSessionAgent. Definition at line 275 of file tcp.h. References TcpAgent::burstsnd_timer_, TcpAgent::delsnd_timer_, TimerHandler::force_cancel(), and TcpAgent::rtx_timer_. Referenced by FullTcpAgent::cancel_timers(). 00275 { 00276 rtx_timer_.force_cancel(); 00277 burstsnd_timer_.force_cancel(); 00278 delsnd_timer_.force_cancel(); 00279 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in FullTcpAgent. Definition at line 377 of file agent.cc. Referenced by Agent::command().
|
|
|
Reimplemented in IntTcpAgent. Definition at line 1947 of file tcp.cc. References abort(), TcpAgent::count_, TcpAgent::cwnd_, TcpAgent::decrease_num_, TcpAgent::fcnt_, TcpAgent::ssthresh_, TcpAgent::window(), TcpAgent::wnd_init_, and TcpAgent::wnd_restart_. Referenced by TcpAgent::quench(). 01948 { 01949 static int first_time = 1; 01950 if (first_time == 1) { 01951 fprintf(stderr, "the TcpAgent::closecwnd() function is now deprecated, please use the function slowdown() instead\n"); 01952 } 01953 switch (how) { 01954 case 0: 01955 /* timeouts */ 01956 ssthresh_ = int( window() / 2 ); 01957 if (ssthresh_ < 2) 01958 ssthresh_ = 2; 01959 cwnd_ = int(wnd_restart_); 01960 break; 01961 01962 case 1: 01963 /* Reno dup acks, or after a recent congestion indication. */ 01964 // cwnd_ = window()/2; 01965 cwnd_ = decrease_num_ * window(); 01966 ssthresh_ = int(cwnd_); 01967 if (ssthresh_ < 2) 01968 ssthresh_ = 2; 01969 break; 01970 01971 case 2: 01972 /* Tahoe dup acks 01973 * after a recent congestion indication */ 01974 cwnd_ = wnd_init_; 01975 break; 01976 01977 case 3: 01978 /* Retransmit timeout, but no outstanding data. */ 01979 cwnd_ = int(wnd_init_); 01980 break; 01981 case 4: 01982 /* Tahoe dup acks */ 01983 ssthresh_ = int( window() / 2 ); 01984 if (ssthresh_ < 2) 01985 ssthresh_ = 2; 01986 cwnd_ = 1; 01987 break; 01988 01989 default: 01990 abort(); 01991 } 01992 fcnt_ = 0.; 01993 count_ = 0; 01994 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Reimplemented from TcpAgent. Definition at line 1239 of file tcp-full-bay.cc. References advance(), app_, TcpAgent::awnd_, TcpAgent::command(), TcpAgent::cwnd_, listen(), usrclosed(), and TcpAgent::wnd_init_. 01240 { 01241 // would like to have some "connect" primitive 01242 // here, but the problem is that we get called before 01243 // the simulation is running and we want to send a SYN. 01244 // Because no routing exists yet, this fails. 01245 // Instead, see code in advance() above. 01246 // 01247 // listen can happen any time because it just changes state_ 01248 // 01249 // close is designed to happen at some point after the 01250 // simulation is running (using an ns 'at' command) 01251 01252 Tcl& tcl = Tcl::instance(); 01253 01254 if (argc == 2) { 01255 if (strcmp(argv[1], "listen") == 0) { 01256 // just a state transition 01257 listen(); 01258 return (TCL_OK); 01259 } 01260 if (strcmp(argv[1], "close") == 0) { 01261 usrclosed(); 01262 return (TCL_OK); 01263 } 01264 } 01265 if (argc == 3) { 01266 if (strcmp(argv[1], "advance") == 0) { 01267 advance(atoi(argv[2])); 01268 return (TCL_OK); 01269 } 01270 //added 7/31/97 by kmn to work with apps, specifically www 01271 // probably should use a special type of agent... 01272 if (strcmp(argv[1], "attach-application") == 0) { 01273 app_ = (BayTcpAppAgent *)TclObject::lookup(argv[2]); 01274 if (app_ == 0) { 01275 tcl.resultf("no such agent %s", argv[2]); 01276 return(TCL_ERROR); 01277 } 01278 return(TCL_OK); 01279 } 01280 //added by kmn 8/12/97 01281 if (strcmp(argv[1], "initial-window") == 0) { 01282 wnd_init_ = atoi(argv[2]); 01283 cwnd_ = wnd_init_; 01284 awnd_ = wnd_init_ /2.0; 01285 return(TCL_OK); 01286 } 01287 01288 } 01289 return (TcpAgent::command(argc, argv)); 01290 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 389 of file agent.cc. Referenced by Agent::command().
|
|
|
Definition at line 1189 of file tcp-full-bay.cc. References TcpAgent::curseq_, data_on_syn_, iss_, output(), REASON_NORMAL, state_, and TCPS_SYN_SENT. Referenced by advance(). 01190 { 01191 state_ = TCPS_SYN_SENT; // sending a SYN now 01192 01193 if (!data_on_syn_) { 01194 // force no data in this segment 01195 int cur = curseq_; 01196 curseq_ = iss_; 01197 output(iss_, REASON_NORMAL); 01198 curseq_ = cur + 1; //think I have to add in the syn here 01199 return; 01200 } 01201 output(iss_, REASON_NORMAL); 01202 return; 01203 }
Here is the call graph for this function: ![]() |
|
|
||||||||||||
|
Definition at line 102 of file object.cc. References NsObject::debug_. 00103 { 00104 if (!debug_) 00105 return; 00106 va_list ap; 00107 va_start(ap, fmt); 00108 vprintf(fmt, ap); 00109 }
|
|
|
Definition at line 1015 of file tcp.cc. References TcpAgent::cwnd_, hstcp::dec1, hstcp::dec2, and TcpAgent::hstcp_. Referenced by TcpAgent::increase_param(), and TcpAgent::slowdown(). 01016 { 01017 double decrease; 01018 // OLD: 01019 // decrease = linear(log(cwnd_), log(low_window_), 0.5, log(high_window_), high_decrease_); 01020 // NEW (but equivalent): 01021 decrease = hstcp_.dec1 + log(cwnd_) * hstcp_.dec2; 01022 return decrease; 01023 }
|
|
||||||||||||||||
|
Reimplemented from TcpAgent. Definition at line 158 of file tcp-full-bay.cc. References TcpAgent::delay_bind_dispatch(). 00159 { 00160 return TcpAgent::delay_bind_dispatch(varName, localName, tracer); 00161 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented from TcpAgent. Definition at line 151 of file tcp-full-bay.cc. References TcpAgent::delay_bind_init_all(), and reset(). 00152 { 00153 TcpAgent::delay_bind_init_all(); 00154 reset(); 00155 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 222 of file agent.cc. References ns_addr_t::addr_, Agent::dst_, Agent::flushAVar(), Agent::here_, Scheduler::instance(), TIME_FORMAT, and Agent::traceName_. Referenced by Agent::command(). 00223 { 00224 char wrk[256]; 00225 00226 // XXX we don't know InstVar outside of Tcl! Is there any 00227 // tracedvars hidden in InstVar? If so, shall we have a tclclInt.h? 00228 TracedVar* var = tracedvar_; 00229 for ( ; var != 0; var = var->next_) 00230 flushAVar(var); 00231 00232 // we need to flush all var values to trace file, 00233 // so nam can do backtracing 00234 sprintf(wrk, "a -t "TIME_FORMAT" -s %d -d %d -n %s -x", 00235 Scheduler::instance().clock(), here_.addr_, 00236 dst_.addr_, traceName_); 00237 if (traceName_ != NULL) 00238 delete[] traceName_; 00239 traceName_ = NULL; 00240 }
Here is the call graph for this function: ![]() |
|
|
||||||||||||
|
Definition at line 114 of file connector.cc. References Connector::drop_, Packet::free(), and NsObject::recv(). 00115 { 00116 if (drop_ != 0) 00117 drop_->recv(p, s); 00118 else 00119 Packet::free(p); 00120 }
Here is the call graph for this function: ![]() |
|
|
|
|
|
|
Reimplemented in FullTcpAgent, TahoeFullTcpAgent, SackFullTcpAgent, Sack1TcpAgent, RenoTcpAgent, and NewRenoTcpAgent. Definition at line 1547 of file tcp.cc. References TcpAgent::bug_fix_, CLOSE_CWND_ONE, CLOSE_SSTHRESH_HALF, CWND_ACTION_DUPACK, CWND_ACTION_ECN, TcpAgent::ecn_, TcpAgent::highest_ack_, TcpAgent::last_cwnd_action_, TcpAgent::lossQuickStart(), TcpAgent::maxseq_, TcpAgent::recover_, TcpAgent::reset_rtx_timer(), TcpAgent::slowdown(), and TcpAgent::trace_event(). 01548 { 01549 int recovered = (highest_ack_ > recover_); 01550 if (recovered || (!bug_fix_ && !ecn_)) { 01551 goto tahoe_action; 01552 } 01553 01554 if (ecn_ && last_cwnd_action_ == CWND_ACTION_ECN) { 01555 last_cwnd_action_ = CWND_ACTION_DUPACK; 01556 slowdown(CLOSE_CWND_ONE); 01557 reset_rtx_timer(0,0); 01558 return; 01559 } 01560 01561 if (bug_fix_) { 01562 /* 01563 * The line below, for "bug_fix_" true, avoids 01564 * problems with multiple fast retransmits in one 01565 * window of data. 01566 */ 01567 return; 01568 } 01569 01570 tahoe_action: 01571 recover_ = maxseq_; 01572 if (!lossQuickStart()) { 01573 // we are now going to fast-retransmit and willtrace that event 01574 trace_event("FAST_RETX"); 01575 last_cwnd_action_ = CWND_ACTION_DUPACK; 01576 slowdown(CLOSE_SSTHRESH_HALF|CLOSE_CWND_ONE); 01577 } 01578 reset_rtx_timer(0,0); 01579 return; 01580 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1378 of file tcp.cc. References CLOSE_CWND_HALF, CLOSE_SSTHRESH_HALF, TcpAgent::cwnd_, CWND_ACTION_ECN, CWND_ACTION_TIMEOUT, TcpAgent::ecn_backoff_, TcpAgent::last_cwnd_action_, TcpAgent::maxseq_, TcpAgent::necnresponses_, TcpAgent::recover_, TcpAgent::rtt_backoff(), and TcpAgent::slowdown(). Referenced by VegasTcpAgent::recv(), RFC793eduTcpAgent::recv(), and FackTcpAgent::recv(). 01379 { 01380 if (seqno > recover_ || 01381 last_cwnd_action_ == CWND_ACTION_TIMEOUT) { 01382 recover_ = maxseq_; 01383 last_cwnd_action_ = CWND_ACTION_ECN; 01384 if (cwnd_ <= 1.0) { 01385 if (ecn_backoff_) 01386 rtt_backoff(); 01387 else ecn_backoff_ = 1; 01388 } else ecn_backoff_ = 0; 01389 slowdown(CLOSE_CWND_HALF|CLOSE_SSTHRESH_HALF); 01390 ++necnresponses_ ; 01391 // added by sylvia to count number of ecn responses 01392 } 01393 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1586 of file tcp.cc. References TcpAgent::cwnd_, TcpAgent::initial_window(), TcpAgent::last_ack_, TcpAgent::maxseq_, TcpAgent::qs_approved_, TcpAgent::qs_cwnd_, and TcpAgent::qs_window_. Referenced by TcpAgent::recv(), Sack1TcpAgent::recv(), RenoTcpAgent::recv(), and NewRenoTcpAgent::recv(). 01587 { 01588 qs_approved_ = 0; 01589 qs_cwnd_ = 0; 01590 qs_window_ = maxseq_; 01591 int new_cwnd = maxseq_ - last_ack_; 01592 if (new_cwnd > 1 && new_cwnd < cwnd_) { 01593 cwnd_ = new_cwnd; 01594 if (cwnd_ < initial_window()) 01595 cwnd_ = initial_window(); 01596 } 01597 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 589 of file tcp-full-bay.cc. References TcpAgent::maxseq_, output(), REASON_DUPACK, TcpAgent::recover_, recover_cause_, TcpAgent::rtt_backoff(), and TcpAgent::t_seqno_. Referenced by recv(). 00590 { 00591 rtt_backoff(); // bug fix by van to avoid spurious rtx 00592 int onxt = t_seqno_; // output() changes t_seqno_ 00593 recover_ = maxseq_; // keep a copy of highest sent 00594 recover_cause_ = REASON_DUPACK; // why we started this recovery period 00595 output(seq, REASON_DUPACK); // send one pkt 00596 t_seqno_ = onxt; 00597 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in FullTcpAgent. Definition at line 1901 of file tcp.cc. Referenced by IntTcpAgent::newack(), TcpAgent::recv_newack_helper(), VegasTcpAgent::recv_newack_helper(), RFC793eduTcpAgent::recv_newack_helper(), TcpFsAgent::recv_newack_helper(), FackTcpAgent::recv_newack_helper(), and TcpAsymAgent::recv_newack_helper().
|
|
|
Definition at line 849 of file tcp.cc. References TcpAgent::highest_ack_, and TcpAgent::recover_. Referenced by TcpAgent::window(), and RenoTcpAgent::window(). 00850 { 00851 return recover_ + num - (int)highest_ack_; 00852 }
|
|
|
Definition at line 104 of file agent.h. References Agent::type_. 00104 { return type_; }
|
|
|
Implements Handler. Reimplemented in LinkDelay, LL, AckRecons, and Snoop. Definition at line 91 of file object.cc. References NsObject::recv().
Here is the call graph for this function: ![]() |
|
|
Reimplemented from TcpAgent. Definition at line 215 of file tcp-full-bay.cc. References TCPIP_BASE_PKTSIZE. Referenced by sendpacket(). 00216 { 00217 return (TCPIP_BASE_PKTSIZE); 00218 }
|
|
|
Definition at line 363 of file agent.cc. References Agent::app_, and Application::resume(). Referenced by FullTcpAgent::foutput(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), IntTcpAgent::output(), output(), UdpAgent::sendmsg(), SA_Agent::sendmsg(), RTPAgent::sendmsg(), MessagePassingAgent::sendmsg(), TPAgent::sendto(), and MessagePassingAgent::sendto().
Here is the call graph for this function: ![]() |
|
|
Definition at line 1028 of file tcp.cc. References TcpAgent::cwnd_, hstcp::cwnd_last_, TcpAgent::cwnd_range_, TcpAgent::decrease_param(), TcpAgent::hstcp_, hstcp::increase_last_, TcpAgent::low_window_, hstcp::p1, and hstcp::p2. Referenced by TcpAgent::opencwnd(). 01029 { 01030 double increase, decrease, p, answer; 01031 /* extending the slow-start for high-speed TCP */ 01032 01033 /* for highspeed TCP -- from Sylvia Ratnasamy, */ 01034 /* modifications by Sally Floyd and Evandro de Souza */ 01035 // p ranges from 1.5/W^2 at congestion window low_window_, to 01036 // high_p_ at congestion window high_window_, on a log-log scale. 01037 // The decrease factor ranges from 0.5 to high_decrease 01038 // as the window ranges from low_window to high_window, 01039 // as the log of the window. 01040 // For an efficient implementation, this would just be looked up 01041 // in a table, with the increase and decrease being a function of the 01042 // congestion window. 01043 01044 if (cwnd_ <= low_window_) { 01045 answer = 1 / cwnd_; 01046 return answer; 01047 } else if (cwnd_ >= hstcp_.cwnd_last_ && 01048 cwnd_ < hstcp_.cwnd_last_ + cwnd_range_) { 01049 // cwnd_range_ can be set to 0 to be disabled, 01050 // or can be set from 1 to 100 01051 answer = hstcp_.increase_last_ / cwnd_; 01052 return answer; 01053 } else { 01054 // OLD: 01055 // p = exp(linear(log(cwnd_), log(low_window_), log(hstcp_.low_p), log(high_window_), log(high_p_))); 01056 // NEW, but equivalent: 01057 p = exp(hstcp_.p1 + log(cwnd_) * hstcp_.p2); 01058 decrease = decrease_param(); 01059 // OLD: 01060 // increase = cwnd_*cwnd_*p *(2.0*decrease)/(2.0 - decrease); 01061 // NEW, but equivalent: 01062 increase = cwnd_ * cwnd_ * p /(1/decrease - 0.5); 01063 // if (increase > max_increase) { 01064 // increase = max_increase; 01065 // } 01066 answer = increase / cwnd_; 01067 hstcp_.cwnd_last_ = cwnd_; 01068 hstcp_.increase_last_ = increase; 01069 return answer; 01070 } 01071 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1479 of file tcp.cc. References abort(), TcpAgent::qs_cwnd_, Agent::size_, TcpAgent::wnd_init_, and TcpAgent::wnd_init_option_. Referenced by TcpAgent::endQuickStart(), TcpAgent::processQuickStart(), VegasTcpAgent::recv(), RFC793eduTcpAgent::recv(), TcpAgent::set_initial_window(), and QSNewRenoTcpAgent::timeout(). 01480 { 01481 // If Quick-Start Request was approved, use that as a basis for 01482 // initial window 01483 if (qs_cwnd_) { 01484 return (qs_cwnd_); 01485 } 01486 // 01487 // init_option = 1: static iw of wnd_init_ 01488 // 01489 if (wnd_init_option_ == 1) { 01490 return (wnd_init_); 01491 } 01492 else if (wnd_init_option_ == 2) { 01493 // do iw according to Internet draft 01494 if (size_ <= 1095) { 01495 return (4.0); 01496 } else if (size_ < 2190) { 01497 return (3.0); 01498 } else { 01499 return (2.0); 01500 } 01501 } 01502 // XXX what should we return here??? 01503 fprintf(stderr, "Wrong number of wnd_init_option_ %d\n", 01504 wnd_init_option_); 01505 abort(); 01506 return (2.0); // XXX make msvc happy. 01507 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 456 of file agent.cc. References hdr_nv::access(), hdr_flags::access(), hdr_ip::access(), hdr_cmn::access(), ns_addr_t::addr_, Scheduler::clock(), hdr_flags::cong_action_, hdr_ip::daddr(), Agent::defttl_, hdr_cmn::direction(), hdr_ip::dport(), Agent::dst_, hdr_flags::ecn_, hdr_flags::ecn_capable_, hdr_flags::ecn_to_echo_, hdr_flags::eln_, hdr_cmn::error(), Agent::fid_, hdr_ip::flowid(), hdr_flags::fs_, NixNode::GetNixVector(), NixNode::GetNodeObject(), hdr_nv::h_used, Agent::here_, hdr_cmn::iface(), Scheduler::instance(), hdr_flags::no_ts_, hdr_cmn::NONE, hdr_nv::nv(), hdr_ip::offset(), hdr_nv::offset(), ns_addr_t::port_, hdr_flags::pri_, hdr_ip::prio(), Agent::prio_, hdr_cmn::ptype(), hdr_flags::qs_, NixVec::Reset(), hdr_ip::saddr(), hdr_cmn::size(), Agent::size_, hdr_ip::sport(), hdr_cmn::timestamp(), hdr_ip::ttl(), Agent::type_, hdr_cmn::uid(), Agent::uidcnt_, UNKN_IFACE, and iface_literal::value(). Referenced by Agent::allocpkt(), and PingResponder::recv(). 00457 { 00458 hdr_cmn* ch = hdr_cmn::access(p); 00459 ch->uid() = uidcnt_++; 00460 ch->ptype() = type_; 00461 ch->size() = size_; 00462 ch->timestamp() = Scheduler::instance().clock(); 00463 ch->iface() = UNKN_IFACE.value(); // from packet.h (agent is local) 00464 ch->direction() = hdr_cmn::NONE; 00465 00466 ch->error() = 0; /* pkt not corrupt to start with */ 00467 00468 hdr_ip* iph = hdr_ip::access(p); 00469 iph->saddr() = here_.addr_; 00470 iph->sport() = here_.port_; 00471 iph->daddr() = dst_.addr_; 00472 iph->dport() = dst_.port_; 00473 00474 //DEBUG 00475 //if (dst_ != -1) 00476 // printf("pl break\n"); 00477 00478 iph->flowid() = fid_; 00479 iph->prio() = prio_; 00480 iph->ttl() = defttl_; 00481 00482 hdr_flags* hf = hdr_flags::access(p); 00483 hf->ecn_capable_ = 0; 00484 hf->ecn_ = 0; 00485 hf->eln_ = 0; 00486 hf->ecn_to_echo_ = 0; 00487 hf->fs_ = 0; 00488 hf->no_ts_ = 0; 00489 hf->pri_ = 0; 00490 hf->cong_action_ = 0; 00491 hf->qs_ = 0; 00492 #ifdef HAVE_STL 00493 00494 hdr_nv* nv = hdr_nv::access(p); 00495 if (0) 00496 printf("Off hdr_nv %d, ip_hdr %d myaddr %d\n", 00497 hdr_nv::offset(), hdr_ip::offset(), here_.addr_); 00498 NixNode* pNixNode = NixNode::GetNodeObject(here_.addr_); 00499 if (0) 00500 printf("Node Object %p\n", pNixNode); 00501 if (pNixNode) { 00502 // If we get non-null, indicates nixvector routing in use 00503 // Delete any left over nv in the packet 00504 // Get a nixvector to the target (may create new) 00505 NixVec* pNv = pNixNode->GetNixVector(dst_.addr_); 00506 pNv->Reset(); 00507 nv->nv() = pNv; // And set the nixvec in the packet 00508 nv->h_used = 0; // And reset used portion to 0 00509 } 00510 #endif //HAVE_STL 00511 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 250 of file agent.cc. References min, OldValue::next_, Agent::oldValueList_, TRACEVAR_MAXVALUELENGTH, OldValue::val_, and OldValue::var_. Referenced by Agent::trace(). 00251 { 00252 OldValue *p = new OldValue; 00253 assert(p != NULL); 00254 strncpy(p->val_, value, min(strlen(value)+1, TRACEVAR_MAXVALUELENGTH)); 00255 p->var_ = v; 00256 p->next_ = NULL; 00257 if (oldValueList_ == NULL) 00258 oldValueList_ = p; 00259 else { 00260 p->next_ = oldValueList_; 00261 oldValueList_ = p; 00262 } 00263 }
|
|
|
Definition at line 61 of file object.h. References NsObject::debug_. 00061 { return debug_; }
|
|
||||||||||||||||
|
Definition at line 990 of file tcp.cc. Referenced by TcpAgent::opencwnd(). 00991 { 00992 int round = int(cwnd / (double(max_ssthresh)/2.0)); 00993 double increment1 = 1.0/(double(round)); 00994 if (increment < increment1) 00995 increment = increment1; 00996 return increment; 00997 }
|
|
||||||||||||||||||||||||
|
Definition at line 978 of file tcp.cc. 00979 { 00980 // The y coordinate factor ranges from y_1 to y_2 00981 // as the x coordinate ranges from x_1 to x_2. 00982 double y = y_1 + ((y_2 - y_1) * ((x - x_1)/(x_2-x_1))); 00983 return y; 00984 }
|
|
|
Reimplemented from Agent. Definition at line 1210 of file tcp-full-bay.cc. References PT_TCP, state_, TCPS_LISTEN, and Agent::type_. Referenced by command(). 01211 { 01212 state_ = TCPS_LISTEN; 01213 type_ = PT_TCP; // changed by kmn 8/6/97 01214 //type_ = PT_ACK; // instead of PT_TCP 01215 }
|
|
|
Definition at line 242 of file agent.cc. References OldValue::next_, Agent::oldValueList_, and OldValue::var_. Referenced by Agent::trace(). 00243 { 00244 OldValue *p = oldValueList_; 00245 while ((p != NULL) && (p->var_ != v)) 00246 p = p->next_; 00247 return p; 00248 }
|
|
|
Definition at line 1705 of file tcp.cc. References CLOSE_CWND_INIT, TcpAgent::last_ack_, TcpAgent::output(), TcpAgent::qs_window_, TcpAgent::slowdown(), TcpAgent::tcp_qs_recovery_, and TCP_REASON_DUPACK. Referenced by TcpAgent::dupack_action(), Sack1TcpAgent::dupack_action(), and NewRenoTcpAgent::dupack_action(). 01706 { 01707 if (qs_window_ && tcp_qs_recovery_) { 01708 //recover_ = maxseq_; 01709 //reset_rtx_timer(1,0); 01710 slowdown(CLOSE_CWND_INIT); 01711 // reset ssthresh to half of W-D/2? 01712 qs_window_ = 0; 01713 output(last_ack_ + 1, TCP_REASON_DUPACK); 01714 return 1; 01715 } 01716 return 0; 01717 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 310 of file agent.cc. References ns_addr_t::addr_, Agent::channel_, Scheduler::clock(), Agent::here_, Scheduler::instance(), TIME_FORMAT, and Agent::traceName_. Referenced by Agent::command(). 00311 { 00312 char wrk[256]; 00313 int n; 00314 double curTime = (&Scheduler::instance() == NULL ? 0 : 00315 Scheduler::instance().clock()); 00316 00317 sprintf(wrk, "v -t "TIME_FORMAT" -e monitor_agent %d %s", 00318 curTime, here_.addr_, traceName_); 00319 n = strlen(wrk); 00320 wrk[n] = '\n'; 00321 wrk[n+1] = 0; 00322 if (channel_) 00323 (void)Tcl_Write(channel_, wrk, n+1); 00324 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 610 of file tcp-full-bay.cc. References flags_, last_ack_sent_, maxseg_, rcv_nxt_, segs_per_ack_, switch_spa_thresh_, and TF_ACKNOW. Referenced by output(), and recv(). 00611 { 00612 //first cut, send if anything to ack. Might need maxseg_ 00613 if(flags_ & TF_ACKNOW) 00614 return 1; 00615 if(rcv_nxt_ < switch_spa_thresh_) 00616 return ((rcv_nxt_ - last_ack_sent_) >= 1); 00617 return ((rcv_nxt_ - last_ack_sent_) >= (segs_per_ack_ * maxseg_)); 00618 }
|
|
|
Definition at line 1399 of file tcp.cc. References TcpAgent::prev_highest_ack_, TcpAgent::t_seqno_, and TcpAgent::window(). Referenced by TcpAgent::recv_newack_helper(). 01399 { 01400 int win = window () ; 01401 if (t_seqno_ > (prev_highest_ack_ + win)) 01402 return 1; 01403 else 01404 return 0; 01405 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented from TcpAgent. Definition at line 540 of file tcp-full-bay.cc. References hdr_tcp::access(), hdr_tcp::ackno(), cancel_rtx_timeout(), FALSE, TcpAgent::highest_ack_, TcpAgent::maxseq_, now(), TcpAgent::rtt_active_, TcpAgent::rtt_seq_, TcpAgent::rtt_update(), TcpAgent::set_rtx_timer(), TcpAgent::t_backoff_, TcpAgent::t_seqno_, and hdr_tcp::ts(). Referenced by recv(). 00541 { 00542 hdr_tcp *tcph = hdr_tcp::access(pkt); 00543 00544 register int ackno = tcph->ackno(); 00545 00546 // we were timing the segment and we 00547 // got an ACK for it 00548 if (rtt_active_ && ackno >= rtt_seq_) { 00549 /* got a rtt sample */ 00550 rtt_active_ = FALSE; // no longer timing 00551 t_backoff_ = 1; // stop exp backoff 00552 } 00553 00554 /* always with timestamp option */ 00555 double tao = now() - tcph->ts(); 00556 rtt_update(tao); 00557 00558 if (ackno >= maxseq_) 00559 cancel_rtx_timeout(); 00560 else { 00561 if (ackno > highest_ack_) { 00562 set_rtx_timer(); 00563 } 00564 } 00565 00566 // advance the ack number if this is for new data 00567 if (ackno > highest_ack_) 00568 highest_ack_ = ackno; 00569 // set up the next packet to send 00570 if (t_seqno_ < highest_ack_) 00571 t_seqno_ = highest_ack_; // thing to send next 00572 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 956 of file tcp.cc. References hdr_tcp::access(), TcpAgent::cancel_rtx_timer(), TcpAgent::cwnd_, TcpAgent::maxseq_, hdr_tcp::seqno(), TcpAgent::set_rtx_timer(), and TcpAgent::t_seqno_. Referenced by TcpAgent::newack(), SackRHTcpAgent::newack(), RFC793eduTcpAgent::newack(), FackTcpAgent::oldack(), and NewRenoTcpAgent::partialnewack_helper(). 00957 { 00958 hdr_tcp *tcph = hdr_tcp::access(pkt); 00959 /* 00960 * t_seqno_, the next packet to send, is reset (decreased) 00961 * to highest_ack_ + 1 after a timeout, 00962 * so we also have to check maxseq_, the highest seqno sent. 00963 * In addition, if the packet sent after the timeout has 00964 * the ECN bit set, then the returning ACK caused cwnd_ to 00965 * be decreased to less than one, and we can't send another 00966 * packet until the retransmit timer again expires. 00967 * So we have to check for "cwnd_ < 1" as well. 00968 */ 00969 if (t_seqno_ > tcph->seqno() || tcph->seqno() < maxseq_ || cwnd_ < 1) 00970 set_rtx_timer(); 00971 else 00972 cancel_rtx_timer(); 00973 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 161 of file tcp-full-bay.h. References Scheduler::clock(), and Scheduler::instance(). Referenced by advance(), newack(), recv(), sendpacket(), and timeout(). 00161 { return Scheduler::instance().clock(); }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1002 of file tcp.cc. References TcpAgent::numdupacks_, and TcpAgent::numdupacksFrac_. Referenced by Sack1TcpAgent::dupack_action(). 01003 { 01004 int cwndfraction = (int) cwnd/numdupacksFrac_; 01005 if (numdupacks_ > cwndfraction) { 01006 return numdupacks_; 01007 } else { 01008 return cwndfraction; 01009 } 01010 }
|
|
|
Reimplemented in FackTcpAgent, IntTcpAgent, RFC793eduTcpAgent, and XcpAgent. Definition at line 1076 of file tcp.cc. References abort(), TcpAgent::awnd_, TcpAgent::count_, TcpAgent::cwnd_, CWND_ACTION_TIMEOUT, TcpAgent::fcnt_, TcpAgent::increase_num_, TcpAgent::increase_param(), TcpAgent::k_parameter_, TcpAgent::last_cwnd_action_, TcpAgent::limited_slow_start(), TcpAgent::max_ssthresh_, TcpAgent::maxcwnd_, pow(), TcpAgent::ssthresh_, TcpAgent::t_srtt_, TcpAgent::T_SRTT_BITS, TcpAgent::tcp_tick_, TcpAgent::wnd_const_, and TcpAgent::wnd_option_. Referenced by FackTcpAgent::opencwnd(), TcpSessionAgent::recv(), recv(), TcpAgent::recv_newack_helper(), VegasTcpAgent::recv_newack_helper(), TcpFsAgent::recv_newack_helper(), and TcpAsymAgent::recv_newack_helper(). 01077 { 01078 double increment; 01079 if (cwnd_ < ssthresh_) { 01080 /* slow-start (exponential) */ 01081 cwnd_ += 1; 01082 } else { 01083 /* linear */ 01084 double f; 01085 switch (wnd_option_) { 01086 case 0: 01087 if (++count_ >= cwnd_) { 01088 count_ = 0; 01089 ++cwnd_; 01090 } 01091 break; 01092 01093 case 1: 01094 /* This is the standard algorithm. */ 01095 increment = increase_num_ / cwnd_; 01096 if ((last_cwnd_action_ == 0 || 01097 last_cwnd_action_ == CWND_ACTION_TIMEOUT) 01098 && max_ssthresh_ > 0) { 01099 increment = limited_slow_start(cwnd_, 01100 max_ssthresh_, increment); 01101 } 01102 cwnd_ += increment; 01103 break; 01104 01105 case 2: 01106 /* These are window increase algorithms 01107 * for experimental purposes only. */ 01108 /* This is the Constant-Rate increase algorithm 01109 * from the 1991 paper by S. Floyd on "Connections 01110 * with Multiple Congested Gateways". 01111 * The window is increased by roughly 01112 * wnd_const_*RTT^2 packets per round-trip time. */ 01113 f = (t_srtt_ >> T_SRTT_BITS) * tcp_tick_; 01114 f *= f; 01115 f *= wnd_const_; 01116 /* f = wnd_const_ * RTT^2 */ 01117 f += fcnt_; 01118 if (f > cwnd_) { 01119 fcnt_ = 0; 01120 ++cwnd_; 01121 } else 01122 fcnt_ = f; 01123 break; 01124 01125 case 3: 01126 /* The window is increased by roughly 01127 * awnd_^2 * wnd_const_ packets per RTT, 01128 * for awnd_ the average congestion window. */ 01129 f = awnd_; 01130 f *= f; 01131 f *= wnd_const_; 01132 f += fcnt_; 01133 if (f > cwnd_) { 01134 fcnt_ = 0; 01135 ++cwnd_; 01136 } else 01137 fcnt_ = f; 01138 break; 01139 01140 case 4: 01141 /* The window is increased by roughly 01142 * awnd_ * wnd_const_ packets per RTT, 01143 * for awnd_ the average congestion window. */ 01144 f = awnd_; 01145 f *= wnd_const_; 01146 f += fcnt_; 01147 if (f > cwnd_) { 01148 fcnt_ = 0; 01149 ++cwnd_; 01150 } else 01151 fcnt_ = f; 01152 break; 01153 case 5: 01154 /* The window is increased by roughly wnd_const_*RTT 01155 * packets per round-trip time, as discussed in 01156 * the 1992 paper by S. Floyd on "On Traffic 01157 * Phase Effects in Packet-Switched Gateways". */ 01158 f = (t_srtt_ >> T_SRTT_BITS) * tcp_tick_; 01159 f *= wnd_const_; 01160 f += fcnt_; 01161 if (f > cwnd_) { 01162 fcnt_ = 0; 01163 ++cwnd_; 01164 } else 01165 fcnt_ = f; 01166 break; 01167 case 6: 01168 /* binomial controls */ 01169 cwnd_ += increase_num_ / (cwnd_*pow(cwnd_,k_parameter_)); 01170 break; 01171 case 8: 01172 /* high-speed TCP, RFC 3649 */ 01173 increment = increase_param(); 01174 if ((last_cwnd_action_ == 0 || 01175 last_cwnd_action_ == CWND_ACTION_TIMEOUT) 01176 && max_ssthresh_ > 0) { 01177 increment = limited_slow_start(cwnd_, 01178 max_ssthresh_, increment); 01179 } 01180 cwnd_ += increment; 01181 break; 01182 default: 01183 #ifdef notdef 01184 /*XXX*/ 01185 error("illegal window option %d", wnd_option_); 01186 #endif 01187 abort(); 01188 } 01189 } 01190 // if maxcwnd_ is set (nonzero), make it the cwnd limit 01191 if (maxcwnd_ && (int(cwnd_) > maxcwnd_)) 01192 cwnd_ = maxcwnd_; 01193 01194 return; 01195 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 308 of file tcp-full-bay.cc. References state_, TCPS_FIN_WAIT_1, TCPS_LAST_ACK, TCPS_LISTEN, TCPS_SYN_RECEIVED, TCPS_SYN_SENT, TH_ACK, TH_FIN, and TH_SYN. Referenced by output(), and send_much(). 00309 { 00310 int flags = 0; 00311 if ((state_ != TCPS_LISTEN) && (state_ != TCPS_SYN_SENT)) 00312 flags |= TH_ACK; 00313 00314 if ((state_ == TCPS_SYN_SENT) || (state_ == TCPS_SYN_RECEIVED)) 00315 flags |= TH_SYN; 00316 00317 if ((state_ == TCPS_FIN_WAIT_1) || (state_ == TCPS_LAST_ACK)) 00318 flags |= TH_FIN; 00319 00320 return (flags); 00321 }
|
|
||||||||||||
|
Reimplemented from TcpAgent. Definition at line 364 of file tcp-full-bay.cc. References close_on_empty_, TcpAgent::curseq_, FALSE, flags_, TcpAgent::highest_ack_, Agent::idle(), iss_, last_ack_sent_, maxseg_, TcpAgent::maxseq_, min, need_send(), nodelay_, outflags(), rcv_nxt_, TcpAgent::rtt_active_, TcpAgent::rtt_seq_, TcpAgent::rtx_timer_, Agent::send(), sendpacket(), TcpAgent::set_rtx_timer(), state_, TimerHandler::status(), TcpAgent::t_seqno_, TCPS_FIN_WAIT_1, TF_ACKNOW, TF_DELACK, TF_SENTFIN, TF_SENTSYN, TH_FIN, TH_PUSH, TH_SYN, TIMER_PENDING, TRUE, TcpAgent::window(), and TcpAgent::wnd_. Referenced by connect(), fast_retransmit(), and send_much(). 00365 { 00366 int is_retransmit = (seqno < maxseq_); 00367 int idle = (highest_ack_ == maxseq_); 00368 00369 //kmn - changing all this for clarity 8/7/97 00370 int buffered_bytes = (curseq_ + iss_) - seqno; 00371 int datalen = min(buffered_bytes, (highest_ack_ + (window() * maxseg_)) - seqno); 00372 int pflags = outflags(); 00373 int emptying_buffer = 0; 00374 00375 if((pflags & TH_SYN) || datalen <= 0) 00376 datalen = 0; 00377 else if(datalen > maxseg_) { 00378 datalen = maxseg_; 00379 } else if(datalen == buffered_bytes) { 00380 emptying_buffer = 1; 00381 pflags |= TH_PUSH; 00382 //usrclosed() causes nested calls to output() 00383 if(close_on_empty_) { 00384 pflags |= TH_FIN; 00385 state_ = TCPS_FIN_WAIT_1; 00386 } 00387 } 00388 00389 //end of kmn changes 00390 00391 /* turn off FIN if there's really more to send */ 00392 if (datalen > 0 && !emptying_buffer) 00393 pflags &= ~TH_FIN; 00394 00395 /* sender SWS avoidance (Nagle) */ 00396 00397 if (datalen > 0) { 00398 // if full-sized segment, ok 00399 if (datalen == maxseg_) 00400 goto send; 00401 // if Nagle disabled and buffer clearing, ok 00402 if ((idle || nodelay_) && emptying_buffer) 00403 goto send; 00404 // if a retransmission 00405 if (is_retransmit) 00406 goto send; 00407 // if big "enough", ok... 00408 // (this is not a likely case, and would 00409 // only happen for tiny windows) 00410 if (datalen >= ((wnd_ * maxseg_) / 2.0)) 00411 goto send; 00412 } 00413 00414 if (need_send()) 00415 goto send; 00416 00417 /* 00418 * send now if a SYN or special flag "TF_ACKNOW" is set. 00419 * TF_ACKNOW can be set during connection establishment and 00420 * to generate acks for out-of-order data 00421 * kmn 8/28 need to send if there's a push 00422 */ 00423 if ((flags_ & TF_ACKNOW) || (pflags & (TH_SYN|TH_FIN|TH_PUSH))) 00424 goto send; 00425 00426 return; // no reason to send now 00427 00428 send: 00429 //these changed by vj and kmn 00430 if (pflags & TH_FIN) { 00431 if (flags_ & TF_SENTFIN) { 00432 // don't allow seqno to advance past fin 00433 // (the ack generated by a discarded duplicate 00434 // may attempt to do this) 00435 if (seqno >= maxseq_) 00436 --seqno; 00437 } else { 00438 flags_ |= TF_SENTFIN; 00439 ++t_seqno_; 00440 } 00441 } 00442 00443 if((pflags & TH_SYN)) { 00444 if ((flags_ & TF_SENTSYN) == 0) { 00445 flags_ |= TF_SENTSYN; 00446 ++t_seqno_; 00447 } 00448 } 00449 00450 /* 00451 * fill in packet fields. Agent::allocpkt() 00452 * has already filled most of the network layer 00453 * fields for us. So fill in tcp hdr and adjust 00454 * the packet size. 00455 */ 00456 sendpacket(seqno, rcv_nxt_, pflags, datalen, reason); 00457 last_ack_sent_ = rcv_nxt_; 00458 flags_ &= ~(TF_ACKNOW|TF_DELACK); 00459 00460 t_seqno_ += datalen; // update snd_nxt (t_seqno_) 00461 if (t_seqno_ > maxseq_) { 00462 maxseq_ = t_seqno_; // largest seq# we've sent 00463 /* 00464 * Time this transmission if not a retransmission and 00465 * not currently timing anything. 00466 */ 00467 if (rtt_active_ == FALSE) { 00468 rtt_active_ = TRUE; // set timer 00469 rtt_seq_ = seqno; // timed seq # 00470 } 00471 } 00472 /* 00473 * Set retransmit timer if not currently set, 00474 * and not doing an ack or a keep-alive probe. 00475 * Initial value for retransmit timer is smoothed 00476 * round-trip time + 2 * round-trip time variance. 00477 * Future values are rtt + 4 * rttvar. 00478 */ 00479 if (!(rtx_timer_.status() == TIMER_PENDING) && (t_seqno_ > highest_ack_)) { 00480 set_rtx_timer(); // no timer pending, schedule one 00481 } 00482 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in NewRenoTcpAsymFsAgent, TcpAsymAgent, TcpRenoAsymAgent, NewRenoTcpAsymAgent, TcpFsAgent, RenoTcpFsAgent, NewRenoTcpFsAgent, and IntTcpAgent. Definition at line 259 of file tcp.h. Referenced by XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), and QSNewRenoTcpAgent::output().
|
|
|
Reimplemented in NewRenoTcpAsymFsAgent, TcpFsAgent, NewRenoTcpFsAgent, and NewRenoTcpAgent. Definition at line 265 of file tcp.h.
|
|
|
|
Definition at line 577 of file tcp-full-bay.cc.
|
|
|
|
|
|
Definition at line 2104 of file tcp.cc. References TcpAgent::dupacks_, TcpAgent::F_counting, TcpAgent::numdupacks_, TcpAgent::RTT_count, and TcpAgent::W_timed. 02105 { 02106 if (F_counting == 1) { 02107 if (seqno >= W_timed) { 02108 RTT_count ++ ; 02109 F_counting = 0 ; 02110 } 02111 else { 02112 if (dupacks_ == numdupacks_) 02113 RTT_count ++ ; 02114 } 02115 } 02116 }
|
|
|
Definition at line 2000 of file tcp.cc. References CWND_HALF_WITH_MIN, TcpAgent::EnblRTTCtr_, TcpAgent::highest_ack_, Scheduler::instance(), TcpAgent::slowdown(), TcpAgent::T_last, TcpAgent::T_prev, TcpAgent::t_rtxcur_, TcpAgent::t_seqno_, TCP_IDLE, TcpAgent::tcp_tick_, THREE_QUARTER_SSTHRESH, TcpAgent::W_used, and TcpAgent::window(). Referenced by TcpAgent::send_much(), Sack1TcpAgent::send_much(), and TcpAgent::send_one(). 02001 { 02002 int tcp_now = (int)(Scheduler::instance().clock()/tcp_tick_ + 0.5); 02003 int rto = (int)(t_rtxcur_/tcp_tick_) ; 02004 /*double ct = Scheduler::instance().clock();*/ 02005 02006 if (!EnblRTTCtr_) { 02007 if (tcp_now - T_last >= rto) { 02008 // The sender has been idle. 02009 slowdown(THREE_QUARTER_SSTHRESH|TCP_IDLE) ; 02010 for (int i = 0 ; i < (tcp_now - T_last)/rto; i ++) { 02011 slowdown(CWND_HALF_WITH_MIN|TCP_IDLE); 02012 } 02013 T_prev = tcp_now ; 02014 W_used = 0 ; 02015 } 02016 T_last = tcp_now ; 02017 if (t_seqno_ == highest_ack_+ window()) { 02018 T_prev = tcp_now ; 02019 W_used = 0 ; 02020 } 02021 else if (t_seqno_ == curseq_-1) { 02022 // The sender has no more data to send. 02023 int tmp = t_seqno_ - highest_ack_ ; 02024 if (tmp > W_used) 02025 W_used = tmp ; 02026 if (tcp_now - T_prev >= rto) { 02027 // The sender has been application-limited. 02028 slowdown(THREE_QUARTER_SSTHRESH|TCP_IDLE); 02029 slowdown(CLOSE_CWND_HALF_WAY|TCP_IDLE); 02030 T_prev = tcp_now ; 02031 W_used = 0 ; 02032 } 02033 } 02034 } else { 02035 rtt_counting(); 02036 } 02037 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1599 of file tcp.cc. References hdr_qs::access(), hdr_tcp::access(), Scheduler::clock(), hdr_qs::flag(), TcpAgent::headersize(), TcpAgent::initial_window(), Scheduler::instance(), TcpAgent::qs_approved_, TcpAgent::qs_cwnd_, TcpAgent::qs_requested_, QS_RESPONSE, hdr_qs::rate(), hdr_qs::rate_to_Bps(), Agent::size_, hdr_tcp::ts_echo(), hdr_qs::ttl(), and TcpAgent::ttl_diff_. Referenced by TcpAgent::recv(), Sack1TcpAgent::recv(), RenoTcpAgent::recv(), and NewRenoTcpAgent::recv(). 01600 { 01601 // QuickStart code from Srikanth Sundarrajan. 01602 hdr_tcp *tcph = hdr_tcp::access(pkt); 01603 hdr_qs *qsh = hdr_qs::access(pkt); 01604 double now = Scheduler::instance().clock(); 01605 int app_rate; 01606 01607 // printf("flag: %d ttl: %d ttl_diff: %d rate: %d\n", qsh->flag(), 01608 // qsh->ttl(), ttl_diff_, qsh->rate()); 01609 qs_requested_ = 0; 01610 qs_approved_ = 0; 01611 if (qsh->flag() == QS_RESPONSE && qsh->ttl() == ttl_diff_ && 01612 qsh->rate() > 0) { 01613 app_rate = (int) (hdr_qs::rate_to_Bps(qsh->rate()) * 01614 (now - tcph->ts_echo()) / (size_ + headersize())); 01615 #ifdef QS_DEBUG 01616 printf("Quick Start approved, rate %d, window %d\n", 01617 qsh->rate(), app_rate); 01618 #endif 01619 if (app_rate > initial_window()) { 01620 qs_cwnd_ = app_rate; 01621 qs_approved_ = 1; 01622 } 01623 } else { // Quick Start rejected 01624 #ifdef QS_DEBUG 01625 printf("Quick Start rejected\n"); 01626 #endif 01627 } 01628 01629 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in CorresHost. Definition at line 1935 of file tcp.cc. References TcpAgent::closecwnd(), CWND_ACTION_ECN, TcpAgent::highest_ack_, TcpAgent::last_cwnd_action_, TcpAgent::maxseq_, and TcpAgent::recover_. 01936 { 01937 if (highest_ack_ >= recover_) { 01938 recover_ = maxseq_; 01939 last_cwnd_action_ = CWND_ACTION_ECN; 01940 closecwnd(how); 01941 } 01942 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Reimplemented in CMUTrace. Definition at line 96 of file object.cc. References Packet::free(). 00097 { 00098 Packet::free(p); 00099 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Reimplemented from TcpAgent. Definition at line 688 of file tcp-full-bay.cc. References hdr_ip::access(), hdr_cmn::access(), hdr_tcp::access(), hdr_tcp::ackno(), BayReassemblyQueue::add(), app_, TcpAgent::bug_fix_, cancel_rtx_timeout(), Scheduler::clock(), CLOSE_CWND_HALF, CLOSE_SSTHRESH_HALF, TcpAgent::curseq_, TcpAgent::cwnd_, hdr_ip::daddr(), DATA_PUSH, delack_interval_, delack_timer_, hdr_ip::dport(), Connector::drop(), dupack_reset_, TcpAgent::dupacks_, dupseg_fix_, BayReassemblyQueue::empty(), FALSE, fast_retransmit(), first_data_, hdr_tcp::flags(), flags_, TcpAgent::highest_ack_, hdr_tcp::hlen(), Scheduler::instance(), iss_, maxseg_, TcpAgent::maxseq_, need_send(), newack(), now(), TcpAgent::opencwnd(), rcv_nxt_, REASON_NORMAL, REASON_TIMEOUT, TcpAgent::recover_, recover_cause_, BayTcpAppAgent::recv(), TimerHandler::resched(), rq_, TcpAgent::rtt_active_, TcpAgent::rtx_timer_, hdr_ip::saddr(), send_much(), sendpacket(), hdr_tcp::seqno(), hdr_cmn::size(), TcpAgent::slowdown(), hdr_ip::sport(), TcpAgent::ssthresh_, state_, TimerHandler::status(), switch_spa_thresh_, TcpAgent::t_seqno_, tcprexmtthresh_, TCPS_CLOSED, TCPS_CLOSING, TCPS_ESTABLISHED, TCPS_FIN_WAIT_1, TCPS_FIN_WAIT_2, TCPS_LAST_ACK, TCPS_LISTEN, TCPS_SYN_RECEIVED, TCPS_SYN_SENT, TF_ACKNOW, TF_DELACK, TH_ACK, TH_FIN, TH_PUSH, TH_SYN, TIMER_PENDING, and TRUE. 00689 { 00690 hdr_tcp *tcph = hdr_tcp::access(pkt); 00691 hdr_cmn *th = hdr_cmn::access(pkt); 00692 hdr_ip *iph = hdr_ip::access(pkt); 00693 int needoutput = 0; 00694 int ourfinisacked = 0; 00695 int todrop = 0; 00696 int dupseg = FALSE; 00697 00698 #ifdef notdef 00699 if (trace_) 00700 plot(); 00701 #endif 00702 00703 // 00704 // if no delayed-ACK timer is set, set one 00705 // they are set to fire every 'interval_' secs, starting 00706 // at time t0 = (0.0 + k * interval_) for some k such 00707 // that t0 > now 00708 // 00709 /* 00710 if (!pending_[TCP_TIMER_DELACK]) { 00711 */ 00712 if (!(delack_timer_.status() == TIMER_PENDING)) { 00713 double now = Scheduler::instance().clock(); 00714 int last = int(now / delack_interval_); 00715 delack_timer_.resched(delack_interval_ * (last + 1.0) - now); 00716 00717 } 00718 00719 int datalen = th->size() - tcph->hlen(); 00720 int ackno = tcph->ackno(); // ack # from packet 00721 00722 // nuked header prediction code that was here - kmn 8/5/97 00723 00724 int tiflags = tcph->flags() ; // tcp flags from packet 00725 00726 switch (state_) { 00727 case TCPS_LISTEN: /* awaiting peer's SYN */ 00728 if (tiflags & TH_ACK) { 00729 if (tiflags & TH_FIN) { 00730 sendpacket(tcph->ackno(), tcph->seqno()+1, 00731 TH_ACK, 0, REASON_NORMAL); 00732 goto drop; 00733 } 00734 // ACK shouldn't be on here 00735 // kmn - this can be from previous connection if reusing 00736 // fprintf(stderr, 00737 // "%f: BayFullTcpAgent::recv(%s): got ACK(%d) while in LISTEN\n", 00738 // now(), name(), ackno); 00739 goto drop; 00740 } 00741 if ((tiflags & TH_SYN) == 0) { 00742 // we're looking for a SYN in return 00743 fprintf(stderr, 00744 "%f: BayFullTcpAgent::recv(%s): got a non-SYN while in LISTEN\n", 00745 now(), name()); 00746 goto drop; 00747 } 00748 flags_ |= TF_ACKNOW; 00749 state_ = TCPS_SYN_RECEIVED; 00750 rcv_nxt_ = tcph->seqno() + 1; //kmn 00751 t_seqno_ = iss_; 00752 //kmn - switch from one to set segs per ack 00753 switch_spa_thresh_ = rcv_nxt_ + (16 * 1024); 00754 goto step6; 00755 case TCPS_SYN_SENT: /* we sent SYN, expecting SYN+ACK */ 00756 if ((tiflags & TH_ACK) && (ackno > maxseq_)) { 00757 // not an ACK for our SYN, discard 00758 // fprintf(stderr, 00759 // "%f: BayFullTcpAgent::recv(%s): bad ACK (%d) for our SYN(%d)\n", 00760 // now(), name(), int(ackno), int(maxseq_)); 00761 goto drop; 00762 } 00763 if ((tiflags & TH_SYN) == 0) { 00764 // we're looking for a SYN in return 00765 fprintf(stderr, 00766 "%f: BayFullTcpAgent::recv(%s): no SYN for our SYN(%d)\n", 00767 now(), name(), int(maxseq_)); 00768 goto drop; 00769 } 00770 rcv_nxt_ = tcph->seqno()+1; // initial expected seq# 00771 //kmn - switch from one to set segs per ack 00772 switch_spa_thresh_ = rcv_nxt_ + (16 * 1024); 00773 cancel_rtx_timeout(); // cancel timer on our 1st SYN 00774 flags_ |= TF_ACKNOW; // ACK peer's SYN 00775 if (tiflags & TH_ACK) { 00776 // got SYN+ACK (what we're expecting) 00777 // set up to ACK peer's SYN+ACK 00778 newack(pkt); 00779 state_ = TCPS_ESTABLISHED; 00780 } else { 00781 // simultaneous active opens 00782 state_ = TCPS_SYN_RECEIVED; 00783 } 00784 goto step6; 00785 } 00786 00787 // check for redundant data at head/tail of segment 00788 // note that the 4.4bsd [Net/3] code has 00789 // a bug here which can cause us to ignore the 00790 // perfectly good ACKs on duplicate segments. The 00791 // fix is described in (Stevens, Vol2, p. 959-960). 00792 // This code is based on that correction. 00793 // 00794 // In addition, it has a modification so that duplicate segments 00795 // with dup acks don't trigger a fast retransmit when dupseg_fix_ 00796 // is enabled. 00797 // 00798 todrop = rcv_nxt_ - tcph->seqno(); // how much overlap? 00799 if (todrop > 0) { 00800 // segment is something we've seen (perhaps partially) 00801 if (tiflags & TH_SYN) { 00802 t_seqno_ = highest_ack_; 00803 if ((tiflags & TH_ACK) == 0) 00804 goto dropafterack; 00805 tiflags &= ~TH_SYN; 00806 } 00807 if (todrop > datalen || 00808 (todrop == datalen && ((tiflags & TH_FIN) == 0))) { 00809 /* 00810 * Any valid FIN must be to the left of the window. 00811 * At this point the FIN must be a duplicate or out 00812 * of sequence; drop it. 00813 */ 00814 tiflags &= ~TH_FIN; 00815 00816 /* 00817 * Send an ACK to resynchronize and drop any data. 00818 * But keep on processing for RST or ACK. 00819 */ 00820 flags_ |= TF_ACKNOW; 00821 todrop = datalen; 00822 dupseg = TRUE; 00823 } 00824 tcph->seqno() += todrop; 00825 datalen -= todrop; 00826 } 00827 00828 if (tiflags & TH_SYN) { 00829 fprintf(stderr, 00830 "%f: %d.%d>%d.%d BayFullTcpAgent::recv(%s) received unexpected SYN (state:%d)\n", 00831 now(), 00832 iph->saddr(), iph->sport(), 00833 iph->daddr(), iph->dport(), 00834 name(), state_); 00835 goto drop; 00836 } 00837 00838 if ((tiflags & (TH_SYN|TH_ACK)) == 0) { 00839 fprintf(stderr, "%f: %d.%d>%d.%d BayFullTcpAgent::recv(%s) got packet lacking ACK (seq %d)\n", 00840 now(), 00841 iph->saddr(), iph->sport(), 00842 iph->daddr(), iph->dport(), 00843 name(), tcph->seqno()); 00844 goto drop; 00845 } 00846 00847 /* 00848 * ACK processing 00849 */ 00850 00851 switch (state_) { 00852 case TCPS_SYN_RECEIVED: /* got ACK for our SYN+ACK */ 00853 if (ackno < highest_ack_ || ackno > maxseq_) { 00854 // not in useful range 00855 goto drop; 00856 } 00857 state_ = TCPS_ESTABLISHED; 00858 /* fall into ... */ 00859 00860 /* 00861 * In ESTABLISHED state: drop duplicate ACKs; ACK out of range 00862 * ACKs. If the ack is in the range 00863 * tp->snd_una < ti->ti_ack <= tp->snd_max 00864 * then advance tp->snd_una to ti->ti_ack and drop 00865 * data from the retransmission queue. 00866 * 00867 * note that states CLOSE_WAIT and TIME_WAIT aren't used 00868 * in the simulator 00869 */ 00870 00871 case TCPS_ESTABLISHED: 00872 case TCPS_FIN_WAIT_1: 00873 case TCPS_FIN_WAIT_2: 00874 case TCPS_CLOSING: 00875 case TCPS_LAST_ACK: 00876 00877 // look for dup ACKs (dup ack numbers, no data) 00878 // 00879 // do fast retransmit/recovery if at/past thresh 00880 if (ackno <= highest_ack_) { 00881 // an ACK which doesn't advance highest_ack_ 00882 if (datalen == 0 && (!dupseg_fix_ || !dupseg)) { 00883 /* 00884 * If we have outstanding data 00885 * this is a completely 00886 * duplicate ack, 00887 * the ack is the biggest we've 00888 * seen and we've seen exactly our rexmt 00889 * threshhold of them, assume a packet 00890 * has been dropped and retransmit it. 00891 * 00892 * We know we're losing at the current 00893 * window size so do congestion avoidance. 00894 * 00895 * Dup acks mean that packets have left the 00896 * network (they're now cached at the receiver) 00897 * so bump cwnd by the amount in the receiver 00898 * to keep a constant cwnd packets in the 00899 * network. 00900 */ 00901 00902 if (!(rtx_timer_.status() == TIMER_PENDING) || 00903 ackno != highest_ack_) { 00904 // not timed, or re-ordered ACK 00905 dupacks_ = 0; 00906 } else if (bug_fix_ && 00907 highest_ack_ == recover_ && 00908 recover_cause_ == REASON_TIMEOUT) { 00909 // doing timeout recovery not fastrxmit 00910 dupacks_ = 0; 00911 } else if (++dupacks_ == tcprexmtthresh_) { 00912 slowdown(CLOSE_SSTHRESH_HALF|CLOSE_CWND_HALF); 00913 cancel_rtx_timeout(); 00914 rtt_active_ = FALSE; 00915 fast_retransmit(ackno); 00916 // we measure cwnd in packets, 00917 // so don't scale by maxseg_ 00918 // as real TCP does 00919 cwnd_ = ssthresh_ + dupacks_; 00920 goto drop; 00921 } else if (dupacks_ > tcprexmtthresh_) { 00922 // we just measure cwnd in packets, 00923 // so don't scale by maxset_ as real 00924 // tcp does 00925 cwnd_++; // fast recovery 00926 send_much(0, REASON_NORMAL, 0); 00927 goto drop; 00928 } 00929 } else { 00930 // non-zero length segment 00931 // (or window changed in real TCP). 00932 if (dupack_reset_) 00933 dupacks_ = 0; 00934 } 00935 break; /* take us to "step6" */ 00936 } 00937 00938 /* 00939 * we've finished the fast retransmit/recovery period 00940 * (i.e. received an ACK which advances highest_ack_) 00941 */ 00942 00943 /* 00944 * If the congestion window was inflated to account 00945 * for the other side's cached packets, retract it. 00946 */ 00947 if (dupacks_ >= tcprexmtthresh_ && cwnd_ > ssthresh_) { 00948 /* 00949 * make sure we send at most 2 packets due to this ack 00950 */ 00951 cwnd_ = (maxseq_ - ackno + maxseg_ - 1) 00952 / maxseg_ + 2; 00953 } 00954 dupacks_ = 0; 00955 if (ackno > maxseq_) { 00956 // ack more than we sent(!?) 00957 fprintf(stderr, 00958 "%f: BayFullTcpAgent::recv(%s) too-big ACK (ack: %d, maxseq:%d)\n", 00959 now(), name(), int(ackno), int(maxseq_)); 00960 goto dropafterack; 00961 } 00962 00963 /* 00964 * If we have a timestamp reply, update smoothed 00965 * round trip time. If no timestamp is present but 00966 * transmit timer is running and timed sequence 00967 * number was acked, update smoothed round trip time. 00968 * Since we now have an rtt measurement, cancel the 00969 * timer backoff (cf., Phil Karn's retransmit alg.). 00970 * Recompute the initial retransmit timer. 00971 * 00972 * If all outstanding data is acked, stop retransmit 00973 * If there is more data to be acked, restart retransmit 00974 * timer, using current (possibly backed-off) value. 00975 */ 00976 newack(pkt); 00977 if (state_ == TCPS_ESTABLISHED && ackno < maxseq_) 00978 needoutput = 1; 00979 /* kmn - 8/12/97: don't want to do this on first 00980 * data send, especially to compare IWs 00981 * So added test. 00982 */ 00983 if(first_data_) 00984 opencwnd(); 00985 // kmn - 8/15 added second test that is acking fin 00986 if ((state_ == TCPS_FIN_WAIT_1 || state_ == TCPS_FIN_WAIT_2 00987 || state_ == TCPS_LAST_ACK || state_ == TCPS_CLOSING) 00988 && ackno >= (curseq_ + iss_)) // && ackno == maxseq_) 00989 ourfinisacked = 1; 00990 else 00991 ourfinisacked = 0; 00992 // additional processing when we're in special states 00993 00994 switch (state_) { 00995 /* 00996 * In FIN_WAIT_1 STATE in addition to the processing 00997 * for the ESTABLISHED state if our FIN is now acknowledged 00998 * then enter FIN_WAIT_2. 00999 */ 01000 case TCPS_FIN_WAIT_1: /* doing active close */ 01001 if (ourfinisacked) 01002 state_ = TCPS_FIN_WAIT_2; 01003 break; 01004 01005 /* 01006 * In CLOSING STATE in addition to the processing for 01007 * the ESTABLISHED state if the ACK acknowledges our FIN 01008 * then enter the TIME-WAIT state, otherwise ignore 01009 * the segment. 01010 */ 01011 case TCPS_CLOSING: /* simultaneous active close */; 01012 if (ourfinisacked) 01013 state_ = TCPS_CLOSED; 01014 break; 01015 /* 01016 * In LAST_ACK, we may still be waiting for data to drain 01017 * and/or to be acked, as well as for the ack of our FIN. 01018 * If our FIN is now acknowledged, 01019 * enter the closed state and return. 01020 */ 01021 case TCPS_LAST_ACK: /* passive close */ 01022 if (ourfinisacked) { 01023 state_ = TCPS_CLOSED; //kmn added 2 lines 01024 /* 01025 for(int i =0; i < NTIMER; i++) { 01026 cancel(i); 01027 } 01028 */ 01029 goto drop; 01030 } else { //should be a FIN we've seen 01031 fprintf(stderr, 01032 "%f: %d.%d>%d.%d BayFullTcpAgent::recv(%s) received non-ACK (state:%d)\n", 01033 now(), 01034 iph->saddr(), iph->sport(), 01035 iph->daddr(), iph->dport(), 01036 name(), state_); 01037 } 01038 01039 /* no case for TIME_WAIT in simulator */ 01040 } // inner switch 01041 } // outer switch 01042 01043 step6: 01044 /* real TCP handles window updates and URG data here */ 01045 /* dodata: this label is in the "real" code.. here only for reference */ 01046 /* 01047 * DATA processing 01048 * kmn - several changes here to talk to application agent 01049 */ 01050 01051 if (datalen > 0 || (tiflags & TH_FIN)) { 01052 first_data_ = 1; //now seen first data 01053 // see the "TCP_REASS" macro for this code 01054 if (tcph->seqno() == rcv_nxt_ && rq_.empty()) { 01055 // got the in-order packet we were looking 01056 // for, nobody is in the reassembly queue, 01057 // so this is the common case... 01058 // note: in "real" TCP we must also be in 01059 // ESTABLISHED state to come here, because 01060 // data arriving before ESTABLISHED is 01061 // queued in the reassembly queue. Since we 01062 // don't really have a process anyhow, just 01063 // accept the data here as-is (i.e. don't 01064 // require being in ESTABLISHED state) 01065 tiflags &= TH_FIN; 01066 if (tiflags) { 01067 ++rcv_nxt_; 01068 } 01069 flags_ |= TF_DELACK; 01070 rcv_nxt_ += datalen; 01071 // give to "application" here 01072 // added 7/30/97 by kmn to call application with 01073 // number of bytes since last push (if any) 01074 // the server is going to call advance before this 01075 // completes, so changed advance to not call 01076 // send_much if ESTABLISHED. curseq gets 01077 // checked below. 01078 // 01079 if(datalen && app_ && (tcph->flags() & TH_PUSH)) { 01080 //rcv_nxt_ - last_upcalled_bytes_; 01081 app_->recv(pkt,this,DATA_PUSH); 01082 //last_upcalled_bytes_ = rcv_nxt_; 01083 } 01084 needoutput = need_send(); 01085 } else { 01086 // not the one we want next (or it 01087 // is but there's stuff on the reass queue); 01088 // do whatever we need to do for out-of-order 01089 // segments or hole-fills. Also, 01090 // send an ACK to the other side right now. 01091 tiflags = rq_.add(pkt); 01092 if (tiflags & TH_PUSH) { 01093 if (app_ != NULL ) 01094 app_->recv(pkt,this,DATA_PUSH); 01095 needoutput = need_send(); 01096 } else 01097 flags_ |= TF_ACKNOW; 01098 //reset for losses 01099 switch_spa_thresh_ = rcv_nxt_ + (16 * 1024); 01100 } 01101 } 01102 01103 /* 01104 * if FIN is received, ACK the FIN 01105 * (let user know if we could do so) 01106 */ 01107 01108 if (tiflags & TH_FIN) { 01109 flags_ |= TF_ACKNOW; 01110 rq_.clear(); // other side shutting down 01111 switch (state_) { 01112 /* 01113 * In SYN_RECEIVED and ESTABLISHED STATES 01114 * enter the CLOSE_WAIT state. 01115 * (in the simulator, go to LAST_ACK) 01116 * (passive close) 01117 */ 01118 case TCPS_SYN_RECEIVED: 01119 case TCPS_ESTABLISHED: 01120 state_ = TCPS_LAST_ACK; 01121 break; 01122 01123 /* 01124 * If still in FIN_WAIT_1 STATE FIN has not been acked so 01125 * enter the CLOSING state. 01126 * (simultaneous close) 01127 */ 01128 case TCPS_FIN_WAIT_1: 01129 state_ = TCPS_CLOSING; 01130 break; 01131 /* 01132 * In FIN_WAIT_2 state enter the TIME_WAIT state, 01133 * starting the time-wait timer, turning off the other 01134 * standard timers. 01135 * (in the simulator, just go to CLOSED) 01136 * (active close) 01137 */ 01138 case TCPS_FIN_WAIT_2: 01139 state_ = TCPS_CLOSED; 01140 cancel_rtx_timeout(); 01141 break; 01142 } 01143 } 01144 01145 if (needoutput || (flags_ & TF_ACKNOW)) 01146 send_much(1, REASON_NORMAL, 0); 01147 else if ((curseq_ + iss_) > highest_ack_) 01148 send_much(0, REASON_NORMAL, 0); 01149 01150 /* kmn - ugh, egregious hack. Can tell it's a server 01151 * so it goes to listen state. Do something 01152 * else if this becomes more stable 01153 */ 01154 if(state_ == TCPS_CLOSED) { 01155 if(close_on_empty_) { 01156 reinit(); 01157 curseq_ = iss_; 01158 state_ = TCPS_LISTEN; 01159 } else { /*"something else" - kmn 6/00 */ 01160 if (app_ != NULL ) 01161 app_->recv(pkt,this,CONNECTION_END); 01162 } 01163 } 01164 Packet::free(pkt); 01165 return; 01166 01167 dropafterack: 01168 flags_ |= TF_ACKNOW; 01169 send_much(1, REASON_NORMAL, 0); 01170 drop: 01171 Packet::free(pkt); 01172 return; 01173 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1636 of file tcp.cc. References hdr_tcp::access(), TcpAgent::cwnd_, TcpAgent::dupacks_, TcpAgent::frto_, TcpAgent::highest_ack_, TcpAgent::last_ack_, hdr_tcp::seqno(), and TcpAgent::t_seqno_. 01637 { 01638 hdr_tcp *tcph = hdr_tcp::access(pkt); 01639 if (tcph->seqno() == last_ack_ && frto_ != 0) { 01640 /* 01641 * Duplicate ACK while in F-RTO indicates that the 01642 * timeout was valid. Go to slow start retransmissions. 01643 */ 01644 t_seqno_ = highest_ack_ + 1; 01645 cwnd_ = frto_; 01646 frto_ = 0; 01647 01648 // Must zero dupacks (in order to trigger send_much at recv) 01649 // dupacks is increased in recv after exiting this function 01650 dupacks_ = -1; 01651 } 01652 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in NewRenoTcpAsymFsAgent, TcpAsymAgent, TcpRenoAsymAgent, NewRenoTcpAsymAgent, TcpFsAgent, RenoTcpFsAgent, and NewRenoTcpFsAgent. Definition at line 262 of file tcp.h. Referenced by RFC793eduTcpAgent::recv(), and FackTcpAgent::recv().
|
|
|
Reimplemented in NewRenoTcpAsymFsAgent, TcpAsymAgent, TcpRenoAsymAgent, NewRenoTcpAsymAgent, FackTcpAgent, TcpFsAgent, RenoTcpFsAgent, NewRenoTcpFsAgent, RFC793eduTcpAgent, VegasTcpAgent, and XcpAgent. Definition at line 1407 of file tcp.cc. References hdr_flags::access(), TcpAgent::cancel_rtx_timer(), TcpAgent::closed_, TcpAgent::control_increase_, TcpAgent::curseq_, TcpAgent::ecn_backoff_, TcpAgent::ecn_burst_, TcpAgent::ect_, FALSE, TcpAgent::finish(), TcpAgent::frto_, TcpAgent::highest_ack_, TcpAgent::network_limited(), TcpAgent::newack(), TcpAgent::old_ecn_, TcpAgent::opencwnd(), TcpAgent::QOption_, TcpAgent::qs_window_, TcpAgent::recover_, TcpAgent::spurious_timeout(), TcpAgent::t_seqno_, TRUE, and TcpAgent::wnd_. 01407 { 01408 //hdr_tcp *tcph = hdr_tcp::access(pkt); 01409 newack(pkt); 01410 if (qs_window_ && highest_ack_ >= qs_window_) { 01411 // All segments in the QS window have been acknowledged. 01412 // We can exit the Quick-Start phase. 01413 qs_window_ = 0; 01414 } 01415 if (!ect_ || !hdr_flags::access(pkt)->ecnecho() || 01416 (old_ecn_ && ecn_burst_)) { 01417 /* If "old_ecn", this is not the first ACK carrying ECN-Echo 01418 * after a period of ACKs without ECN-Echo. 01419 * Therefore, open the congestion window. */ 01420 /* if control option is set, and the sender is not 01421 window limited, then do not increase the window size */ 01422 01423 if (!control_increase_ || 01424 (control_increase_ && (network_limited() == 1))) 01425 opencwnd(); 01426 } 01427 if (ect_) { 01428 if (!hdr_flags::access(pkt)->ecnecho()) 01429 ecn_backoff_ = 0; 01430 if (!ecn_burst_ && hdr_flags::access(pkt)->ecnecho()) 01431 ecn_burst_ = TRUE; 01432 else if (ecn_burst_ && ! hdr_flags::access(pkt)->ecnecho()) 01433 ecn_burst_ = FALSE; 01434 } 01435 if (!ect_ && hdr_flags::access(pkt)->ecnecho() && 01436 !hdr_flags::access(pkt)->cong_action()) 01437 ect_ = 1; 01438 /* if the connection is done, call finish() */ 01439 if ((highest_ack_ >= curseq_-1) && !closed_) { 01440 closed_ = 1; 01441 finish(); 01442 } 01443 if (QOption_ && curseq_ == highest_ack_ +1) { 01444 cancel_rtx_timer(); 01445 } 01446 if (frto_ == 1) { 01447 /* 01448 * New ack after RTO. If F-RTO is enabled, try to transmit new 01449 * previously unsent segments. 01450 * If there are no new data or receiver window limits the 01451 * transmission, revert to traditional recovery. 01452 */ 01453 if (recover_ + 1 >= highest_ack_ + wnd_ || 01454 recover_ + 1 >= curseq_) { 01455 frto_ = 0; 01456 } else if (highest_ack_ == recover_) { 01457 /* 01458 * F-RTO step 2a) RTO retransmission fixes whole 01459 * window => cancel F-RTO 01460 */ 01461 frto_ = 0; 01462 } else { 01463 t_seqno_ = recover_ + 1; 01464 frto_ = 2; 01465 } 01466 } else if (frto_ == 2) { 01467 /* 01468 * Second new ack after RTO. If F-RTO is enabled, RTO can be 01469 * declared spurious 01470 */ 01471 spurious_timeout(); 01472 } 01473 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 354 of file agent.cc. References Agent::app_, and Application::recv(). Referenced by TcpAsymSink::recv(). 00355 { 00356 if (app_) 00357 app_->recv(nbytes); 00358 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented from NsObject. Definition at line 78 of file agent.h.
|
|
|
|
Reimplemented from TcpAgent. Definition at line 169 of file tcp-full-bay.cc. References close_on_empty_, first_data_, flags_, TcpAgent::highest_ack_, iss_, last_ack_sent_, rcv_nxt_, TcpAgent::reset(), switch_spa_thresh_, and TcpAgent::t_seqno_. Referenced by delay_bind_init_all(). 00170 { 00171 TcpAgent::reset(); 00172 highest_ack_ = 0; 00173 last_ack_sent_ = 0; 00174 rcv_nxt_ = 0; //kmn 00175 flags_ = 0; 00176 t_seqno_ = iss_; 00177 close_on_empty_ = 0; //added 7/30/97 by kmn 00178 switch_spa_thresh_ = 0; 00179 first_data_ = 0; //don't open cwnd too early 00180 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 427 of file tcp.cc. References TcpAgent::Backoffs, TcpAgent::F_counting, TcpAgent::F_full, Scheduler::instance(), TcpAgent::RTT_count, TcpAgent::RTT_goodcount, TcpAgent::RTT_prev, TcpAgent::T_start, TcpAgent::tcp_tick_, and TcpAgent::W_timed. Referenced by TcpAgent::reset(). 00428 { 00429 int now = (int)(Scheduler::instance().clock()/tcp_tick_ + 0.5); 00430 00431 T_start = now ; 00432 RTT_count = 0 ; 00433 RTT_prev = 0 ; 00434 RTT_goodcount = 1 ; 00435 F_counting = 0 ; 00436 W_timed = -1 ; 00437 F_full = 0 ; 00438 Backoffs = 0 ; 00439 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Reimplemented in TcpSessionAgent. Definition at line 931 of file tcp.cc. References TcpAgent::highest_ack_, TcpAgent::rtt_active_, TcpAgent::rtt_backoff(), TcpAgent::set_rtx_timer(), and TcpAgent::t_seqno_. Referenced by TcpAgent::dupack_action(), Sack1TcpAgent::dupack_action(), RenoTcpAgent::dupack_action(), NewRenoTcpAgent::dupack_action(), FackTcpAgent::recv(), TcpAgent::timeout(), VegasTcpAgent::timeout(), SackRHTcpAgent::timeout(), FackTcpAgent::timeout(), and TcpFsAgent::timeout_nonrtx_helper(). 00932 { 00933 if (backoff) 00934 rtt_backoff(); 00935 set_rtx_timer(); 00936 if (!mild) 00937 t_seqno_ = highest_ack_ + 1; 00938 rtt_active_ = 0; 00939 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1175 of file tcp-full-bay.cc. References FALSE, TcpAgent::rtt_active_, TcpAgent::rtt_backoff(), and TcpAgent::set_rtx_timer(). Referenced by timeout(). 01176 { 01177 // cancel old timer, 01178 // set a new one 01179 rtt_backoff(); // double current timeout 01180 set_rtx_timer(); // set new timer 01181 rtt_active_ = FALSE; 01182 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in RFC793eduTcpAgent. Definition at line 599 of file tcp.cc. References TcpAgent::t_backoff_, TcpAgent::t_rttvar_, TcpAgent::t_srtt_, and TcpAgent::T_SRTT_BITS. Referenced by TcpAgent::ecn(), fast_retransmit(), TcpAgent::reset_rtx_timer(), TcpSessionAgent::reset_rtx_timer(), FullTcpAgent::reset_rtx_timer(), and reset_rtx_timer(). 00600 { 00601 if (t_backoff_ < 64) 00602 t_backoff_ <<= 1; 00603 00604 if (t_backoff_ > 8) { 00605 /* 00606 * If backed off this far, clobber the srtt 00607 * value, storing it in the mean deviation 00608 * instead. 00609 */ 00610 t_rttvar_ += (t_srtt_ >> T_SRTT_BITS); 00611 t_srtt_ = 0; 00612 } 00613 }
|
|
|
Definition at line 2046 of file tcp.cc. References TcpAgent::Backoffs, CWND_HALF_WITH_MIN, Scheduler::instance(), TcpAgent::RTT_count, TcpAgent::RTT_goodcount, TcpAgent::RTT_prev, TcpAgent::slowdown(), TcpAgent::T_last, TcpAgent::t_srtt_, TcpAgent::T_SRTT_BITS, TCP_IDLE, TcpAgent::tcp_tick_, THREE_QUARTER_SSTHRESH, and TcpAgent::W_used. 02047 { 02048 int tcp_now = (int)(Scheduler::instance().clock()/tcp_tick_ + 0.5); 02049 int rtt = (int(t_srtt_) >> T_SRTT_BITS) ; 02050 02051 if (rtt < 1) 02052 rtt = 1 ; 02053 if (tcp_now - T_last >= 2*rtt) { 02054 // The sender has been idle. 02055 int RTTs ; 02056 RTTs = (tcp_now -T_last)*RTT_goodcount/(rtt*2) ; 02057 RTTs = RTTs - Backoffs ; 02058 Backoffs = 0 ; 02059 if (RTTs > 0) { 02060 slowdown(THREE_QUARTER_SSTHRESH|TCP_IDLE) ; 02061 for (int i = 0 ; i < RTTs ; i ++) { 02062 slowdown(CWND_HALF_WITH_MIN|TCP_IDLE); 02063 RTT_prev = RTT_count ; 02064 W_used = 0 ; 02065 } 02066 } 02067 } 02068 T_last = tcp_now ; 02069 if (tcp_now - T_start >= 2*rtt) { 02070 if ((RTT_count > RTT_goodcount) || (F_full == 1)) { 02071 RTT_goodcount = RTT_count ; 02072 if (RTT_goodcount < 1) RTT_goodcount = 1 ; 02073 } 02074 RTT_prev = RTT_prev - RTT_count ; 02075 RTT_count = 0 ; 02076 T_start = tcp_now ; 02077 F_full = 0; 02078 } 02079 if (t_seqno_ == highest_ack_ + window()) { 02080 W_used = 0 ; 02081 F_full = 1 ; 02082 RTT_prev = RTT_count ; 02083 } 02084 else if (t_seqno_ == curseq_-1) { 02085 // The sender has no more data to send. 02086 int tmp = t_seqno_ - highest_ack_ ; 02087 if (tmp > W_used) 02088 W_used = tmp ; 02089 if (RTT_count - RTT_prev >= 2) { 02090 // The sender has been application-limited. 02091 slowdown(THREE_QUARTER_SSTHRESH|TCP_IDLE) ; 02092 slowdown(CLOSE_CWND_HALF_WAY|TCP_IDLE); 02093 RTT_prev = RTT_count ; 02094 Backoffs ++ ; 02095 W_used = 0; 02096 } 02097 } 02098 if (F_counting == 0) { 02099 W_timed = t_seqno_ ; 02100 F_counting = 1 ; 02101 } 02102 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in XcpAgent. Definition at line 512 of file tcp.cc. References TcpAgent::rttvar_init_, TcpAgent::rtxcur_init_, TcpAgent::srtt_init_, TcpAgent::t_backoff_, TcpAgent::t_rtt_, TcpAgent::t_rttvar_, TcpAgent::T_RTTVAR_BITS, TcpAgent::t_rtxcur_, TcpAgent::t_srtt_, TcpAgent::T_SRTT_BITS, and TcpAgent::tcp_tick_. Referenced by reinit(), TcpAgent::reset(), FullTcpAgent::reset(), and XcpAgent::rtt_init(). 00513 { 00514 t_rtt_ = 0; 00515 t_srtt_ = int(srtt_init_ / tcp_tick_) << T_SRTT_BITS; 00516 t_rttvar_ = int(rttvar_init_ / tcp_tick_) << T_RTTVAR_BITS; 00517 t_rtxcur_ = rtxcur_init_; 00518 t_backoff_ = 1; 00519 }
|
|
|
Definition at line 521 of file tcp.cc. References TcpAgent::maxrto_, TcpAgent::minrto_, TcpAgent::rfc2988_, TcpAgent::t_backoff_, TcpAgent::t_rtxcur_, TcpAgent::tcp_tick_, and TcpAgent::timeout(). Referenced by TcpAgent::set_rtx_timer(), TcpSessionAgent::set_rtx_timer(), and TcpFsAgent::set_rtx_timer(). 00522 { 00523 double timeout; 00524 if (rfc2988_) { 00525 // Correction from Tom Kelly to be RFC2988-compliant, by 00526 // clamping minrto_ before applying t_backoff_. 00527 if (t_rtxcur_ < minrto_) 00528 timeout = minrto_ * t_backoff_; 00529 else 00530 timeout = t_rtxcur_ * t_backoff_; 00531 } else { 00532 timeout = t_rtxcur_ * t_backoff_; 00533 if (timeout < minrto_) 00534 timeout = minrto_; 00535 } 00536 00537 if (timeout > maxrto_) 00538 timeout = maxrto_; 00539 00540 if (timeout < 2.0 * tcp_tick_) { 00541 if (timeout < 0) { 00542 fprintf(stderr, "TcpAgent: negative RTO! (%f)\n", 00543 timeout); 00544 exit(1); 00545 } 00546 timeout = 2.0 * tcp_tick_; 00547 } 00548 return (timeout); 00549 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in RFC793eduTcpAgent, and XcpAgent. Definition at line 553 of file tcp.cc. References TcpAgent::boot_time_, Scheduler::clock(), Scheduler::instance(), TcpAgent::rttvar_exp_, TcpAgent::t_rtt_, TcpAgent::t_rttvar_, TcpAgent::T_RTTVAR_BITS, TcpAgent::t_rtxcur_, TcpAgent::t_srtt_, TcpAgent::T_SRTT_BITS, TcpAgent::tcp_tick_, and TcpAgent::ts_option_. Referenced by TcpAgent::newack(), TcpSessionAgent::newack(), SackRHTcpAgent::newack(), FullTcpAgent::newack(), and newack(). 00554 { 00555 double now = Scheduler::instance().clock(); 00556 if (ts_option_) 00557 t_rtt_ = int(tao /tcp_tick_ + 0.5); 00558 else { 00559 double sendtime = now - tao; 00560 sendtime += boot_time_; 00561 double tickoff = fmod(sendtime, tcp_tick_); 00562 t_rtt_ = int((tao + tickoff) / tcp_tick_); 00563 } 00564 if (t_rtt_ < 1) 00565 t_rtt_ = 1; 00566 // 00567 // t_srtt_ has 3 bits to the right of the binary point 00568 // t_rttvar_ has 2 00569 // Thus "t_srtt_ >> T_SRTT_BITS" is the actual srtt, 00570 // and "t_srtt_" is 8*srtt. 00571 // Similarly, "t_rttvar_ >> T_RTTVAR_BITS" is the actual rttvar, 00572 // and "t_rttvar_" is 4*rttvar. 00573 // 00574 if (t_srtt_ != 0) { 00575 register short delta; 00576 delta = t_rtt_ - (t_srtt_ >> T_SRTT_BITS); // d = (m - a0) 00577 if ((t_srtt_ += delta) <= 0) // a1 = 7/8 a0 + 1/8 m 00578 t_srtt_ = 1; 00579 if (delta < 0) 00580 delta = -delta; 00581 delta -= (t_rttvar_ >> T_RTTVAR_BITS); 00582 if ((t_rttvar_ += delta) <= 0) // var1 = 3/4 var0 + 1/4 |d| 00583 t_rttvar_ = 1; 00584 } else { 00585 t_srtt_ = t_rtt_ << T_SRTT_BITS; // srtt = rtt 00586 t_rttvar_ = t_rtt_ << (T_RTTVAR_BITS-1); // rttvar = rtt / 2 00587 } 00588 // 00589 // Current retransmit value is 00590 // (unscaled) smoothed round trip estimate 00591 // plus 2^rttvar_exp_ times (unscaled) rttvar. 00592 // 00593 t_rtxcur_ = (((t_rttvar_ << (rttvar_exp_ + (T_SRTT_BITS - T_RTTVAR_BITS))) + 00594 t_srtt_) >> T_SRTT_BITS ) * tcp_tick_; 00595 00596 return; 00597 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in SRMAgent. Definition at line 91 of file agent.h. References Agent::sendmsg(). 00091 { sendmsg(nbytes); }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Reimplemented in HttpInvalAgent. Definition at line 84 of file agent.h. References Agent::sendmsg(). 00084 { sendmsg(sz, data, 0); }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
|
Reimplemented in NewRenoTcpAsymFsAgent, TcpAsymAgent, TcpRenoAsymAgent, NewRenoTcpAsymAgent, TcpFsAgent, RenoTcpFsAgent, and NewRenoTcpFsAgent. Definition at line 260 of file tcp.h. Referenced by TcpAgent::send_much(), and FackTcpAgent::send_much().
|
|
|
Reimplemented in NewRenoTcpAsymFsAgent, TcpFsAgent, RenoTcpFsAgent, and NewRenoTcpFsAgent. Definition at line 261 of file tcp.h. Referenced by TcpAgent::send_much(), and FackTcpAgent::send_much().
|
|
||||||||||||||||
|
Reimplemented from TcpAgent. Definition at line 488 of file tcp-full-bay.cc. References TcpAgent::curseq_, TcpAgent::delsnd_timer_, TcpAgent::highest_ack_, iss_, maxseg_, outflags(), output(), TcpAgent::overhead_, TimerHandler::resched(), TimerHandler::status(), TcpAgent::t_seqno_, TH_SYN, TIMER_PENDING, Random::uniform(), and TcpAgent::window(). Referenced by advance(), recv(), timeout(), and usrclosed(). 00489 { 00490 00491 /* 00492 * highest_ack is essentially "snd_una" in real TCP 00493 * 00494 * loop while we are in-window (seqno <= (highest_ack + win)) 00495 * and there is something to send (t_seqno_ < curseq_+iss_) 00496 */ 00497 int win = window() * maxseg_; // window() in pkts 00498 int npackets = 0; 00499 int topwin = curseq_ + iss_; 00500 if (topwin > highest_ack_ + win) 00501 topwin = highest_ack_ + win; 00502 00503 if (!force && (delsnd_timer_.status() == TIMER_PENDING)) 00504 return; 00505 00506 while (force || (t_seqno_ < topwin)) { 00507 if (overhead_ != 0 && !(delsnd_timer_.status() == TIMER_PENDING)) { 00508 delsnd_timer_.resched(Random::uniform(overhead_)); 00509 return; 00510 } 00511 output(t_seqno_, reason); // updates seqno for us 00512 force = 0; 00513 if (outflags() & TH_SYN) 00514 break; 00515 if (maxburst && ++npackets >= maxburst) 00516 break; 00517 } 00518 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1533 of file tcp.cc. References TcpAgent::curseq_, TcpAgent::cwnd_, TcpAgent::dupacks_, TcpAgent::highest_ack_, TcpAgent::output(), TcpAgent::process_qoption_after_send(), TcpAgent::QOption_, TcpAgent::t_seqno_, and TcpAgent::wnd_. 01534 { 01535 if (t_seqno_ <= highest_ack_ + wnd_ && t_seqno_ < curseq_ && 01536 t_seqno_ <= highest_ack_ + cwnd_ + dupacks_ ) { 01537 output(t_seqno_, 0); 01538 if (QOption_) 01539 process_qoption_after_send () ; 01540 t_seqno_ ++ ; 01541 // send_helper(); ?? 01542 } 01543 return; 01544 }
Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Reimplemented in UdpAgent, and MessagePassingAgent. Definition at line 400 of file agent.cc. References abort(). Referenced by Agent::command(), Application::send(), Agent::send(), TrafficTrace::timeout(), TelnetApp::timeout(), SctpApp1::timeout(), EXPOO_Traffic::timeout(), and CBR_PP_Traffic::timeout(). 00401 { 00402 fprintf(stderr, 00403 "Agent::sendmsg(int, AppData*, const char*) not implemented\n"); 00404 abort(); 00405 }
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Reimplemented from Agent. Reimplemented in FullTcpAgent, and SimpleTcpAgent. Definition at line 768 of file tcp.cc. References TcpAgent::curseq_, TcpAgent::maxburst_, TcpAgent::send_much(), Agent::size_, and TCP_MAXSEQ. 00769 { 00770 if (nbytes == -1 && curseq_ <= TCP_MAXSEQ) 00771 curseq_ = TCP_MAXSEQ; 00772 else 00773 curseq_ += (nbytes/size_ + (nbytes%size_ ? 1 : 0)); 00774 send_much(0, 0, maxburst_); 00775 }
Here is the call graph for this function: ![]() |
|
||||||||||||||||||||||||
|
Definition at line 323 of file tcp-full-bay.cc. References hdr_cmn::access(), hdr_tcp::access(), hdr_tcp::ackno(), Agent::allocpkt(), hdr_tcp::flags(), headersize(), hdr_tcp::hlen(), TcpAgent::nackpack_, TcpAgent::ndatabytes_, TcpAgent::ndatapack_, now(), TcpAgent::nrexmitbytes_, TcpAgent::nrexmitpack_, hdr_tcp::reason(), REASON_DUPACK, REASON_TIMEOUT, Agent::send(), hdr_tcp::seqno(), hdr_cmn::size(), and hdr_tcp::ts(). Referenced by output(), and recv(). 00325 { 00326 Packet* p = allocpkt(); 00327 hdr_tcp *tcph = hdr_tcp::access(p); 00328 hdr_cmn *th = hdr_cmn::access(p); 00329 tcph->seqno() = seqno; 00330 tcph->ackno() = ackno; 00331 tcph->flags() = pflags; 00332 tcph->hlen() = headersize(); 00333 tcph->ts() = now(); 00334 /* Open issue: should tcph->reason map to pkt->flags_ as in ns-1?? */ 00335 tcph->reason() |= reason; 00336 th->size() = datalen + headersize(); 00337 if (datalen <= 0) 00338 ++nackpack_; 00339 else { 00340 ++ndatapack_; 00341 ndatabytes_ += datalen; 00342 } 00343 if (reason == REASON_TIMEOUT || reason == REASON_DUPACK) { 00344 ++nrexmitpack_; 00345 nrexmitbytes_ += datalen; 00346 } 00347 send(p, 0); 00348 }
Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Reimplemented in MessagePassingAgent. |
|
||||||||||||||||
|
|
|
||||||||||||||||||||
|
Reimplemented in MessagePassingAgent. Definition at line 420 of file agent.cc.
|
|
||||||||||||||||||||
|
Definition at line 411 of file agent.cc. References abort(). Referenced by Agent::command(), AnWormApp::probe(), and DnhWormApp::send_probe(). 00413 { 00414 fprintf(stderr, 00415 "Agent::sendmsg(int, AppData*, const char*) not implemented\n"); 00416 abort(); 00417 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in FullTcpAgent. Definition at line 418 of file tcp.cc. References TcpAgent::cwnd_, TcpAgent::delay_growth_, TcpAgent::initial_window(), and TcpAgent::syn_. Referenced by TcpAgent::reset(), and FullTcpAgent::set_initial_window(). 00419 { 00420 if (syn_ && delay_growth_) 00421 cwnd_ = 1.0; 00422 else 00423 cwnd_ = initial_window(); 00424 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 103 of file agent.h. References Agent::type_. Referenced by Agent::command(), RA_Traffic::init(), POO_Traffic::init(), EXPOO_Traffic::init(), and CBR_PP_Traffic::init(). 00103 { type_ = pkttype; }
|
|
|
Reimplemented in NewRenoTcpAsymFsAgent, TcpFsAgent, RenoTcpFsAgent, NewRenoTcpFsAgent, and TcpSessionAgent. Definition at line 945 of file tcp.cc. References TimerHandler::resched(), TcpAgent::rtt_timeout(), and TcpAgent::rtx_timer_. Referenced by TahoeFullTcpAgent::dupack_action(), FullTcpAgent::foutput(), FullTcpAgent::newack(), newack(), TcpAgent::newtimer(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), output(), TcpAgent::reset_rtx_timer(), FullTcpAgent::reset_rtx_timer(), and reset_rtx_timer(). 00946 { 00947 rtx_timer_.resched(rtt_timeout()); 00948 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 51 of file connector.h. References Connector::drop_. Referenced by XCPWrapQ::command(). 00051 {drop_ = dt; }
|
|
|
Reimplemented in FullTcpAgent. Definition at line 98 of file agent.h. References Agent::size_. Referenced by rtProtoDV::command(), RLM_Sender::command(), imepAgent::getResponseListSize(), LandmarkAgent::makeUpdate(), Agent::recv(), SSMSRMAgent::send_glb_sess(), SSMSRMAgent::send_loc_sess(), SSMSRMAgent::send_rep_sess(), SRMAgent::send_sess(), TelnetApp::timeout(), and SctpApp1::timeout(). 00098 { return size_; }
|
|
|
Definition at line 1198 of file tcp.cc. References CLOSE_CWND_HALF, CLOSE_CWND_HALF_WAY, CLOSE_CWND_INIT, CLOSE_CWND_ONE, CLOSE_CWND_RESTART, CLOSE_SSTHRESH_HALF, TcpAgent::cong_action_, TcpAgent::count_, TcpAgent::cwnd_, CWND_ACTION_TIMEOUT, CWND_HALF_WITH_MIN, TcpAgent::decrease_num_, TcpAgent::decrease_param(), TcpAgent::fcnt_, TcpAgent::first_decrease_, TcpAgent::l_parameter_, TcpAgent::last_cwnd_action_, TcpAgent::low_window_, TcpAgent::ncwndcuts1_, TcpAgent::ncwndcuts_, NO_OUTSTANDING_DATA, pow(), TcpAgent::precision_reduce_, TcpAgent::ssthresh_, TCP_IDLE, THREE_QUARTER_SSTHRESH, TcpAgent::trace_event(), TRUE, TcpAgent::W_used, TcpAgent::window(), TcpAgent::windowd(), TcpAgent::wnd_init_, TcpAgent::wnd_option_, and TcpAgent::wnd_restart_. Referenced by TcpAgent::dupack_action(), Sack1TcpAgent::dupack_action(), RenoTcpAgent::dupack_action(), NewRenoTcpAgent::dupack_action(), SackFullTcpAgent::dupack_action(), TahoeFullTcpAgent::dupack_action(), FullTcpAgent::dupack_action(), TcpAgent::ecn(), FullTcpAgent::foutput(), TcpAgent::lossQuickStart(), TcpAgent::process_qoption_after_send(), recv(), FackTcpAgent::recv(), TcpAgent::rtt_counting(), TcpSessionAgent::send_much(), TcpAgent::timeout(), VegasTcpAgent::timeout(), TcpSessionAgent::timeout(), SackRHTcpAgent::timeout(), timeout(), FackTcpAgent::timeout(), FullTcpAgent::timeout_action(), and TcpFsAgent::timeout_nonrtx(). 01199 { 01200 double decrease; /* added for highspeed - sylvia */ 01201 double win, halfwin, decreasewin; 01202 int slowstart = 0; 01203 ++ncwndcuts_; 01204 if (!(how & TCP_IDLE) && !(how & NO_OUTSTANDING_DATA)){ 01205 ++ncwndcuts1_; 01206 } 01207 // we are in slowstart for sure if cwnd < ssthresh 01208 if (cwnd_ < ssthresh_) 01209 slowstart = 1; 01210 if (precision_reduce_) { 01211 halfwin = windowd() / 2; 01212 if (wnd_option_ == 6) { 01213 /* binomial controls */ 01214 decreasewin = windowd() - (1.0-decrease_num_)*pow(windowd(),l_parameter_); 01215 } else if (wnd_option_ == 8 && (cwnd_ > low_window_)) { 01216 /* experimental highspeed TCP */ 01217 decrease = decrease_param(); 01218 //if (decrease < 0.1) 01219 // decrease = 0.1; 01220 decrease_num_ = decrease; 01221 decreasewin = windowd() - (decrease * windowd()); 01222 } else { 01223 decreasewin = decrease_num_ * windowd(); 01224 } 01225 win = windowd(); 01226 } else { 01227 int temp; 01228 temp = (int)(window() / 2); 01229 halfwin = (double) temp; 01230 if (wnd_option_ == 6) { 01231 /* binomial controls */ 01232 temp = (int)(window() - (1.0-decrease_num_)*pow(window(),l_parameter_)); 01233 } else if ((wnd_option_ == 8) && (cwnd_ > low_window_)) { 01234 /* experimental highspeed TCP */ 01235 decrease = decrease_param(); 01236 //if (decrease < 0.1) 01237 // decrease = 0.1; 01238 decrease_num_ = decrease; 01239 temp = (int)(windowd() - (decrease * windowd())); 01240 } else { 01241 temp = (int)(decrease_num_ * window()); 01242 } 01243 decreasewin = (double) temp; 01244 win = (double) window(); 01245 } 01246 if (how & CLOSE_SSTHRESH_HALF) 01247 // For the first decrease, decrease by half 01248 // even for non-standard values of decrease_num_. 01249 if (first_decrease_ == 1 || slowstart || 01250 last_cwnd_action_ == CWND_ACTION_TIMEOUT) { 01251 // Do we really want halfwin instead of decreasewin 01252 // after a timeout? 01253 ssthresh_ = (int) halfwin; 01254 } else { 01255 ssthresh_ = (int) decreasewin; 01256 } 01257 else if (how & THREE_QUARTER_SSTHRESH) 01258 if (ssthresh_ < 3*cwnd_/4) 01259 ssthresh_ = (int)(3*cwnd_/4); 01260 if (how & CLOSE_CWND_HALF) 01261 // For the first decrease, decrease by half 01262 // even for non-standard values of decrease_num_. 01263 if (first_decrease_ == 1 || slowstart || decrease_num_ == 0.5) { 01264 cwnd_ = halfwin; 01265 } else cwnd_ = decreasewin; 01266 else if (how & CWND_HALF_WITH_MIN) { 01267 // We have not thought about how non-standard TCPs, with 01268 // non-standard values of decrease_num_, should respond 01269 // after quiescent periods. 01270 cwnd_ = decreasewin; 01271 if (cwnd_ < 1) 01272 cwnd_ = 1; 01273 } 01274 else if (how & CLOSE_CWND_RESTART) 01275 cwnd_ = int(wnd_restart_); 01276 else if (how & CLOSE_CWND_INIT) 01277 cwnd_ = int(wnd_init_); 01278 else if (how & CLOSE_CWND_ONE) 01279 cwnd_ = 1; 01280 else if (how & CLOSE_CWND_HALF_WAY) { 01281 // cwnd_ = win - (win - W_used)/2 ; 01282 cwnd_ = W_used + decrease_num_ * (win - W_used); 01283 if (cwnd_ < 1) 01284 cwnd_ = 1; 01285 } 01286 if (ssthresh_ < 2) 01287 ssthresh_ = 2; 01288 if (how & (CLOSE_CWND_HALF|CLOSE_CWND_RESTART|CLOSE_CWND_INIT|CLOSE_CWND_ONE)) 01289 cong_action_ = TRUE; 01290 01291 fcnt_ = count_ = 0; 01292 if (first_decrease_ == 1) 01293 first_decrease_ = 0; 01294 // for event tracing slow start 01295 if (cwnd_ == 1 || slowstart) 01296 // Not sure if this is best way to capture slow_start 01297 // This is probably tracing a superset of slowdowns of 01298 // which all may not be slow_start's --Padma, 07/'01. 01299 trace_event("SLOW_START"); 01300 01301 01302 01303 01304 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1658 of file tcp.cc. References TcpAgent::cwnd_, TcpAgent::frto_, TcpAgent::highest_ack_, TcpAgent::pipe_prev_, TcpAgent::prev_highest_ack_, TcpAgent::recover_, TcpAgent::spurious_response_, TcpAgent::ssthresh_, and TcpAgent::t_seqno_. Referenced by TcpAgent::recv_newack_helper(). 01659 { 01660 frto_ = 0; 01661 01662 switch (spurious_response_) { 01663 case 1: 01664 default: 01665 /* 01666 * Full revert of congestion window 01667 * (FlightSize before last acknowledgment) 01668 */ 01669 cwnd_ = t_seqno_ - prev_highest_ack_; 01670 break; 01671 01672 case 2: 01673 /* 01674 * cwnd = reduced ssthresh (approx. half of the earlier pipe) 01675 */ 01676 cwnd_ = ssthresh_; break; 01677 case 3: 01678 /* 01679 * slow start, but without retransmissions 01680 */ 01681 cwnd_ = 1; break; 01682 } 01683 01684 /* 01685 * Revert ssthresh to size before retransmission timeout 01686 */ 01687 ssthresh_ = pipe_prev_; 01688 01689 /* If timeout was spurious, bugfix is not needed */ 01690 recover_ = highest_ack_ - 1; 01691 }
|
|
|
Definition at line 144 of file tcp-full-bay.h. References state_. 00144 { return state_; }
|
|
|
Definition at line 49 of file connector.h. References Connector::target(), and Connector::target_.
Here is the call graph for this function: ![]() |
|
|
Definition at line 48 of file connector.h. References Connector::target_. Referenced by JoBS::assignRateDropsADC(), FQ::deque(), MIPMHAgent::reg(), MIPBSAgent::send_ads(), and Connector::target(). 00048 { return target_; }
|
|
|
Definition at line 1880 of file tcp.cc. References hdr_tcp::access(), TcpAgent::dupacks_, TcpAgent::eln_last_rxmit_, TcpAgent::eln_rxmit_thresh_, Packet::free(), TcpAgent::last_ack_, TcpAgent::maxburst_, TcpAgent::output(), TcpAgent::send_much(), hdr_tcp::seqno(), and TCP_REASON_DUPACK. 01881 { 01882 //int eln_rxmit; 01883 hdr_tcp *tcph = hdr_tcp::access(pkt); 01884 int ack = tcph->seqno(); 01885 01886 if (++dupacks_ == eln_rxmit_thresh_ && ack > eln_last_rxmit_) { 01887 /* Retransmit this packet */ 01888 output(last_ack_ + 1, TCP_REASON_DUPACK); 01889 eln_last_rxmit_ = last_ack_+1; 01890 } else 01891 send_much(0, 0, maxburst_); 01892 01893 Packet::free(pkt); 01894 return; 01895 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented from TcpAgent. Definition at line 635 of file tcp-full-bay.cc. References CLOSE_CWND_RESTART, CLOSE_SSTHRESH_HALF, delack_interval_, delack_timer_, TcpAgent::dupacks_, flags_, TcpAgent::highest_ack_, TcpAgent::maxseq_, now(), TcpAgent::nrexmit_, PF_TIMEOUT, REASON_NORMAL, REASON_TIMEOUT, TcpAgent::recover_, recover_cause_, TimerHandler::resched(), reset_rtx_timer(), send_much(), TcpAgent::slowdown(), state_, TcpAgent::t_seqno_, TCP_TIMER_DELACK, TCP_TIMER_DELSND, TCP_TIMER_RTX, TCPS_CLOSED, TCPS_LISTEN, TF_ACKNOW, and TF_DELACK. Referenced by BayDelAckTimer::expire(). 00636 { 00637 if(state_ == TCPS_CLOSED || state_ == TCPS_LISTEN) 00638 return; 00639 /* retransmit timer */ 00640 if (tno == TCP_TIMER_RTX) { 00641 ++nrexmit_; 00642 recover_ = maxseq_; 00643 recover_cause_ = REASON_TIMEOUT; 00644 slowdown(CLOSE_SSTHRESH_HALF|CLOSE_CWND_RESTART); 00645 //changed 6/10/00 to look at rtx problem -kmn 00646 /* if(highest_ack_ == maxseq_) 00647 reset_rtx_timer(0,0); 00648 else 00649 reset_rtx_timer(0,1); 00650 */ 00651 reset_rtx_timer(1); 00652 t_seqno_ = highest_ack_; 00653 dupacks_ = 0; 00654 send_much(1, REASON_TIMEOUT); 00655 } else if (tno == TCP_TIMER_DELSND) { 00656 /* 00657 * delayed-send timer, with random overhead 00658 * to avoid phase effects 00659 */ 00660 send_much(1, PF_TIMEOUT); 00661 } else if (tno == TCP_TIMER_DELACK) { 00662 if (flags_ & TF_DELACK) { 00663 flags_ &= ~TF_DELACK; 00664 flags_ |= TF_ACKNOW; 00665 send_much(1, REASON_NORMAL, 0); 00666 } 00667 delack_timer_.resched(delack_interval_); 00668 } else { 00669 fprintf(stderr, "%f: (%s) UNKNOWN TIMEOUT %d\n", 00670 now(), name(), tno); 00671 } 00672 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in NewRenoTcpAsymFsAgent, TcpFsAgent, RenoTcpFsAgent, NewRenoTcpFsAgent, and SimpleTcpAgent. Definition at line 1792 of file tcp.cc. References TcpAgent::maxburst_, TcpAgent::send_much(), TCP_REASON_TIMEOUT, and TCP_TIMER_DELSND. Referenced by TcpAgent::timeout(), SackRHTcpAgent::timeout(), RenoTcpAgent::timeout(), and TcpFsAgent::timeout_nonrtx(). 01793 { 01794 if (tno == TCP_TIMER_DELSND) { 01795 /* 01796 * delayed-send timer, with random overhead 01797 * to avoid phase effects 01798 */ 01799 send_much(1, TCP_REASON_TIMEOUT, maxburst_); 01800 } 01801 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented from Agent. Definition at line 399 of file tcp.cc. References TcpAgent::nam_tracevar_, Agent::trace(), TcpAgent::trace_all_oneline_, TcpAgent::traceAll(), and TcpAgent::traceVar(). 00400 { 00401 if (nam_tracevar_) { 00402 Agent::trace(v); 00403 } else if (trace_all_oneline_) 00404 traceAll(); 00405 else 00406 traceVar(v); 00407 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented from Agent. Definition at line 2118 of file tcp.cc. References Agent::addr(), BaseTrace::buffer(), Scheduler::clock(), TcpAgent::cwnd_, Agent::daddr(), Agent::dport(), Agent::et_, Agent::fid_, Scheduler::instance(), BaseTrace::nbuffer(), Agent::port(), BaseTrace::round(), TcpAgent::t_seqno_, TIME_FORMAT, and EventTrace::trace(). Referenced by TcpAgent::dupack_action(), Sack1TcpAgent::dupack_action(), RenoTcpAgent::dupack_action(), NewRenoTcpAgent::dupack_action(), SackFullTcpAgent::dupack_action(), TahoeFullTcpAgent::dupack_action(), FullTcpAgent::fast_retransmit(), TcpAgent::slowdown(), and TcpAgent::timeout(). 02119 { 02120 if (et_ == NULL) return; 02121 int seqno = t_seqno_; 02122 char *wrk = et_->buffer(); 02123 char *nwrk = et_->nbuffer(); 02124 if (wrk != 0) 02125 sprintf(wrk, 02126 "E "TIME_FORMAT" %d %d TCP %s %d %d %d", 02127 et_->round(Scheduler::instance().clock()), // time 02128 addr(), // owner (src) node id 02129 daddr(), // dst node id 02130 eventtype, // event type 02131 fid_, // flow-id 02132 seqno, // current seqno 02133 int(cwnd_) //cong. window 02134 ); 02135 02136 if (nwrk != 0) 02137 sprintf(nwrk, 02138 "E -t "TIME_FORMAT" -o TCP -e %s -s %d.%d -d %d.%d", 02139 et_->round(Scheduler::instance().clock()), // time 02140 eventtype, // event type 02141 addr(), // owner (src) node id 02142 port(), // owner (src) port id 02143 daddr(), // dst node id 02144 dport() // dst port id 02145 ); 02146 et_->trace(); 02147 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in TcpAsymAgent. Definition at line 331 of file tcp.cc. References Agent::addr(), Agent::channel_, Scheduler::clock(), TcpAgent::cwnd_, Agent::daddr(), Agent::dport(), TcpAgent::dupacks_, TcpAgent::highest_ack_, Scheduler::instance(), TcpAgent::maxseq_, Agent::port(), TcpAgent::ssthresh_, TcpAgent::t_backoff_, TcpAgent::t_rtt_, TcpAgent::t_rttvar_, TcpAgent::t_seqno_, TcpAgent::t_srtt_, TcpAgent::T_SRTT_BITS, TcpAgent::tcp_tick_, and TCP_WRK_SIZE. Referenced by TcpAgent::trace(), and TcpAsymAgent::traceAll(). 00331 { 00332 if (!channel_) 00333 return; 00334 00335 double curtime; 00336 Scheduler& s = Scheduler::instance(); 00337 char wrk[TCP_WRK_SIZE]; 00338 00339 curtime = &s ? s.clock() : 0; 00340 snprintf(wrk, TCP_WRK_SIZE, 00341 "time: %-8.5f saddr: %-2d sport: %-2d daddr: %-2d dport:" 00342 " %-2d maxseq: %-4d hiack: %-4d seqno: %-4d cwnd: %-6.3f" 00343 " ssthresh: %-3d dupacks: %-2d rtt: %-6.3f srtt: %-6.3f" 00344 " rttvar: %-6.3f bkoff: %-d\n", curtime, addr(), port(), 00345 daddr(), dport(), int(maxseq_), int(highest_ack_), 00346 int(t_seqno_), double(cwnd_), int(ssthresh_), 00347 int(dupacks_), int(t_rtt_)*tcp_tick_, 00348 (int(t_srtt_) >> T_SRTT_BITS)*tcp_tick_, 00349 int(t_rttvar_)*tcp_tick_/4.0, int(t_backoff_)); 00350 (void)Tcl_Write(channel_, wrk, -1); 00351 }
Here is the call graph for this function: ![]() |
|
|
Reimplemented in TcpAsymAgent, and TcpSessionAgent. Definition at line 355 of file tcp.cc. References Agent::addr(), Agent::channel_, Scheduler::clock(), TcpAgent::cwnd_, Agent::daddr(), Agent::dport(), Scheduler::instance(), Agent::port(), TcpAgent::t_rtt_, TcpAgent::t_rttvar_, TcpAgent::t_srtt_, TcpAgent::T_SRTT_BITS, TcpAgent::tcp_tick_, and TCP_WRK_SIZE. Referenced by TcpAgent::trace(), TcpSessionAgent::traceVar(), and TcpAsymAgent::traceVar(). 00356 { 00357 if (!channel_) 00358 return; 00359 00360 double curtime; 00361 Scheduler& s = Scheduler::instance(); 00362 char wrk[TCP_WRK_SIZE]; 00363 00364 curtime = &s ? s.clock() : 0; 00365 00366 // XXX comparing addresses is faster than comparing names 00367 if (v == &cwnd_) 00368 snprintf(wrk, TCP_WRK_SIZE, 00369 "%-8.5f %-2d %-2d %-2d %-2d %s %-6.3f\n", 00370 curtime, addr(), port(), daddr(), dport(), 00371 v->name(), double(*((TracedDouble*) v))); 00372 else if (v == &t_rtt_) 00373 snprintf(wrk, TCP_WRK_SIZE, 00374 "%-8.5f %-2d %-2d %-2d %-2d %s %-6.3f\n", 00375 curtime, addr(), port(), daddr(), dport(), 00376 v->name(), int(*((TracedInt*) v))*tcp_tick_); 00377 else if (v == &t_srtt_) 00378 snprintf(wrk, TCP_WRK_SIZE, 00379 "%-8.5f %-2d %-2d %-2d %-2d %s %-6.3f\n", 00380 curtime, addr(), port(), daddr(), dport(), 00381 v->name(), 00382 (int(*((TracedInt*) v)) >> T_SRTT_BITS)*tcp_tick_); 00383 else if (v == &t_rttvar_) 00384 snprintf(wrk, TCP_WRK_SIZE, 00385 "%-8.5f %-2d %-2d %-2d %-2d %s %-6.3f\n", 00386 curtime, addr(), port(), daddr(), dport(), 00387 v->name(), 00388 int(*((TracedInt*) v))*tcp_tick_/4.0); 00389 else 00390 snprintf(wrk, TCP_WRK_SIZE, 00391 "%-8.5f %-2d %-2d %-2d %-2d %s %d\n", 00392 curtime, addr(), port(), daddr(), dport(), 00393 v->name(), int(*((TracedInt*) v))); 00394 00395 (void)Tcl_Write(channel_, wrk, -1); 00396 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 1221 of file tcp-full-bay.cc. References REASON_NORMAL, send_much(), state_, TCPS_CLOSED, TCPS_ESTABLISHED, TCPS_FIN_WAIT_1, TCPS_LISTEN, TCPS_SYN_RECEIVED, and TCPS_SYN_SENT. Referenced by command(). 01222 { 01223 01224 switch (state_) { 01225 case TCPS_CLOSED: 01226 case TCPS_LISTEN: 01227 case TCPS_SYN_SENT: 01228 state_ = TCPS_CLOSED; 01229 break; 01230 case TCPS_SYN_RECEIVED: 01231 case TCPS_ESTABLISHED: 01232 state_ = TCPS_FIN_WAIT_1; 01233 send_much(1, REASON_NORMAL, 0); 01234 break; 01235 } 01236 return; 01237 }
Here is the call graph for this function: ![]() |
|
|
|
Reimplemented in RenoTcpAgent. Definition at line 870 of file tcp.cc. References TcpAgent::cwnd_, and TcpAgent::wnd_. Referenced by TcpAgent::slowdown().
|
|
|
Definition at line 351 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(). |
|
|
Reimplemented from Agent. Definition at line 193 of file tcp-full-bay.h. |
|
|
Definition at line 380 of file tcp.h. Referenced by TcpAgent::command(), command(), TcpAgent::delay_bind_dispatch(), TcpAgent::opencwnd(), RFC793eduTcpAgent::opencwnd(), reinit(), and TcpAgent::reset(). |
|
|
Definition at line 511 of file tcp.h. Referenced by TcpAgent::reset_qoption(), and TcpAgent::rtt_counting(). |
|
|
|
|
|
Definition at line 290 of file tcp.h. Referenced by FullTcpAgent::idle_restart(), TcpAgent::reset(), XcpAgent::rtt_update(), TcpAgent::rtt_update(), and RFC793eduTcpAgent::rtt_update(). |
|
|
|
Definition at line 333 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and NewRenoTcpAgent::dupack_action(). |
|
|
Definition at line 336 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), NewRenoTcpAgent::dupack_action(), and TcpAgent::output(). |
|
|
Reimplemented in TcpSessionAgent. Definition at line 274 of file tcp.h. Referenced by TcpAgent::cancel_timers(), TcpFsAgent::cancel_timers(), TcpFsAgent::send_helper(), TcpAsymAgent::send_helper(), TcpAgent::send_much(), and FackTcpAgent::send_much(). |
|
|
|
Definition at line 192 of file tcp-full-bay.h. |
|
|
Reimplemented in FullTcpAgent. Definition at line 377 of file tcp.h. Referenced by TcpAgent::advanceby(), IntTcpAgent::newack(), TcpAgent::recv_newack_helper(), VegasTcpAgent::recv_newack_helper(), RFC793eduTcpAgent::recv_newack_helper(), TcpFsAgent::recv_newack_helper(), FackTcpAgent::recv_newack_helper(), TcpAsymAgent::recv_newack_helper(), and TcpAgent::reset(). |
|
|
Definition at line 423 of file tcp.h. Referenced by FullTcpAgent::foutput(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), and TcpAgent::slowdown(). |
|
|
Definition at line 512 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::recv_newack_helper(), and TcpAgent::reset(). |
|
|
Reimplemented in IntTcpAgent. Definition at line 370 of file tcp.h. Referenced by TcpAgent::closecwnd(), CorresHost::closecwnd(), TcpAgent::opencwnd(), RFC793eduTcpAgent::opencwnd(), CorresHost::opencwnd(), and TcpAgent::slowdown(). |
|
|
|
|
Definition at line 453 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::increase_param(). |
|
|
Definition at line 149 of file tcp-full-bay.h. Referenced by BayFullTcpAgent(), and connect(). |
|
|
Reimplemented in FECModel, FloodAgent, and LandmarkAgent. Definition at line 66 of file object.h. Referenced by REDQueue::command(), RedPDQueue::command(), PushbackQueue::command(), NsObject::debug(), NsObject::delay_bind_dispatch(), PushbackQueue::enque(), NsObject::isdebug(), NsObject::NsObject(), TfrcAgent::recv(), PushbackQueue::reportDrop(), SctpAgent::Reset(), REDQueue::reset(), DropTail::shrink_queue(), and Delayer::try_send(). |
|
|
Definition at line 301 of file tcp.h. Referenced by TcpAgent::closecwnd(), TcpAgent::delay_bind_dispatch(), and TcpAgent::slowdown(). |
|
|
Definition at line 124 of file agent.h. Referenced by Agent::delay_bind_dispatch(), and Agent::initpkt(). |
|
|
Definition at line 154 of file tcp-full-bay.h. Referenced by BayFullTcpAgent(), recv(), and timeout(). |
|
|
Definition at line 201 of file tcp-full-bay.h. |
|
|
Definition at line 318 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), VegasTcpAgent::recv(), RFC793eduTcpAgent::recv(), and TcpAgent::set_initial_window(). |
|
|
Definition at line 273 of file tcp.h. Referenced by TcpAgent::cancel_timers(), TcpSessionAgent::cancel_timers(), TcpFsAgent::cancel_timers(), TcpAgent::send_much(), Sack1TcpAgent::send_much(), SackRHTcpAgent::send_much(), IntTcpAgent::send_much(), FullTcpAgent::send_much(), send_much(), and FackTcpAgent::send_much(). |
|
|
Definition at line 59 of file connector.h. Referenced by XCPWrapQ::command(), Connector::command(), Connector::drop(), ErrorModel::recv(), and Connector::setDropTarget(). |
|
|
Reimplemented in AckRecons. Definition at line 118 of file agent.h. Referenced by Agent::addAgentTrace(), Agent::daddr(), Agent::delay_bind_dispatch(), Agent::deleteAgentTrace(), Agent::dport(), DSRProto::DSRProto(), Agent::flushAVar(), Agent::initpkt(), SRMAgent::recv(), SSMSRMAgent::recv(), NatAgent::recv(), SRMAgent::sendmsg(), PushbackAgent::sendMsg(), and Agent::trace(). |
|
|
Definition at line 153 of file tcp-full-bay.h. Referenced by BayFullTcpAgent(), and recv(). |
|
|
|
Definition at line 152 of file tcp-full-bay.h. Referenced by BayFullTcpAgent(), and recv(). |
|
|
|
Definition at line 427 of file tcp.h. Referenced by TcpAgent::ecn(), TcpAgent::newack(), RFC793eduTcpAgent::newack(), FullTcpAgent::newack(), TcpAgent::recv_newack_helper(), and RFC793eduTcpAgent::recv_newack_helper(). |
|
|
Definition at line 425 of file tcp.h. Referenced by TcpAgent::recv_newack_helper(), and RFC793eduTcpAgent::recv_newack_helper(). |
|
|
Definition at line 429 of file tcp.h. Referenced by FullTcpAgent::foutput(), TcpAgent::newack(), RFC793eduTcpAgent::newack(), FullTcpAgent::newack(), TcpAgent::recv_newack_helper(), RFC793eduTcpAgent::recv_newack_helper(), and FullTcpAgent::sendpacket(). |
|
|
Definition at line 436 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(). |
|
|
Definition at line 438 of file tcp.h. Referenced by TcpAgent::tcp_eln(). |
|
|
Definition at line 437 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::tcp_eln(). |
|
|
Definition at line 499 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::process_qoption_after_send(), and TcpAgent::reset(). |
|
|
Definition at line 148 of file agent.h. Referenced by TcpAgent::command(), and TcpAgent::trace_event(). |
|
|
Definition at line 331 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(). |
|
|
Definition at line 507 of file tcp.h. Referenced by TcpAgent::process_qoption_after_ack(), and TcpAgent::reset_qoption(). |
|
|
Definition at line 510 of file tcp.h. Referenced by TcpAgent::reset_qoption(). |
|
|
Definition at line 383 of file tcp.h. Referenced by TcpAgent::closecwnd(), CorresHost::closecwnd(), TcpAgent::opencwnd(), RFC793eduTcpAgent::opencwnd(), and TcpAgent::slowdown(). |
|
|
Definition at line 121 of file agent.h. Referenced by Agent::delay_bind_dispatch(), AbsTcpAgent::flowid(), Agent::initpkt(), CtrMcastEncap::recv(), Sack1TcpAgent::timeout(), and TcpAgent::trace_event(). |
|
|
Definition at line 196 of file tcp-full-bay.h. |
|
|
Definition at line 381 of file tcp.h. Referenced by TcpAgent::reset(), and TcpAgent::slowdown(). |
|
|
Definition at line 374 of file tcp.h. Referenced by NewRenoTcpAgent::recv(), TcpAgent::send_much(), and VegasTcpAgent::vegastime(). |
|
|
Reimplemented from Agent. Definition at line 180 of file tcp-full-bay.h. Referenced by need_send(), output(), recv(), reinit(), reset(), and timeout(). |
|
|
Definition at line 484 of file tcp.h. Referenced by TcpAgent::recv_frto_helper(), TcpAgent::recv_newack_helper(), TcpAgent::spurious_timeout(), TcpAgent::timeout(), Sack1TcpAgent::timeout(), TcpAgent::window(), and RenoTcpAgent::window(). |
|
|
Definition at line 322 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::timeout(). |
|
|
|
Definition at line 446 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::reset(). |
|
|
Definition at line 445 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::reset(). |
|
|
Definition at line 444 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::reset(). |
|
|
|
Definition at line 454 of file tcp.h. Referenced by TcpAgent::decrease_param(), TcpAgent::increase_param(), and TcpAgent::reset(). |
|
|
Definition at line 302 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::opencwnd(). |
|
|
Definition at line 151 of file tcp-full-bay.h. Referenced by advance(), BayFullTcpAgent(), connect(), output(), recv(), reinit(), reset(), and send_much(). |
|
|
Definition at line 347 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::opencwnd(). |
|
|
Definition at line 348 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::slowdown(). |
|
|
|
Definition at line 187 of file tcp-full-bay.h. Referenced by need_send(), output(), reinit(), and reset(). |
|
|
|
Definition at line 375 of file tcp.h. Referenced by TcpAgent::recv(), Sack1TcpAgent::recv(), RenoTcpAgent::recv(), NewRenoTcpAgent::recv(), and TcpAgent::reset(). |
|
|
Definition at line 329 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and NewRenoTcpAgent::dupack_action(). |
|
|
Definition at line 415 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and Sack1TcpAgent::dupack_action(). |
|
|
Definition at line 443 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::increase_param(), TcpAgent::reset(), and TcpAgent::slowdown(). |
|
|
Definition at line 448 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::opencwnd(), and TcpAgent::reset(). |
|
|
|
Definition at line 309 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), XcpAgent::opencwnd(), TcpAgent::opencwnd(), RFC793eduTcpAgent::opencwnd(), FackTcpAgent::opencwnd(), CorresHost::opencwnd(), and TcpSessionAgent::window(). |
|
|
Definition at line 313 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::rtt_timeout(). |
|
|
Definition at line 179 of file tcp-full-bay.h. Referenced by advance(), BayFullTcpAgent(), need_send(), output(), recv(), and send_much(). |
|
|
|
Definition at line 314 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::rtt_timeout(). |
|
|
Definition at line 393 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), VegasTcpAgent::recv(), SackRHTcpAgent::recv(), RFC793eduTcpAgent::recv(), TcpAgent::reset(), FullTcpAgent::sendpacket(), sendpacket(), and TcpAgent::TcpAgent(). |
|
|
Definition at line 389 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::trace(). |
|
|
Definition at line 402 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::reset(), TcpAgent::slowdown(), and TcpAgent::TcpAgent(). |
|
|
Definition at line 400 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::reset(), TcpAgent::slowdown(), and TcpAgent::TcpAgent(). |
|
|
Definition at line 392 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), IntTcpAgent::output(), TcpAgent::reset(), FullTcpAgent::sendpacket(), sendpacket(), and TcpAgent::TcpAgent(). |
|
|
Definition at line 391 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), IntTcpAgent::output(), TcpAgent::reset(), FullTcpAgent::sendpacket(), sendpacket(), and TcpAgent::TcpAgent(). |
|
|
Definition at line 398 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::ecn(), TcpAgent::reset(), and TcpAgent::TcpAgent(). |
|
|
Definition at line 148 of file tcp-full-bay.h. Referenced by BayFullTcpAgent(), and output(). |
|
|
Definition at line 416 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(). |
|
|
Definition at line 394 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::reset(), TcpAgent::TcpAgent(), TcpAgent::timeout(), VegasTcpAgent::timeout(), SackRHTcpAgent::timeout(), FullTcpAgent::timeout(), and timeout(). |
|
|
Definition at line 397 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), IntTcpAgent::output(), TcpAgent::reset(), FullTcpAgent::sendpacket(), sendpacket(), and TcpAgent::TcpAgent(). |
|
|
Definition at line 396 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), IntTcpAgent::output(), TcpAgent::reset(), FullTcpAgent::sendpacket(), sendpacket(), and TcpAgent::TcpAgent(). |
|
|
Definition at line 310 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), RenoTcpAgent::dupack_action(), NewRenoTcpAgent::dupack_action(), TcpAgent::numdupacks(), TcpAgent::process_qoption_after_ack(), VegasTcpAgent::recv(), SackRHTcpAgent::recv(), and FackTcpAgent::recv(). |
|
|
Definition at line 311 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::numdupacks(). |
|
|
Definition at line 340 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::recv_newack_helper(), and RFC793eduTcpAgent::recv_newack_helper(). |
|
|
Definition at line 417 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and Sack1TcpAgent::dupack_action(). |
|
|
Definition at line 135 of file agent.h. Referenced by Agent::insertOldValue(), Agent::lookupOldValue(), and Agent::~Agent(). |
|
|
Definition at line 291 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::send_much(), Sack1TcpAgent::send_much(), SackRHTcpAgent::send_much(), IntTcpAgent::send_much(), FullTcpAgent::send_much(), send_much(), and FackTcpAgent::send_much(). |
|
|
Definition at line 485 of file tcp.h. Referenced by TcpAgent::spurious_timeout(), and TcpAgent::timeout(). |
|
|
|
|
|
Definition at line 349 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::slowdown(). |
|
|
Definition at line 514 of file tcp.h. Referenced by NewRenoTcpAgent::dupack_action(), TcpAgent::network_limited(), TcpAgent::newack(), TcpAgent::reset(), and TcpAgent::spurious_timeout(). |
|
|
Definition at line 122 of file agent.h. Referenced by Agent::delay_bind_dispatch(), and Agent::initpkt(). |
|
|
Definition at line 498 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::recv_newack_helper(), TcpAgent::reset(), TcpAgent::send_much(), Sack1TcpAgent::send_much(), and TcpAgent::send_one(). |
|
|
Reimplemented in QSNewRenoTcpAgent. Definition at line 461 of file tcp.h. Referenced by TcpAgent::endQuickStart(), TcpAgent::output(), TcpAgent::processQuickStart(), TcpAgent::recv(), Sack1TcpAgent::recv(), RenoTcpAgent::recv(), NewRenoTcpAgent::recv(), TcpAgent::send_much(), Sack1TcpAgent::send_much(), and TcpAgent::timeout(). |
|
|
Definition at line 464 of file tcp.h. Referenced by TcpAgent::endQuickStart(), TcpAgent::initial_window(), and TcpAgent::processQuickStart(). |
|
|
Definition at line 459 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::output(). |
|
|
Definition at line 467 of file tcp.h. Referenced by TcpAgent::output(). |
|
|
Definition at line 460 of file tcp.h. Referenced by TcpAgent::output(), TcpAgent::processQuickStart(), TcpAgent::recv(), Sack1TcpAgent::recv(), RenoTcpAgent::recv(), and NewRenoTcpAgent::recv(). |
|
|
Definition at line 475 of file tcp.h. Referenced by TcpAgent::output(). |
|
|
Definition at line 472 of file tcp.h. Referenced by TcpAgent::output(). |
|
|
Definition at line 462 of file tcp.h. Referenced by TcpAgent::endQuickStart(), TcpAgent::lossQuickStart(), and TcpAgent::recv_newack_helper(). |
|
|
Reimplemented in QSNewRenoTcpAgent. Definition at line 458 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::output(). |
|
|
Definition at line 182 of file tcp-full-bay.h. Referenced by need_send(), output(), recv(), reinit(), and reset(). |
|
|
|
Definition at line 197 of file tcp-full-bay.h. Referenced by fast_retransmit(), recv(), reinit(), and timeout(). |
|
|
Definition at line 410 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), FullTcpAgent::reset_rtx_timer(), TcpSessionAgent::send_much(), TcpAgent::timeout(), and FackTcpAgent::timeout(). |
|
|
Definition at line 287 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::rtt_timeout(). |
|
|
Definition at line 183 of file tcp-full-bay.h. Referenced by recv(), reinit(), and ~BayFullTcpAgent(). |
|
|
|
Definition at line 504 of file tcp.h. Referenced by TcpAgent::process_qoption_after_ack(), TcpAgent::reset_qoption(), and TcpAgent::rtt_counting(). |
|
|
Definition at line 506 of file tcp.h. Referenced by TcpAgent::reset_qoption(), and TcpAgent::rtt_counting(). |
|
|
Definition at line 505 of file tcp.h. Referenced by TcpAgent::reset_qoption(), and TcpAgent::rtt_counting(). |
|
|
|
Definition at line 373 of file tcp.h. Referenced by FullTcpAgent::foutput(), TcpAgent::newack(), TcpSessionAgent::newack(), SackRHTcpAgent::newack(), RFC793eduTcpAgent::newack(), FullTcpAgent::newack(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), and QSNewRenoTcpAgent::output(). |
|
|
Definition at line 211 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), XcpAgent::rtt_update(), TcpAgent::rtt_update(), and RFC793eduTcpAgent::rtt_update(). |
|
|
Definition at line 212 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::rtt_init(). |
|
|
Reimplemented in TcpSessionAgent. Definition at line 272 of file tcp.h. Referenced by cancel_rtx_timeout(), TcpAgent::cancel_rtx_timer(), TcpFsAgent::cancel_rtx_timer(), TcpAgent::cancel_timers(), TcpFsAgent::cancel_timers(), FullTcpAgent::foutput(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), output(), recv(), TcpAgent::set_rtx_timer(), and TcpFsAgent::set_rtx_timer(). |
|
|
Definition at line 214 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), RFC793eduTcpAgent::reset(), and TcpAgent::rtt_init(). |
|
|
Definition at line 147 of file tcp-full-bay.h. Referenced by BayFullTcpAgent(), and need_send(). |
|
|
Definition at line 430 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), FullTcpAgent::foutput(), and TcpAgent::output(). |
|
|
Definition at line 323 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::timeout(). |
|
|
Definition at line 414 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and Sack1TcpAgent::dupack_action(). |
|
|
|
Definition at line 408 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), FullTcpAgent::foutput(), TcpSessionAgent::send_much(), TcpAgent::timeout(), VegasTcpAgent::timeout(), TcpSessionAgent::timeout(), SackRHTcpAgent::timeout(), FackTcpAgent::timeout(), and TcpFsAgent::timeout_nonrtx(). |
|
|
Definition at line 324 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::spurious_timeout(). |
|
|
Definition at line 209 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::rtt_init(). |
|
|
|
Definition at line 181 of file tcp-full-bay.h. Referenced by advance(), connect(), listen(), outflags(), output(), recv(), state(), timeout(), and usrclosed(). |
|
|
Definition at line 195 of file tcp-full-bay.h. Referenced by need_send(), recv(), reinit(), and reset(). |
|
|
Definition at line 317 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), TcpAgent::set_initial_window(), and FullTcpAgent::set_initial_window(). |
|
|
|
|
|
|
Definition at line 501 of file tcp.h. Referenced by TcpAgent::process_qoption_after_send(), TcpAgent::reset(), and TcpAgent::rtt_counting(). |
|
|
Definition at line 502 of file tcp.h. Referenced by TcpAgent::process_qoption_after_send(), and TcpAgent::reset(). |
|
|
|
|
Definition at line 210 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::rtt_init(), XcpAgent::rtt_update(), TcpAgent::rtt_update(), and RFC793eduTcpAgent::rtt_update(). |
|
|
Definition at line 213 of file tcp.h. Referenced by FullTcpAgent::idle_restart(), TcpAgent::process_qoption_after_send(), TcpAgent::rtt_init(), TcpAgent::rtt_timeout(), XcpAgent::rtt_update(), TcpAgent::rtt_update(), RFC793eduTcpAgent::rtt_update(), and TcpSessionAgent::send_much(). |
|
|
|
|
|
Definition at line 503 of file tcp.h. Referenced by TcpAgent::reset_qoption(). |
|
|
|
Definition at line 465 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::lossQuickStart(). |
|
|
|
Definition at line 303 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::headersize(), FullTcpAgent::headersize(), XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), SimpleTcpAgent::recv(), SimpleTcpAgent::sendmsg(), and FullTcpAgent::sendpacket(). |
|
|
Definition at line 150 of file tcp-full-bay.h. Referenced by BayFullTcpAgent(), and recv(). |
|
|
Definition at line 285 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::newack(). |
|
|
Definition at line 388 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::trace(). |
|
|
Definition at line 134 of file agent.h. Referenced by Agent::addAgentTrace(), Agent::command(), Agent::deleteAgentTrace(), Agent::flushAVar(), Agent::monitorAgentTrace(), and Agent::trace(). |
|
|
Definition at line 223 of file tcp.h. Referenced by NewRenoTcpAgent::dupack_action(), and TcpAgent::newack(). |
|
|
|
Reimplemented in FullTcpAgent. Definition at line 224 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), and TcpAgent::headersize(). |
|
|
Definition at line 222 of file tcp.h. Referenced by XcpAgent::output(), TcpAgent::output(), RFC793eduTcpAgent::output(), QSNewRenoTcpAgent::output(), IntTcpAgent::output(), RFC793eduTcpAgent::recv(), FackTcpAgent::recv(), and SimpleTcpAgent::sendmsg(). |
|
|
Definition at line 304 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::newack(), and FullTcpAgent::newack(). |
|
|
Definition at line 225 of file tcp.h. Referenced by NewRenoTcpAgent::dupack_action(), TcpAgent::output(), and TcpAgent::~TcpAgent(). |
|
|
Definition at line 226 of file tcp.h. Referenced by NewRenoTcpAgent::dupack_action(), and TcpAgent::output(). |
|
|
Reimplemented in QSNewRenoTcpAgent. Definition at line 479 of file tcp.h. Referenced by TcpAgent::output(), and TcpAgent::processQuickStart(). |
|
|
Definition at line 120 of file agent.h. Referenced by Agent::get_pkttype(), Agent::initpkt(), FullTcpAgent::listen(), listen(), RapAgent::SendAck(), SRMAgent::sendmsg(), RapAgent::SendPacket(), Agent::set_pkttype(), and XcpAgent::XcpAgent(). |
|
|
Definition at line 131 of file agent.h. Referenced by imepAgent::handlerControlTimer(), Agent::initpkt(), imepAgent::sendAck(), imepAgent::sendBeacon(), toraAgent::sendCLR(), imepAgent::sendHello(), toraAgent::sendQRY(), and toraAgent::sendUPD(). |
|
|
Definition at line 418 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::output(), and QSNewRenoTcpAgent::output(). |
|
|
Definition at line 509 of file tcp.h. Referenced by TcpAgent::process_qoption_after_ack(), and TcpAgent::reset_qoption(). |
|
|
Definition at line 508 of file tcp.h. Referenced by TcpAgent::process_qoption_after_send(), TcpAgent::reset(), TcpAgent::rtt_counting(), and TcpAgent::slowdown(). |
|
|
|
Definition at line 293 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::opencwnd(), and RFC793eduTcpAgent::opencwnd(). |
|
|
Definition at line 295 of file tcp.h. Referenced by TcpAgent::closecwnd(), command(), TcpAgent::delay_bind_dispatch(), TcpAgent::initial_window(), reinit(), TcpAgent::reset(), and TcpAgent::slowdown(). |
|
|
Definition at line 299 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::initial_window(), TcpAgent::timeout(), and SackRHTcpAgent::timeout(). |
|
|
Definition at line 298 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(), TcpAgent::opencwnd(), RFC793eduTcpAgent::opencwnd(), CorresHost::opencwnd(), TcpAgent::reset(), and TcpAgent::slowdown(). |
|
|
Definition at line 296 of file tcp.h. Referenced by TcpAgent::closecwnd(), TcpAgent::reset(), and TcpAgent::slowdown(). |
|
|
Definition at line 294 of file tcp.h. Referenced by TcpAgent::delay_bind_dispatch(). |
1.4.6