亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tcp.cc

?? ns-2 simulation code manet
?? CC
?? 第 1 頁 / 共 5 頁
字號:
		ctemp_ = int(wnd_init_);	else if (how & CLOSE_CWND_ONE)		ctemp_ = 1;	else if (how & CLOSE_CWND_HALF_WAY) {		// cwnd_ = win - (win - W_used)/2 ;		ctemp_ = W_used + decrease_num_ * (win - W_used);                if (ctemp_ < 1)                        ctemp_ = 1;	}	// ktnahm recover	if ( ctemp_ < 1 )   // ktnahm: min. cwnd_ is set to 1 now		ctemp_ = 1;	cwnd_ = ctemp_;	if (ssthresh_ < 2 && increase_num_ >= 1.0) // ktnahm mod		ssthresh_ = 2;	if (ssthresh_ < 0)		ssthresh_ = 0;   // ktnahm add	if (how & (CLOSE_CWND_HALF|CLOSE_CWND_RESTART|CLOSE_CWND_INIT|CLOSE_CWND_ONE))		cong_action_ = TRUE;	fcnt_ = count_ = 0;	if (first_decrease_ == 1)		first_decrease_ = 0;	// for event tracing slow start	//	if (cwnd_ == 1 || slowstart)	if ( (cwnd_ == 1 && increase_num_ >= 1.0) || slowstart ) // ktnahm		// Not sure if this is best way to capture slow_start		// This is probably tracing a superset of slowdowns of		// which all may not be slow_start's --Padma, 07/'01.		trace_event("SLOW_START");	}/* * Process a packet that acks previously unacknowleged data. */void TcpAgent::newack(Packet* pkt){	double now = Scheduler::instance().clock();	hdr_tcp *tcph = hdr_tcp::access(pkt);	/* 	 * Wouldn't it be better to set the timer *after*	 * updating the RTT, instead of *before*? 	 */	if (!timerfix_) newtimer(pkt);	dupacks_ = 0;	last_ack_ = tcph->seqno();	prev_highest_ack_ = highest_ack_ ;	highest_ack_ = last_ack_;	if (t_seqno_ < last_ack_ + 1)		t_seqno_ = last_ack_ + 1;	/* 	 * Update RTT only if it's OK to do so from info in the flags header.	 * This is needed for protocols in which intermediate agents	 * in the network intersperse acks (e.g., ack-reconstructors) for	 * various reasons (without violating e2e semantics).	 */		hdr_flags *fh = hdr_flags::access(pkt);	if (!fh->no_ts_) {		if (ts_option_) {			ts_echo_=tcph->ts_echo();			rtt_update(now - tcph->ts_echo());			if (ts_resetRTO_ && (!ect_ || !ecn_backoff_ ||			    !hdr_flags::access(pkt)->ecnecho())) { 				// From Andrei Gurtov				/* 				 * Don't end backoff if still in ECN-Echo with			 	 * a congestion window of 1 packet. 				 */				t_backoff_ = 1;				ecn_backoff_ = 0;			}		}		if (rtt_active_ && tcph->seqno() >= rtt_seq_) {			if (!ect_ || !ecn_backoff_ || 				!hdr_flags::access(pkt)->ecnecho()) {				/* 				 * Don't end backoff if still in ECN-Echo with			 	 * a congestion window of 1 packet. 				 */				t_backoff_ = 1;				ecn_backoff_ = 0;			}			rtt_active_ = 0;			if (!ts_option_)				rtt_update(now - rtt_ts_);		}	}	if (timerfix_) newtimer(pkt);	/* update average window */	awnd_ *= 1.0 - wnd_th_;	awnd_ += wnd_th_ * cwnd_;}/* * Respond either to a source quench or to a congestion indication bit. * This is done at most once a roundtrip time;  after a source quench, * another one will not be done until the last packet transmitted before * the previous source quench has been ACKed. * * Note that this procedure is called before "highest_ack_" is * updated to reflect the current ACK packet.   */void TcpAgent::ecn(int seqno){	if (seqno > recover_ || 	      last_cwnd_action_ == CWND_ACTION_TIMEOUT) {		recover_ =  maxseq_;		last_cwnd_action_ = CWND_ACTION_ECN;		// if (cwnd_ <= 1.0) {		if (cwnd_ <= 1.0 && increase_num_ >= 1.0) { // ktnahm change for FeW			if (ecn_backoff_) 				rtt_backoff();			else ecn_backoff_ = 1;		} else ecn_backoff_ = 0;		slowdown(CLOSE_CWND_HALF|CLOSE_SSTHRESH_HALF);		++necnresponses_ ;		// added by sylvia to count number of ecn responses 	}}/* *  Is the connection limited by the network (instead of by a lack *    of data from the application? */int TcpAgent::network_limited() {	int win = window () ;	if (t_seqno_ > (prev_highest_ack_ + win))		return 1;	else		return 0;}void TcpAgent::recv_newack_helper(Packet *pkt) {	//hdr_tcp *tcph = hdr_tcp::access(pkt);	newack(pkt);        if (qs_window_ && highest_ack_ >= qs_window_) {                // All segments in the QS window have been acknowledged.                // We can exit the Quick-Start phase.                qs_window_ = 0;        }	if (!ect_ || !hdr_flags::access(pkt)->ecnecho() ||		(old_ecn_ && ecn_burst_)) {		/* If "old_ecn", this is not the first ACK carrying ECN-Echo		 * after a period of ACKs without ECN-Echo.		 * Therefore, open the congestion window. */		/* if control option is set, and the sender is not			 window limited, then do not increase the window size */				if (!control_increase_ || 		   (control_increase_ && (network_limited() == 1))) 	      		opencwnd();	}	if (ect_) {		if (!hdr_flags::access(pkt)->ecnecho())			ecn_backoff_ = 0;		if (!ecn_burst_ && hdr_flags::access(pkt)->ecnecho())			ecn_burst_ = TRUE;		else if (ecn_burst_ && ! hdr_flags::access(pkt)->ecnecho())			ecn_burst_ = FALSE;	}	if (!ect_ && hdr_flags::access(pkt)->ecnecho() &&		!hdr_flags::access(pkt)->cong_action())		ect_ = 1;	/* if the connection is done, call finish() */	if ((highest_ack_ >= curseq_-1) && !closed_) {		closed_ = 1;		finish();	}	if (QOption_ && curseq_ == highest_ack_ +1) {		cancel_rtx_timer();	}	if (frto_ == 1) {		/*		 * New ack after RTO. If F-RTO is enabled, try to transmit new		 * previously unsent segments.		 * If there are no new data or receiver window limits the		 * transmission, revert to traditional recovery.		 */		if (recover_ + 1 >= highest_ack_ + wnd_ ||		    recover_ + 1 >= curseq_) {			frto_ = 0; 		} else if (highest_ack_ == recover_) { 			/* 			 * F-RTO step 2a) RTO retransmission fixes whole			 * window => cancel F-RTO 			 */ 			frto_ = 0;		} else {			t_seqno_ = recover_ + 1;			frto_ = 2;		}	} else if (frto_ == 2) {		/*		 * Second new ack after RTO. If F-RTO is enabled, RTO can be		 * declared spurious		 */		spurious_timeout();	}}/* * Set the initial window.  */doubleTcpAgent::initial_window(){        // If Quick-Start Request was approved, use that as a basis for        // initial window        if (qs_cwnd_) {                return (qs_cwnd_);        }	//	// init_option = 1: static iw of wnd_init_	//	if (wnd_init_option_ == 1) {		return (wnd_init_);	}        else if (wnd_init_option_ == 2) {		// do iw according to Internet draft 		if (size_ <= 1095) {			return (4.0);	 	} else if (size_ < 2190) {			return (3.0);		} else {			return (2.0);		}	}	// XXX what should we return here???	fprintf(stderr, "Wrong number of wnd_init_option_ %d\n", 		wnd_init_option_);	abort();	return (2.0); // XXX make msvc happy.}/* * Dupack-action: what to do on a DUP ACK.  After the initial check * of 'recover' below, this function implements the following truth * table: * *	bugfix	ecn	last-cwnd == ecn	action * *	0	0	0			tahoe_action *	0	0	1			tahoe_action	[impossible] *	0	1	0			tahoe_action *	0	1	1			slow-start, return *	1	0	0			nothing *	1	0	1			nothing		[impossible] *	1	1	0			nothing *	1	1	1			slow-start, return *//*  * A first or second duplicate acknowledgement has arrived, and * singledup_ is enabled. * If the receiver's advertised window permits, and we are exceeding our * congestion window by less than numdupacks_, then send a new packet. */voidTcpAgent::send_one(){	if (t_seqno_ <= highest_ack_ + wnd_ && t_seqno_ < curseq_ &&		t_seqno_ <= highest_ack_ + cwnd_ + dupacks_ ) {		output(t_seqno_, 0);		if (QOption_)			process_qoption_after_send () ;		t_seqno_ ++ ;		// send_helper(); ??	}	return;}voidTcpAgent::dupack_action(){	int recovered = (highest_ack_ > recover_);	if (recovered || (!bug_fix_ && !ecn_)) {		goto tahoe_action;	}	if (ecn_ && last_cwnd_action_ == CWND_ACTION_ECN) {		last_cwnd_action_ = CWND_ACTION_DUPACK;		slowdown(CLOSE_CWND_ONE);		reset_rtx_timer(0,0);		return;	}	if (bug_fix_) {		/*		 * The line below, for "bug_fix_" true, avoids		 * problems with multiple fast retransmits in one		 * window of data. 		 */		return;	}tahoe_action:        recover_ = maxseq_;        if (!lossQuickStart()) {		// we are now going to fast-retransmit and willtrace that event		trace_event("FAST_RETX");		last_cwnd_action_ = CWND_ACTION_DUPACK;		slowdown(CLOSE_SSTHRESH_HALF|CLOSE_CWND_ONE);	}	reset_rtx_timer(0,0);	return;}/* * When exiting QuickStart, reduce the congestion window to the *   size that was actually used. */void TcpAgent::endQuickStart(){	qs_approved_ = 0;        qs_cwnd_ = 0;        qs_window_ = maxseq_;	int new_cwnd = maxseq_ - last_ack_;	if (new_cwnd > 1 && new_cwnd < cwnd_) {	 	cwnd_ = new_cwnd;		if (cwnd_ < initial_window()) 			cwnd_ = initial_window();	}}void TcpAgent::processQuickStart(Packet *pkt){	// QuickStart code from Srikanth Sundarrajan.	hdr_tcp *tcph = hdr_tcp::access(pkt);	hdr_qs *qsh = hdr_qs::access(pkt);	double now = Scheduler::instance().clock();	int app_rate;        // printf("flag: %d ttl: %d ttl_diff: %d rate: %d\n", qsh->flag(),	//     qsh->ttl(), ttl_diff_, qsh->rate());	qs_requested_ = 0;	qs_approved_ = 0;	if (qsh->flag() == QS_RESPONSE && qsh->ttl() == ttl_diff_ &&             qsh->rate() > 0) {                app_rate = (int) (hdr_qs::rate_to_Bps(qsh->rate()) *                      (now - tcph->ts_echo()) / (size_ + headersize()));#ifdef QS_DEBUG		printf("Quick Start approved, rate %d, window %d\n", 				     qsh->rate(), app_rate);#endif                if (app_rate > initial_window()) {			qs_cwnd_ = app_rate;                        qs_approved_ = 1;                }        } else { // Quick Start rejected#ifdef QS_DEBUG                printf("Quick Start rejected\n");#endif        }}/* * ACK has been received, hook from recv() */void TcpAgent::recv_frto_helper(Packet *pkt){	hdr_tcp *tcph = hdr_tcp::access(pkt);	if (tcph->seqno() == last_ack_ && frto_ != 0) {		/*		 * Duplicate ACK while in F-RTO indicates that the		 * timeout was valid. Go to slow start retransmissions.		 */		t_seqno_ = highest_ack_ + 1;		cwnd_ = frto_;		frto_ = 0;		// Must zero dupacks (in order to trigger send_much at recv)		// dupacks is increased in recv after exiting this function		dupacks_ = -1;	}}/* * A spurious timeout has been detected. Do appropriate actions. */void TcpAgent::spurious_timeout(){	frto_ = 0;	switch (spurious_response_) {	case 1:	default:		/*		 * Full revert of congestion window		 * (FlightSize before last acknowledgment)		 */		cwnd_ = t_seqno_ - prev_highest_ack_;		break; 	case 2:		/*		 * cwnd = reduced ssthresh (approx. half of the earlier pipe)		 */		cwnd_ = ssthresh_; break;	case 3:		/*		 * slow start, but without retransmissions		 */		cwnd_ = 1; break;	}	/*	 * Revert ssthresh to size before retransmission timeout	 */	ssthresh_ = pipe_prev_;	/* If timeout was spurious, bugfix is not needed */	recover_ = highest_ack_ - 1;}/*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡av免费在线观看| 99精品一区二区三区| 亚洲啪啪综合av一区二区三区| 欧美日韩成人一区二区| 成人永久aaa| 日韩国产欧美在线视频| 中文字幕一区不卡| 欧美成人官网二区| 欧洲精品一区二区| 福利一区福利二区| 久久精品av麻豆的观看方式| 一区二区三区四区在线免费观看 | 欧美国产日韩亚洲一区| 91精品国产综合久久久久久久| eeuss鲁片一区二区三区| 国精产品一区一区三区mba视频 | 久久综合久久综合九色| 欧美精品 日韩| 色狠狠桃花综合| eeuss鲁一区二区三区| 国产精品88av| 国产毛片精品一区| 久久国产精品露脸对白| 性做久久久久久久免费看| 亚洲精品久久久久久国产精华液| 中文字幕高清一区| 欧美韩国日本综合| 中文字幕高清不卡| 久久精子c满五个校花| 精品99一区二区三区| 欧美一级生活片| 777久久久精品| 91麻豆精品91久久久久同性| 欧美三级视频在线观看| 91国产精品成人| 91蝌蚪porny九色| 粉嫩一区二区三区性色av| 国产最新精品免费| 精品在线视频一区| 国产一区二区三区四区五区美女| 日韩精品乱码av一区二区| 五月激情六月综合| 亚洲小说春色综合另类电影| 亚洲精品综合在线| 亚洲日本护士毛茸茸| 91丨porny丨户外露出| caoporn国产精品| 成人在线一区二区三区| 99视频国产精品| 成人福利视频网站| 一本色道久久综合亚洲aⅴ蜜桃 | 亚洲a一区二区| 亚洲一区av在线| 亚洲伦在线观看| 亚洲理论在线观看| 亚洲综合色在线| 一区二区三区在线观看视频 | 国产.精品.日韩.另类.中文.在线.播放| 日韩av中文字幕一区二区| 午夜精品视频一区| 日韩黄色免费网站| 国产夫妻精品视频| 高清久久久久久| 色94色欧美sute亚洲13| 在线视频综合导航| 欧美一级夜夜爽| 久久久美女毛片| 亚洲女同ⅹxx女同tv| 亚洲伊人色欲综合网| 日韩激情一区二区| 久久69国产一区二区蜜臀| 波多野结衣一区二区三区| 91丨九色丨国产丨porny| 在线观看国产91| 欧美一区二区三区免费| 成人app在线观看| 欧美精品1区2区3区| 91精品国产综合久久国产大片| 久久久精品国产免费观看同学| 精品国产精品一区二区夜夜嗨| 日本一区二区三区高清不卡| 国产精品无遮挡| 视频一区二区三区中文字幕| 另类专区欧美蜜桃臀第一页| 色综合久久中文综合久久97| 欧美无砖专区一中文字| 久久久国产综合精品女国产盗摄| 国产精品福利一区| 美女视频黄 久久| 成人av资源在线观看| 91麻豆精品国产91久久久使用方法| 精品99999| 午夜视频在线观看一区| 国产一区在线不卡| 欧美日本高清视频在线观看| 精品国产乱码久久久久久1区2区 | 精品国产乱码久久久久久蜜臀| 日本一区二区视频在线| 亚洲h在线观看| 国产精品一卡二卡在线观看| 色哟哟一区二区| 精品福利av导航| 亚洲欧美色综合| 久久99国产精品久久99| 欧美在线free| 久久精品亚洲精品国产欧美kt∨ | 99国产欧美久久久精品| 中文字幕一区二区三区在线观看| 亚洲成人免费影院| 色噜噜狠狠成人网p站| 日韩美一区二区三区| 亚洲国产精品视频| 粗大黑人巨茎大战欧美成人| 精品日产卡一卡二卡麻豆| 亚洲欧美一区二区三区国产精品| 国产一区二区三区av电影| 欧美亚洲国产bt| 亚洲精品菠萝久久久久久久| 国产麻豆日韩欧美久久| 欧美电视剧免费全集观看| 亚洲国产一区二区三区| 99精品视频在线观看| 日韩天堂在线观看| 国产精品国产三级国产| 日本欧美一区二区在线观看| 成人自拍视频在线| 国产人久久人人人人爽| 亚洲无人区一区| 在线亚洲人成电影网站色www| 欧美激情综合五月色丁香| 久久电影网站中文字幕 | 国产亚洲美州欧州综合国| 久久一日本道色综合| 精品一区二区三区欧美| 欧美天堂亚洲电影院在线播放| 亚洲精选在线视频| 成人黄色电影在线| 中文字幕在线不卡| 99久久99久久精品免费观看 | 日韩电影免费在线看| 91福利社在线观看| 亚洲国产综合91精品麻豆| av不卡免费在线观看| 亚洲欧美日韩国产另类专区| 成人高清在线视频| 亚洲柠檬福利资源导航| 99热精品国产| 香蕉乱码成人久久天堂爱免费| 色av一区二区| 肉色丝袜一区二区| 欧美猛男超大videosgay| 日韩av在线免费观看不卡| 538prom精品视频线放| 蜜臀av一区二区在线免费观看| 欧美久久久久久久久中文字幕| 蜜臀va亚洲va欧美va天堂| 日韩欧美www| 国产1区2区3区精品美女| 国产精品视频你懂的| 色婷婷av一区二区三区软件| 最近日韩中文字幕| 精品视频在线免费| 日韩国产欧美一区二区三区| 国产亚洲婷婷免费| 久久不见久久见免费视频1| 国产欧美日韩麻豆91| 另类小说图片综合网| 国产免费成人在线视频| 国产九色精品成人porny| 国产精品麻豆一区二区| 欧美特级限制片免费在线观看| 亚洲一卡二卡三卡四卡无卡久久 | 亚洲国产精品一区二区久久| 欧美三级中文字| 国产永久精品大片wwwapp | 欧美中文字幕一二三区视频| 美女一区二区视频| 欧美mv日韩mv亚洲| 97se亚洲国产综合自在线| 亚洲va在线va天堂| 精品1区2区在线观看| 99精品欧美一区二区三区综合在线| 一区二区三国产精华液| 精品国产乱码久久久久久久| www..com久久爱| 偷拍一区二区三区| 久久久久久久久99精品| 欧美亚洲图片小说| 国产永久精品大片wwwapp| 一区二区三区不卡视频在线观看| 91精品国产综合久久久久| www.亚洲精品| 一区二区三区日韩欧美| 久久久久97国产精华液好用吗| 欧美日韩一级片在线观看| 国产精品自在欧美一区| 日韩电影在线一区二区| 国产精品传媒在线| 日韩精品一区二区三区中文不卡| 97久久精品人人做人人爽|