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

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

?? tcp-session.cc

?? Ns2 TCP 協議改進 版本 提高goodput
?? CC
?? 第 1 頁 / 共 2 頁
字號:
/* -*-	Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- *//* * Copyright (c) 1997 Regents of the University of California. * All rights reserved. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: * 	This product includes software developed by the Daedalus Research * 	Group at the University of California Berkeley. * 4. Neither the name of the University nor of the Research Group may be *    used to endorse or promote products derived from this software without *    specific prior written permission. *  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $Header: /nfs/jade/vint/CVSROOT/ns-2/tcp/tcp-session.cc,v 1.18 2000/09/01 03:04:07 haoboy Exp $ */#include <stdlib.h>#include <math.h>#include "ip.h"#include "flags.h"#include "random.h"#include "template.h"#include "nilist.h"#include "tcp.h"#include "tcp-int.h"#include "tcp-session.h"/* * We separate TCP functionality into two parts: that having to do with  * providing a reliable, ordered byte-stream service, and that having to do with * congestion control and loss recovery. The former is done on a per-connection * basis and is implemented as part of IntTcpAgent ("integrated TCP"). The  * latter is done in an integrated fashion across multiple TCP connections, and * is implemented as part of TcpSessionAgent ("TCP session"). TcpSessionAgent is * derived from CorresHost ("correspondent host"), which keeps track of the  * state of all TCP (TCP/Int) connections to a host that it is corresponding  * with. * * The motivation for this separation of functionality is to make an ensemble of * connection more well-behaved than a set of independent TCP connections. * The packet loss rate is cut down and the chances of losses being recovered  * via data-driven techniques (rather than via timeouts) is improved. At the  * same time, we do not introduce any unnecessary coupling between the  * logically-independent byte-streams that the set of connections represents.  * This is in contrast to the coupling that is inherent in the multiplexing at  * the application layer of multiple byte-streams onto a single TCP connection. * * For questions/comments, please contact: *   Venkata N. Padmanabhan (padmanab@cs.berkeley.edu) *   http://www.cs.berkeley.edu/~padmanab */static class TcpSessionClass : public TclClass {public:	TcpSessionClass() : TclClass("Agent/TCP/Session") {}	TclObject* create(int, const char*const*) {		return (new TcpSessionAgent()); 	}} class_tcpsession;TcpSessionAgent::TcpSessionAgent() : CorresHost(), 	rtx_timer_(this), burstsnd_timer_(this), sessionSeqno_(0),	last_send_time_(-1), curConn_(0), numConsecSegs_(0), 	schedDisp_(FINE_ROUND_ROBIN), wtSum_(0), dynWtSum_(0) {	bind("ownd_", &ownd_);	bind("owndCorr_", &owndCorrection_);	bind_bool("proxyopt_", &proxyopt_);	bind_bool("fixedIw_", &fixedIw_);	bind("schedDisp_", &schedDisp_);	bind_bool("disableIntLossRecov_", &disableIntLossRecov_);	sessionList_.append(this);}intTcpSessionAgent::command(int argc, const char*const* argv){	if (argc == 2) {		if (!strcmp(argv[1], "resetwt")) {			Islist_iter<IntTcpAgent> conn_iter(conns_);			IntTcpAgent *tcp;			while ((tcp = conn_iter()) != NULL) 				tcp->wt_ = 1;			wtSum_ = conn_iter.count();			return (TCL_OK);		}	}	return (CorresHost::command(argc, argv));}voidSessionRtxTimer::expire(Event*){	a_->timeout(TCP_TIMER_RTX);}voidSessionResetTimer::expire(Event*){	a_->timeout(TCP_TIMER_RESET);}voidSessionBurstSndTimer::expire(Event*){	a_->timeout(TCP_TIMER_BURSTSND);}voidTcpSessionAgent::reset_rtx_timer(int /*mild*/, int backoff){	if (backoff)		rtt_backoff();	set_rtx_timer();	rtt_active_ = 0;}voidTcpSessionAgent::set_rtx_timer(){	if (rtx_timer_.status() == TIMER_PENDING)		rtx_timer_.cancel();	if (reset_timer_.status() == TIMER_PENDING)		reset_timer_.cancel();	if (fs_enable_ && fs_mode_)		reset_timer_.resched(rtt_exact_timeout());	else		rtx_timer_.resched(rtt_timeout());}voidTcpSessionAgent::cancel_rtx_timer(){	rtx_timer_.force_cancel();	reset_timer_.force_cancel();}voidTcpSessionAgent::cancel_timers(){	rtx_timer_.force_cancel();	reset_timer_.force_cancel();	burstsnd_timer_.force_cancel();	delsnd_timer_.force_cancel();}intTcpSessionAgent::fs_pkt() {	return (fs_enable_ && fs_mode_ && sessionSeqno_-1 >= fs_startseq_ &&		sessionSeqno_-1 < fs_endseq_);}voidTcpSessionAgent::rtt_update_exact(double tao){	double g = 1/8; /* gain used for smoothing rtt */	double h = 1/4; /* gain used for smoothing rttvar */	double delta;	if (t_exact_srtt_ != 0) {		delta = tao - t_exact_srtt_;		if (delta < 0)			delta = -delta;		/* update the fine-grained estimate of the smoothed RTT */		if (t_exact_srtt_ != 0) 			t_exact_srtt_ = g*tao + (1-g)*t_exact_srtt_;		else			t_exact_srtt_ = tao;		/* update the fine-grained estimate of mean deviation in RTT */		delta -= t_exact_rttvar_;		t_exact_rttvar_ += h*delta;	}	else {		t_exact_srtt_ = tao;		t_exact_rttvar_ = tao/2;	}}	voidTcpSessionAgent::newack(Packet *pkt) {	double now = Scheduler::instance().clock();	Islist_iter<Segment> seg_iter(seglist_);	hdr_tcp *tcph = hdr_tcp::access(pkt);	hdr_flags *fh = hdr_flags::access(pkt);	if (!fh->no_ts_) {		/* if the timestamp option is being used */		if (ts_option_) {			rtt_update(now - tcph->ts_echo());			rtt_update_exact(now - tcph->ts_echo());		}		/* if segment being timed just got acked */		if (rtt_active_ && rtt_seg_ == NULL) {			t_backoff_ = 1;			rtt_active_ = 0;			if (!ts_option_)				rtt_update(now - rtt_ts_);		}	}	if (seg_iter.count() > 0)		set_rtx_timer();	else		cancel_rtx_timer();}voidTcpSessionAgent::timeout(int tno){	if (tno == TCP_TIMER_BURSTSND)		send_much(NULL,0,0);	else if (tno == TCP_TIMER_RESET) {		Islist_iter<Segment> seg_iter(seglist_);		Segment *curseg;		Islist_iter<IntTcpAgent> conn_iter(conns_);		IntTcpAgent *curconn;		fs_mode_ = 0;		if (seg_iter.count() == 0 && !slow_start_restart_) {			return;		}		recover_ = sessionSeqno_ - 1;		last_cwnd_action_ = CWND_ACTION_TIMEOUT;		ownd_ = 0;		owndCorrection_ = 0;		while ((curconn = conn_iter()) != NULL) {			curconn->maxseq_ = curconn->highest_ack_;			curconn->t_seqno_ = curconn->highest_ack_ + 1;			curconn->recover_ = curconn->maxseq_;			curconn->last_cwnd_action_ = CWND_ACTION_TIMEOUT;		}		while ((curseg = seg_iter()) != NULL) {			/* XXX exclude packets sent "recently"? */			curseg->size_ = 0;		}		/* 		 * If first pkt sent before fast start has not gotten through, 		 * treat this as a regular rtx timeout. Otherwise, close cwnd		 * and reset timer but don't back off timer.		 */		if (connWithPktBeforeFS_) {			connWithPktBeforeFS_ = NULL;			timeout(TCP_TIMER_RTX);		}		else {			slowdown(CLOSE_CWND_INIT);			reset_rtx_timer(0,0);			send_much(NULL, 0, TCP_REASON_TIMEOUT);		}	}	else if (tno == TCP_TIMER_RTX) {		Islist_iter<Segment> seg_iter(seglist_);		Segment *curseg;		Islist_iter<IntTcpAgent> conn_iter(conns_);		IntTcpAgent *curconn;		if (seg_iter.count() == 0 && !slow_start_restart_) {			return;		}		recover_ = sessionSeqno_ - 1;		last_cwnd_action_ = CWND_ACTION_TIMEOUT;		if (seg_iter.count() == 0 && restart_bugfix_) {			slowdown(CLOSE_CWND_INIT);			reset_rtx_timer(0,0);		}		else {			slowdown(CLOSE_CWND_RESTART|CLOSE_SSTHRESH_HALF);			reset_rtx_timer(0,1);		}		nrexmit_++;		ownd_ = 0;		owndCorrection_ = 0;		while ((curconn = conn_iter()) != NULL) {			curconn->t_seqno_ = curconn->highest_ack_ + 1;			curconn->recover_ = curconn->maxseq_;			curconn->last_cwnd_action_ = CWND_ACTION_TIMEOUT;		}		while ((curseg = seg_iter()) != NULL) {			/* XXX exclude packets sent "recently"? */			curseg->size_ = 0;		}		send_much(NULL, 0, TCP_REASON_TIMEOUT);	}	else

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷精品大视频在线蜜桃视频| 国产成人自拍网| 国产偷国产偷精品高清尤物 | 中文字幕的久久| 2020国产精品自拍| 精品成人免费观看| 久久女同互慰一区二区三区| 2019国产精品| 久久影院午夜片一区| 久久九九久久九九| 国产精品福利电影一区二区三区四区| 日本一区二区三区在线不卡| 国产精品久久夜| 亚洲精品成人在线| 日韩不卡在线观看日韩不卡视频| 捆绑变态av一区二区三区| 久久精品国产免费| 懂色av中文一区二区三区| 99久久久免费精品国产一区二区| 色国产精品一区在线观看| 在线播放欧美女士性生活| 日韩欧美在线网站| 国产精品丝袜在线| 亚洲电影一区二区三区| 久久国产欧美日韩精品| 99久久精品国产麻豆演员表| 欧美性色黄大片| 欧美xingq一区二区| 国产精品理论片在线观看| 亚洲综合丁香婷婷六月香| 亚洲成人自拍偷拍| 国产高清一区日本| 欧美男女性生活在线直播观看| 欧美绝品在线观看成人午夜影视| 亚洲精品一线二线三线| 亚洲精品国久久99热| 精品一区二区精品| 色哟哟国产精品免费观看| 亚洲精品一区二区三区在线观看| 最新成人av在线| 久久国产欧美日韩精品| 欧美亚洲国产一区二区三区| 久久久久久久久一| 天堂影院一区二区| 99久久精品国产一区二区三区| 日韩一区国产二区欧美三区| 亚洲图片另类小说| 国产麻豆精品在线观看| 欧美肥妇free| 最近中文字幕一区二区三区| 国产剧情一区二区| 91精品国产欧美日韩| 亚洲激情图片小说视频| 风间由美性色一区二区三区| 日韩一本二本av| 亚洲午夜一二三区视频| 成人免费视频一区| 精品卡一卡二卡三卡四在线| 五月婷婷久久综合| 色综合久久综合网欧美综合网| 久久久久久日产精品| 秋霞影院一区二区| 欧美精品乱人伦久久久久久| 亚洲激情男女视频| 97精品久久久午夜一区二区三区| 久久久久久亚洲综合影院红桃| 九一九一国产精品| 日韩女优制服丝袜电影| 日本亚洲三级在线| 在线成人午夜影院| 日本大胆欧美人术艺术动态| 欧美性色黄大片| 亚洲福利视频三区| 欧美日韩精品欧美日韩精品一综合| 一区二区三区日韩欧美精品| 色呦呦国产精品| 一区二区三区四区国产精品| 欧美午夜理伦三级在线观看| 亚洲线精品一区二区三区八戒| 91视频精品在这里| 亚洲一区二区三区在线| 欧美久久久久久久久中文字幕| 亚洲成人午夜影院| 日韩精品一区二区三区四区视频| 看电视剧不卡顿的网站| 精品久久国产字幕高潮| 韩国成人在线视频| 欧美国产成人在线| 91在线porny国产在线看| 亚洲一区二区在线观看视频| 欧美肥大bbwbbw高潮| 精品一区二区三区在线观看| 国产婷婷色一区二区三区在线| 高潮精品一区videoshd| 国产精品国产三级国产aⅴ原创 | 亚洲国产综合在线| 欧美福利视频一区| 国产原创一区二区| 成人欧美一区二区三区白人| 色婷婷综合五月| 日韩精品一级中文字幕精品视频免费观看 | www.欧美亚洲| 亚洲一区二区三区中文字幕在线| 欧美一区二区三区男人的天堂| 国产一区二三区| 亚洲人成小说网站色在线| 欧美日韩二区三区| 成人高清免费在线播放| 午夜成人免费视频| 国产亚洲综合在线| 色偷偷88欧美精品久久久| 久久99在线观看| 亚洲美女淫视频| 久久久蜜桃精品| 欧美男人的天堂一二区| www.亚洲在线| 久久66热re国产| 亚洲在线成人精品| 国产欧美视频一区二区三区| 欧美日本视频在线| 99热国产精品| 国产精品一区二区三区网站| 亚洲成av人综合在线观看| 国产精品久久久久久久久免费相片| 在线免费视频一区二区| 高清国产一区二区| 国内精品不卡在线| 日本欧美一区二区三区| 亚洲欧美色图小说| 日本一区二区免费在线| 欧美一区2区视频在线观看| 99r国产精品| 高清久久久久久| 国内精品伊人久久久久av影院 | 国内精品写真在线观看| 亚洲国产精品久久一线不卡| 国产精品久久久久久久久免费樱桃 | 中文字幕一区二区日韩精品绯色 | 久久精品久久综合| 亚洲免费观看高清完整版在线| 精品少妇一区二区三区免费观看 | 夜色激情一区二区| 亚洲伦理在线精品| 国产精品免费久久| 国产清纯白嫩初高生在线观看91 | 亚洲超碰精品一区二区| 日韩毛片视频在线看| 国产精品久久久久久久久免费桃花 | 欧美大片在线观看| 91麻豆精品91久久久久同性| 欧美日韩国产免费| 欧美精品一级二级三级| 欧美日韩精品综合在线| 欧美日韩一区二区三区高清 | 成人午夜视频免费看| 国产成人综合亚洲网站| 国产精品 欧美精品| 国产mv日韩mv欧美| 成人午夜免费电影| 91在线视频播放地址| 色女孩综合影院| 欧美日韩视频第一区| 欧美日韩一区国产| 日韩免费观看2025年上映的电影| 日韩欧美一区在线| 欧美精品一区二区在线播放 | 91福利视频久久久久| 欧美视频一区二区在线观看| 欧美乱妇一区二区三区不卡视频| 欧美情侣在线播放| 久久久精品国产99久久精品芒果| 国产欧美视频一区二区| 亚洲美女区一区| 蜜臀av一区二区三区| 国产99精品国产| 欧美调教femdomvk| www国产成人| 亚洲精品免费电影| 久久精品国产久精国产爱| 成人丝袜高跟foot| 欧美日韩国产不卡| 国产午夜精品久久久久久久| 伊人婷婷欧美激情| 精一区二区三区| 91视频你懂的| 精品国产伦一区二区三区观看方式| 中文字幕精品一区二区三区精品| 亚洲国产毛片aaaaa无费看| 精品一区二区三区免费视频| 色综合久久久久久久久久久| 日韩视频在线你懂得| 国产精品电影一区二区| 免费人成在线不卡| 色综合网站在线| 337p日本欧洲亚洲大胆精品| 亚洲国产aⅴ成人精品无吗| 国产乱子伦一区二区三区国色天香| 91国产成人在线| 国产精品视频一二| 久久 天天综合|