⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test-suite-tcp.tcl

📁 ns-2的文件包。多多下载
💻 TCL
📖 第 1 页 / 共 3 页
字号:
	$self run1 $tcp0 3.0}Class Test/quiescentB_qoption -superclass TestSuiteTest/quiescentB_qoption instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       quiescentB_qoption	set guide_      \	"Tahoe TCP entering a quiescent period, TCP quiescence option set."	Agent/TCP set QOption_ 1        $self next} Test/quiescentB_qoption instproc run {} {	global quiet        $self instvar ns_ node_ guide_	if {$quiet == "false"} {puts $guide_}	$self set_lossylink	Agent/TCP set packetSize_ 100 	Agent/TCP set window_ 25	set tcp0 [$ns_ create-connection TCP $node_(s1) TCPSink $node_(k1) 1]	$self drop_pkts {2}	$self run1 $tcp0 3.0}TestSuite instproc run2 { tcp0 {stoptime 3.0}} {         $self instvar ns_ node_ testName_ 	set count 25	set count1 10	set count2 3	set count3 100    	set data0 [$tcp0 attach-app Telnet]	$data0 set interval_ 0.0005	$ns_ at 0 "$data0 start"	$ns_ at 0.045 "$data0 set interval_ 0.01"	$ns_ at 2.2 "$data0 set interval_ 0.0005" 	$ns_ at 2.5 "$data0 stop"	$self traceQueues $node_(r1) [$self openTrace $stoptime $testName_]	$ns_ run}Class Test/underutilized_100ms -superclass TestSuiteTest/underutilized_100ms instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       underutilized_100ms	set guide_      \	"Tahoe TCP, underutilized, TCP quiescence option not set."	Agent/TCP set QOption_ 0        $self next} Test/underutilized_100ms instproc run {{sender TCP} {receiver TCPSink}} {	global quiet        $self instvar ns_ node_ guide_	if {$quiet == "false"} {puts $guide_}	Agent/TCP set packetSize_ 100 	Agent/TCP set window_ 100	set tcp0 [$ns_ create-connection $sender $node_(s1) $receiver $node_(k1) 0]	$self run2 $tcp0}Class Test/underutilized_100ms_control -superclass TestSuiteTest/underutilized_100ms_control instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       underutilized_100ms_control	set guide_      \	"Tahoe TCP, underutilized, TCP quiescence option not set,	control_increase set."        Agent/TCP set QOption_ 0        Agent/TCP set control_increase_ 1        Test/underutilized_100ms_control instproc run {{sender TCP} {receiver TCPSink}} [Test/underutilized_100ms info instbody run ]        $self next}Class Test/underutilized_100ms_control_Q -superclass TestSuiteTest/underutilized_100ms_control_Q instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       underutilized_100ms_control_Q	set guide_      \	"Tahoe TCP, underutilized, TCP quiescence option set,	control_increase set."        Agent/TCP set QOption_ 1        Agent/TCP set control_increase_ 1        Test/underutilized_100ms_control_Q instproc run {{sender TCP} {receiver TCPSink}} [Test/underutilized_100ms info instbody run ]        $self next}Class Test/underutilized_100ms_Q -superclass TestSuiteTest/underutilized_100ms_Q instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       underutilized_100ms_Q	set guide_      \	"Tahoe TCP, underutilized, TCP quiescence option set,	control_increase not set."        Agent/TCP set QOption_ 1        Agent/TCP set control_increase_ 0        Test/underutilized_100ms_Q instproc run {{sender TCP} {receiver TCPSink}} [Test/underutilized_100ms info instbody run ]        $self next}Class Test/underutilized_100ms_control_Reno -superclass TestSuiteTest/underutilized_100ms_control_Reno instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       underutilized_100ms_control_Reno        set guide_      \        "Reno TCP, underutilized, TCP quiescence option not set,        control_increase set."        Agent/TCP set QOption_ 0        Agent/TCP set control_increase_ 1        Test/underutilized_100ms_control_Reno instproc run {{sender TCP/Reno} {receiver TCPSink}} [Test/underutilized_100ms info instbody run ]        $self next}Class Test/underutilized_100ms_control_Newreno -superclass TestSuiteTest/underutilized_100ms_control_Newreno instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       underutilized_100ms_control_Newreno        set guide_      \        "NewReno TCP, underutilized, TCP quiescence option not set,        control_increase set."        Agent/TCP set QOption_ 0        Agent/TCP set control_increase_ 1        Test/underutilized_100ms_control_Newreno instproc run {{sender TCP/Reno} {receiver TCPSink}} [Test/underutilized_100ms info instbody run ]        $self next}Class Test/underutilized_100ms_control_Sack -superclass TestSuiteTest/underutilized_100ms_control_Sack instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       underutilized_100ms_control_Sack        set guide_      \        "Sack TCP, underutilized, TCP quiescence option not set,        control_increase set."        Agent/TCP set QOption_ 0        Agent/TCP set control_increase_ 1        Test/underutilized_100ms_control_Sack instproc run {{sender TCP/Sack1} {receiver TCPSink/Sack1}} [Test/underutilized_100ms info instbody run ]        $self next}Class Test/quiescent_100ms_fine -superclass TestSuiteTest/quiescent_100ms_fine instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       quiescent_100ms_fine(EnblRTTCtr__0)	set guide_      \	"Tahoe TCP after a quiescent period, fine-grained timer."	Agent/TCP set QOption_ 1	Agent/TCP set control_increase_ 1	Agent/TCP set EnblRTTCtr_ 0	Test/quiescent_100ms_fine instproc run {} [Test/quiescent_100ms info instbody run ]        $self next} Class Test/quiescent_100ms_coarse -superclass TestSuiteTest/quiescent_100ms_coarse instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       quiescent_100ms_coarse(EnblRTTCtr__1)	set guide_      \	"Tahoe TCP after a quiescent period, coarse-grained timer."	Agent/TCP set QOption_ 1	Agent/TCP set control_increase_ 1	Agent/TCP set EnblRTTCtr_ 1	Test/quiescent_100ms_coarse instproc run {} [Test/quiescent_100ms info instbody run ]        $self next} Class Test/quiescent_1ms_fine -superclass TestSuiteTest/quiescent_1ms_fine instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       quiescent_1ms_fine(EnblRTTCtr__0)	set guide_      \	"Tahoe TCP after a quiescent period, fine-grained timer, tcpTick_ 0.001."	Agent/TCP set QOption_ 1	Agent/TCP set tcpTick_ 0.001 	Agent/TCP set control_increase_ 1	Agent/TCP set EnblRTTCtr_ 0 	Test/quiescent_1ms_fine instproc run {} [Test/quiescent_100ms info instbody run ]        $self next} Class Test/quiescent_1ms_coarse -superclass TestSuiteTest/quiescent_1ms_coarse instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       quiescent_1ms_coarse(EnblRTTCtr__1)	set guide_      \	"Tahoe TCP after a quiescent period, coarse-grained timer, tcpTick_ 0.001."	Agent/TCP set QOption_ 1	Agent/TCP set tcpTick_ 0.001 	Agent/TCP set control_increase_ 1	Agent/TCP set EnblRTTCtr_ 1 	Test/quiescent_1ms_coarse instproc run {} [Test/quiescent_100ms info instbody run ]        $self next} Class Test/quiescent_500ms_fine -superclass TestSuiteTest/quiescent_500ms_fine instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       quiescent_500ms_fine(EnblRTTCtr__0)	set guide_      \	"Tahoe TCP after a quiescent period, fine-grained timer, tcpTick_ 0.5."	Agent/TCP set QOption_ 1	Agent/TCP set tcpTick_ 0.500	Agent/TCP set control_increase_ 1	Agent/TCP set EnblRTTCtr_ 0 	Test/quiescent_500ms_fine instproc run {} [Test/quiescent_100ms info instbody run ]        $self next} Class Test/quiescent_500ms_coarse -superclass TestSuiteTest/quiescent_500ms_coarse instproc init topo {        $self instvar net_ defNet_ test_ guide_        set net_        $topo        set defNet_     net6        set test_       quiescent_500ms_coarse(EnblRTTCtr__1)	set guide_      \	"Tahoe TCP after a quiescent period, coarse-grained timer, tcpTick_ 0.5."	Agent/TCP set QOption_ 1	Agent/TCP set tcpTick_ 0.500 	Agent/TCP set control_increase_ 1	Agent/TCP set EnblRTTCtr_ 1 	Test/quiescent_500ms_coarse instproc run {} [Test/quiescent_100ms info instbody run ]        $self next} ####################################################################TestSuite instproc printtimeouts { label tcp time } {	global quiet	if {$quiet == "false"} {	  puts "tcp: $label time: $time retransmit_timeouts: [$tcp set nrexmit_]" 	}}# This test shows the packets and acknowledgements at the source,# for a path with a 9.6Kbps link, and 1500-byte packets.Class Test/dialup -superclass TestSuiteTest/dialup instproc init topo {        $self instvar net_ defNet_ test_ 	set net_        $topo	set defNet_    	net8        set test_       dialup(9.6K-link,1500-byte-pkt)        $self next}Test/dialup instproc run {} {	global quiet        $self instvar ns_ node_ testName_        Agent/TCP set syn_ true        Agent/TCP set delay_growth_ true        Agent/TCP set windowInitOption_ 2        Agent/TCP set minrto_ 1 	set runtime 30.01	set dumptime 30.0	set testName_ dialup	set tcp1 [$ns_ create-connection TCP/Sack1 $node_(s1) TCPSink/Sack1 $node_(k1) 0]        $tcp1 set packetSize_ 1500        set ftp1 [$tcp1 attach-app FTP]         $ns_ at 0.0 "$ftp1 start"	$ns_ at $dumptime "$self printtimeouts 1 $tcp1 $dumptime"         # $self tcpDump $tcp1 $dumptime	$self traceQueues $node_(r1) [$self openTrace $runtime $testName_]        $ns_ run}# This test shows the packets and acknowledgements at the source,# for a path with a 9.6Kbps link, and 1500-byte packets.# But this one has rfc2988_ set to false.Class Test/dialup1 -superclass TestSuiteTest/dialup1 instproc init topo {        $self instvar net_ defNet_ test_ 	set net_        $topo	set defNet_    	net8        set test_       dialup1(9.6K-link,1500-byte-pkt)	Agent/TCP set rfc2988_ false	Test/dialup1 instproc run {} [Test/dialup info instbody run ]        $self next}TestSuite runTest### Local Variables:### mode: tcl### tcl-indent-level: 8### tcl-default-application: ns### End:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -