test-suite-ecn.tcl

来自「一款用来进行网络模拟的软件」· TCL 代码 · 共 2,109 行 · 第 1/5 页

TCL
2,109
字号
	$self drop_pkts {1 3} 	$errmodel1 set markecn_ true	$ns_ run}######################################################################## Delayed Ack Tahoe Tests ######################################################################### Plain ECNClass Test/ecn_nodrop_tahoe_delack -superclass TestSuiteTest/ecn_nodrop_tahoe_delack instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_nodrop_tahoe_delack        set guide_      "Tahoe with ECN, delayed acks."        $self next pktTraceFile}Test/ecn_nodrop_tahoe_delack instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 1	$self ecnsetup Tahoe 3.0 0 1	$self drop_pkt 10000	$ns_ run}# This one doesn't have two ECNs close together..Class Test/ecn_twoecn_tahoe_delack -superclass TestSuiteTest/ecn_twoecn_tahoe_delack instproc init {} {        $self instvar net_ test_ guide_         Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_twoecn_tahoe_delack        set guide_      "Tahoe, ECN, delayed acks."        $self next pktTraceFile}Test/ecn_twoecn_tahoe_delack instproc run {} {        global quiet	$self instvar ns_ guide_ lossmodel        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 1	$self ecnsetup Tahoe 3.0 0 1 	$self drop_pkt 243	$lossmodel set markecn_ true	$ns_ run}# ECN followed by packet loss?Class Test/ecn_drop_tahoe_delack -superclass TestSuiteTest/ecn_drop_tahoe_delack instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_drop_tahoe_delack        set guide_      "Tahoe, ECN, delayed acks."        $self next pktTraceFile}Test/ecn_drop_tahoe_delack instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 1	$self ecnsetup Tahoe 3.0 0 1	$self drop_pkt 243	$ns_ run}# ECN preceded by packet loss?Class Test/ecn_drop1_tahoe_delack -superclass TestSuiteTest/ecn_drop1_tahoe_delack instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_drop1_tahoe_delack        set guide_      "Tahoe, ECN, delayed acks."        $self next pktTraceFile}Test/ecn_drop1_tahoe_delack instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 1	$self ecnsetup Tahoe 3.0 0 1	$self drop_pkt 241	$ns_ run}# ECN with a window of one packet.Class Test/ecn_smallwinEcn_tahoe_delack -superclass TestSuiteTest/ecn_smallwinEcn_tahoe_delack instproc init {} {        $self instvar net_ test_ guide_         Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true	Agent/TCP set timerfix_ false	# The default is being changed to true.        set test_	ecn_smallwinEcn_tahoe_delack        set guide_      "Tahoe, ECN with a window of one, delayed acks."        $self next pktTraceFile}Test/ecn_smallwinEcn_tahoe_delack instproc run {} {        global quiet	$self instvar ns_ guide_ errmodel1        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 0	$self ecnsetup Tahoe 10.0 1 1	$self drop_pkts {4 8 9 11 12 13 120 135 143 148 150 151 152 153} 	$errmodel1 set markecn_ true	$ns_ run}######################################################################## Reno Tests ######################################################################### Plain ECNClass Test/ecn_nodrop_reno -superclass TestSuiteTest/ecn_nodrop_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_nodrop_reno 	set guide_      "Reno with ECN."          $self next pktTraceFile}Test/ecn_nodrop_reno instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 1	$self ecnsetup Reno 3.0 	$self drop_pkt 10000	$ns_ run}# Two ECNs close togetherClass Test/ecn_twoecn_reno -superclass TestSuiteTest/ecn_twoecn_reno instproc init {} {        $self instvar net_ test_ guide_         Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_twoecn_reno        set guide_      "Reno, two marked packets in one window."        $self next pktTraceFile}Test/ecn_twoecn_reno instproc run {} {        global quiet	$self instvar ns_ guide_ lossmodel        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 1	$self ecnsetup Reno 3.0 	$self drop_pkt 243	$lossmodel set markecn_ true	$ns_ run}# ECN followed by packet loss.Class Test/ecn_drop_reno -superclass TestSuiteTest/ecn_drop_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_drop_reno        set guide_      "Reno, ECN followed by packet loss."        $self next pktTraceFile}Test/ecn_drop_reno instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 1	$self ecnsetup Reno 3.0	$self drop_pkt 243	$ns_ run}# ECN preceded by packet loss.Class Test/ecn_drop1_reno -superclass TestSuiteTest/ecn_drop1_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_drop1_reno        set guide_      "Reno, ECN preceded by packet loss."        $self next pktTraceFile}Test/ecn_drop1_reno instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 1	$self ecnsetup Reno 3.0	$self drop_pkt 241	$ns_ run}# Packet loss only.Class Test/ecn_noecn_reno -superclass TestSuiteTest/ecn_noecn_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true	Queue/RED set thresh_ 1000	Queue/RED set maxthresh_ 1000        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_noecn_reno	Test/ecn_noecn_reno instproc run {} [Test/ecn_drop_reno info instbody run ]        set guide_      "Reno, packet loss only, no ECN."        $self next pktTraceFile}# Multiple dup acks with bugFix_Class Test/ecn_bursty_reno -superclass TestSuiteTest/ecn_bursty_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true	Queue/RED set thresh_ 100	Queue/RED set maxthresh_ 100        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_bursty_reno        set guide_      "Reno, multiple dup acks, with bugFix."        $self next pktTraceFile}Test/ecn_bursty_reno instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	$self ecnsetup Reno 3.0        set lossmodel [$self setloss]        $lossmodel set offset_ 245	$lossmodel set burstlen_ 15        $lossmodel set period_ 10000	$ns_ run}# Multiple dup acks following ECNClass Test/ecn_burstyEcn_reno -superclass TestSuiteTest/ecn_burstyEcn_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_burstyEcn_reno	Test/ecn_burstyEcn_reno instproc run {} [Test/ecn_bursty_reno info instbody run ]           set guide_      "Reno, multiple dup acks and ECN, with bugFix."        $self next pktTraceFile}# Multiple dup acks without bugFix_Class Test/ecn_noBugfix_reno -superclass TestSuiteTest/ecn_noBugfix_reno instproc init {} {        $self instvar net_ test_ guide_	Queue/RED set thresh_ 100 	Queue/RED set maxthresh_ 100        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ false        set test_	ecn_noBugfix_reno	Test/ecn_noBugfix_reno instproc run {} [Test/ecn_bursty_reno info instbody run ]        set guide_      "Reno, multiple dup acks, no bugFix."        $self next pktTraceFile}# ECN followed by timeout?.# Nope.Class Test/ecn_timeout_reno -superclass TestSuiteTest/ecn_timeout_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_timeout_reno        set guide_      "Reno, drops followed by a timeout, no ECN."        $self next pktTraceFile}Test/ecn_timeout_reno instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	$self ecnsetup Reno 3.0 1	$self drop_pkts {242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268} 	$ns_ run}# ECN followed by a timeout, followed by an ECN representing a# new instance of congestion.Class Test/ecn_timeout1_reno -superclass TestSuiteTest/ecn_timeout1_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_timeout1_reno        set guide_      "Reno, drops and ECN followed by a timeout."        $self next pktTraceFile}Test/ecn_timeout1_reno instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 1	$self ecnsetup Reno 3.0 1	$self drop_pkts {245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265} 	$self second_tcp Tahoe 1.0	$ns_ run}# Packet drops with a window of one packet.Class Test/ecn_smallwin_reno -superclass TestSuiteTest/ecn_smallwin_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true	Agent/TCP set bugFix_ true        set net_	net2-lossy        set test_	ecn_smallwin_reno        set guide_      "Reno, packet drops with a window of one."        $self next pktTraceFile}Test/ecn_smallwin_reno instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 0	$self ecnsetup Reno 6.0 1	$self drop_pkts {4 8 9 10 11 100 115 118 119 121 122}	$ns_ run}# ECN with a window of one packet.Class Test/ecn_smallwinEcn_reno -superclass TestSuiteTest/ecn_smallwinEcn_reno instproc init {} {        $self instvar net_ test_ guide_         Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_smallwinEcn_reno        set guide_      "Reno, ECN with a window of one."        $self next pktTraceFile}Test/ecn_smallwinEcn_reno instproc run {} {        global quiet	$self instvar ns_ guide_ errmodel1        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 0	$self ecnsetup Reno 10.0 1	$self drop_pkts {4 8 9 11 12 13 120 135 143 148 150 151 152 153} 	$errmodel1 set markecn_ true	$ns_ run}Class Test/ecn_smallwin1Ecn_reno -superclass TestSuiteTest/ecn_smallwin1Ecn_reno instproc init {} {        $self instvar net_ test_ guide_         Queue/RED set setbit_ true        set net_	net3-lossy	Agent/TCP set bugFix_ true        set test_	ecn_smallwin1Ecn_reno        set guide_      "Reno, ECN with small windows."        $self next pktTraceFile}Test/ecn_smallwin1Ecn_reno instproc run {} {        global quiet	$self instvar ns_ guide_ errmodel1 errmodel2        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 0	$self ecnsetup Reno 10.0 1	$self drop_pkts {4 8 9 11 12 13 120 135 143 148 150 153} 	$errmodel1 set markecn_ true	$self drop_pkts2 {6}	$errmodel2 set markecn_ false	$ns_ run}# Packet drops for the second packet.Class Test/ecn_secondpkt_reno -superclass TestSuiteTest/ecn_secondpkt_reno instproc init {} {        $self instvar net_ test_ guide_        Queue/RED set setbit_ true	Agent/TCP set bugFix_ true        set net_	net2-lossy        set test_	ecn_secondpkt_reno        set guide_      "Reno, with the second packet dropped."        $self next pktTraceFile}Test/ecn_secondpkt_reno instproc run {} {        global quiet	$self instvar ns_ guide_        puts "Guide: $guide_"	Agent/TCP set old_ecn_ 0	$self ecnsetup Reno 2.0 1	$self drop_pkts {1 3} 	$ns_ run}# ECN for the second packet.Class Test/ecn_secondpktEcn_reno -superclass TestSuiteTest/ecn_secondpktEcn_reno instproc init {} {        $self instvar net_ test_ guide_         Queue/RED set setbit_ true        set net_	net2-lossy	Agent/TCP set bugFix_ true        set test_	ecn_secondpktEcn_reno        set guide_      "Reno, with the second packet marked."        $self next pktTraceFile}Test/ecn_secondpktEcn_reno instproc run {} {

⌨️ 快捷键说明

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