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

📄 test-suite-friendly.tcl

📁 这个软件的功能是实现多播协议
💻 TCL
📖 第 1 页 / 共 3 页
字号:
    Agent/TFRC set ca_ 1    Test/slowStartFixed instproc run {} [Test/slowStart info instbody run ]    $self next}Class Test/ecn -superclass TestSuiteTest/ecn instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	ecn    Agent/TFRC set ecn_ 1    Queue/RED set setbit_ true    Test/ecn instproc run {} [Test/slowStart info instbody run ]    $self next}Class Test/slowStartTcp -superclass TestSuiteTest/slowStartTcp instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	slowStartTcp    $self next}Test/slowStartTcp instproc run {} {    global quiet    $self instvar ns_ node_ testName_ interval_ dumpfile_    $self setTopo    set interval_ 0.1    set stopTime 40.0    set stopTime0 [expr $stopTime - 0.001]    set stopTime2 [expr $stopTime + 0.001]    set dumpfile_ [open temp.s w]    if {$quiet == "false"} {        set tracefile [open all.tr w]        $ns_ trace-all $tracefile    }    set tcp1 [$ns_ create-connection TCP/Sack1 $node_(s1) TCPSink/Sack1 $node_(s3) 0]    set ftp1 [$tcp1 attach-app FTP]    $ns_ at 0.0 "$ftp1 start"    $ns_ at 30 "$ftp1 stop"    set tcp2 [$ns_ create-connection TCP/Sack1 $node_(s1) TCPSink/Sack1 $node_(s3) 1]    set ftp2 [$tcp2 attach-app FTP]    $ns_ at 16 "$ftp2 start"    $ns_ at $stopTime "$ftp2 stop"    $self tfccDump 1 $tcp1 $interval_ $dumpfile_    $self tfccDump 2 $tcp2 $interval_ $dumpfile_    $ns_ at $stopTime0 "close $dumpfile_; $self finish_1 $testName_"    #$self traceQueues $node_(r1) [$self openTrace $stopTime $testName_]    $ns_ at $stopTime "$self cleanupAll $testName_"     if {$quiet == "false"} {	$ns_ at $stopTime2 "close $tracefile"    }    $ns_ at $stopTime2 "exec cp temp2.rands temp.rands; exit 0"    # trace only the bottleneck link    $ns_ run}Class Test/impulseDiscount -superclass TestSuiteTest/impulseDiscount instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	impulseDiscount    Agent/TFRCSink set discount_ 1    Test/impulseDiscount instproc run {} [Test/impulseCA info instbody run ]    $self next}Class Test/impulseDiscountCA -superclass TestSuiteTest/impulseDiscountCA instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	impulseDiscountCA    Agent/TFRCSink set discount_ 1    Agent/TFRC set df_ 0.95    Agent/TFRC set ca_ 1    Test/impulseDiscountCA instproc run {} [Test/impulseCA info instbody run ]    $self next}Class Test/impulse -superclass TestSuiteTest/impulse instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	impulse    Agent/TFRCSink set discount_ 0    Test/impulse instproc run {} [Test/impulseCA info instbody run ]    $self next}Class Test/impulseCA -superclass TestSuiteTest/impulseCA instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	impulseCA    Agent/TFRCSink set discount_ 0    Agent/TFRC set df_ 0.95    Agent/TFRC set ca_ 1#    Test/impulseCA instproc run {} [Test/impulseCA info instbody run ]    $self next}Test/impulseCA instproc run {} {    global quiet    $self instvar ns_ node_ testName_ interval_ dumpfile_    $self setTopo    set interval_ 0.1    set stopTime 40.0    set stopTime0 [expr $stopTime - 0.001]    set stopTime2 [expr $stopTime + 0.001]    set dumpfile_ [open temp.s w]    if {$quiet == "false"} {        set tracefile [open all.tr w]        $ns_ trace-all $tracefile    }    set tf1 [$ns_ create-connection TFRC $node_(s1) TFRCSink $node_(s3) 0]    $ns_ at 0.0 "$tf1 start"    $ns_ at $stopTime "$tf1 stop"    set tf2 [$ns_ create-connection TFRC $node_(s2) TFRCSink $node_(s4) 1]    $ns_ at 10.0 "$tf2 start"    $ns_ at 20.0 "$tf2 stop"    $self tfccDump 1 $tf1 $interval_ $dumpfile_    $self tfccDump 2 $tf2 $interval_ $dumpfile_    $ns_ at $stopTime0 "close $dumpfile_; $self finish_1 $testName_"    #$self traceQueues $node_(r1) [$self openTrace $stopTime $testName_]    $ns_ at $stopTime "$self cleanupAll $testName_"     if {$quiet == "false"} {	$ns_ at $stopTime2 "close $tracefile"    }    $ns_ at $stopTime2 "exec cp temp2.rands temp.rands; exit 0"    # trace only the bottleneck link    $ns_ run}# Feedback 4 times per roundtrip time.Class Test/impulseMultReportDiscount -superclass TestSuiteTest/impulseMultReportDiscount instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	impulseMultReportDiscount    Agent/TFRCSink set NumFeedback_ 4    Agent/TFRCSink set discount_ 1    Test/impulseMultReportDiscount instproc run {} [Test/impulseMultReport info instbody run ]    $self next}# Feedback 4 times per roundtrip time.Class Test/impulseMultReportDiscountCA -superclass TestSuiteTest/impulseMultReportDiscountCA instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	impulseMultReportDiscountCA    Agent/TFRCSink set NumFeedback_ 4    Agent/TFRCSink set discount_ 1    Agent/TFRC set df_ 0.95    Agent/TFRC set ca_ 1    Test/impulseMultReportDiscountCA instproc run {} [Test/impulseMultReport info instbody run ]    $self next}Class Test/impulseMultReport -superclass TestSuiteTest/impulseMultReport instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	impulseMultReport    Agent/TFRCSink set NumFeedback_ 4    Agent/TFRCSink set discount_ 0    $self next}Class Test/impulseMultReportCA -superclass TestSuiteTest/impulseMultReportCA instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	impulseMultReportCA    Agent/TFRCSink set NumFeedback_ 4    Agent/TFRCSink set discount_ 0    Agent/TFRC set df_ 0.95    Agent/TFRC set ca_ 1    Test/impulseMultReportCA instproc run {} [Test/impulseMultReport info instbody run ]    $self next}Test/impulseMultReport instproc run {} {    global quiet    $self instvar ns_ node_ testName_ interval_ dumpfile_    $self setTopo    set interval_ 0.1    set stopTime 40.0    set stopTime0 [expr $stopTime - 0.001]    set stopTime2 [expr $stopTime + 0.001]    set dumpfile_ [open temp.s w]    if {$quiet == "false"} {        set tracefile [open all.tr w]        $ns_ trace-all $tracefile    }    set tf1 [$ns_ create-connection TFRC $node_(s1) TFRCSink $node_(s3) 0]    $ns_ at 0.0 "$tf1 start"    set tf2 [$ns_ create-connection TFRC $node_(s2) TFRCSink $node_(s4) 1]    $ns_ at 10.0 "$tf2 start"    $ns_ at 20.0 "$tf2 stop"    $self tfccDump 1 $tf1 $interval_ $dumpfile_    $self tfccDump 2 $tf2 $interval_ $dumpfile_    $ns_ at $stopTime0 "close $dumpfile_; $self finish_1 $testName_"    #$self traceQueues $node_(r1) [$self openTrace $stopTime $testName_]    $ns_ at $stopTime "$self cleanupAll $testName_"     if {$quiet == "false"} {	$ns_ at $stopTime2 "close $tracefile"    }    $ns_ at $stopTime2 "exec cp temp2.rands temp.rands; exit 0"    # trace only the bottleneck link    $ns_ run}Class Test/impulseTcp -superclass TestSuiteTest/impulseTcp instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	impulseTcp    $self next}Test/impulseTcp instproc run {} {    global quiet    $self instvar ns_ node_ testName_ interval_ dumpfile_    $self setTopo    set interval_ 0.1    set stopTime 40.0    set stopTime0 [expr $stopTime - 0.001]    set stopTime2 [expr $stopTime + 0.001]    set dumpfile_ [open temp.s w]    if {$quiet == "false"} {        set tracefile [open all.tr w]        $ns_ trace-all $tracefile    }    set tcp1 [$ns_ create-connection TCP/Sack1 $node_(s1) TCPSink/Sack1 $node_(s3) 0]    set ftp1 [$tcp1 attach-app FTP]    $ns_ at 0.0 "$ftp1 start"    set tcp2 [$ns_ create-connection TCP/Sack1 $node_(s2) TCPSink/Sack1 $node_(s4) 1]    set ftp2 [$tcp2 attach-app FTP]    $ns_ at 10.0 "$ftp2 start"    $ns_ at 20.0 "$ftp2 stop"    $self tfccDump 1 $tcp1 $interval_ $dumpfile_    $self tfccDump 2 $tcp2 $interval_ $dumpfile_    $ns_ at $stopTime0 "close $dumpfile_; $self finish_1 $testName_"    #$self traceQueues $node_(r1) [$self openTrace $stopTime $testName_]    $ns_ at $stopTime "$self cleanupAll $testName_"     if {$quiet == "false"} {	$ns_ at $stopTime2 "close $tracefile"    }    $ns_ at $stopTime2 "exec cp temp2.rands temp.rands; exit 0"    # trace only the bottleneck link    $ns_ run}# Two TFRC connections and three TCP connections.Class Test/two-friendly -superclass TestSuiteTest/two-friendly instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	two-friendly    Agent/TFRCSink set discount_ 0    Agent/TCP set timerfix_ false    # The default is being changed to true.    $self next}# Two TFRC connections and three TCP connections.Class Test/two-friendlyCA -superclass TestSuiteTest/two-friendlyCA instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	two-friendlyCA    Agent/TFRCSink set discount_ 0    Agent/TFRC set df_ 0.95    Agent/TFRC set ca_ 1    Agent/TCP set timerfix_ false    # The default is being changed to true.    Test/two-friendlyCA instproc run {} [Test/two-friendly info instbody run ]    $self next}Test/two-friendly instproc run {} {    global quiet    $self instvar ns_ node_ testName_ interval_ dumpfile_    $self setTopo    set interval_ 0.1    set stopTime 30.0    set stopTime0 [expr $stopTime - 0.001]    set stopTime2 [expr $stopTime + 0.001]    set dumpfile_ [open temp.s w]    if {$quiet == "false"} {        set tracefile [open all.tr w]        $ns_ trace-all $tracefile    }    $self runFriendly     $self runTcps        $ns_ at $stopTime0 "close $dumpfile_; $self finish_1 $testName_"    #$self traceQueues $node_(r1) [$self openTrace $stopTime $testName_]    $ns_ at $stopTime "$self cleanupAll $testName_"     if {$quiet == "false"} {	$ns_ at $stopTime2 "close $tracefile"    }    $ns_ at $stopTime2 "exec cp temp2.rands temp.rands; exit 0"    # trace only the bottleneck link    $ns_ run}# Only TCPClass Test/OnlyTcp -superclass TestSuiteTest/OnlyTcp instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	OnlyTcp    Agent/TCP set timerfix_ false    # The default is being changed to true.    $self next}Test/OnlyTcp instproc run {} {    global quiet    $self instvar ns_ node_ testName_ interval_ dumpfile_    $self setTopo    set interval_ 0.1    set stopTime 30.0    set stopTime0 [expr $stopTime - 0.001]    set stopTime2 [expr $stopTime + 0.001]    set dumpfile_ [open temp.s w]    if {$quiet == "false"} {        set tracefile [open all.tr w]        $ns_ trace-all $tracefile    }    $self runTcp     $self runTcps        $ns_ at $stopTime0 "close $dumpfile_; $self finish_1 $testName_"    #$self traceQueues $node_(r1) [$self openTrace $stopTime $testName_]    $ns_ at $stopTime "$self cleanupAll $testName_"     if {$quiet == "false"} {	$ns_ at $stopTime2 "close $tracefile"    }    $ns_ at $stopTime2 "exec cp temp2.rands temp.rands; exit 0"    # trace only the bottleneck link    $ns_ run}## Random factor added to sending timesClass Test/randomized -superclass TestSuiteTest/randomized instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	randomized    Agent/TFRC set overhead_ 0.5    Test/randomized instproc run {} [Test/slowStart info instbody run]    $self next}## Random factor added to sending timesClass Test/randomizedCA -superclass TestSuiteTest/randomizedCA instproc init {} {    $self instvar net_ test_    set net_	net2    set test_	randomizedCA    Agent/TFRC set overhead_ 0.5    Agent/TFRC set df_ 0.95    Agent/TFRC set ca_ 1    Test/randomizedCA instproc run {} [Test/slowStart info instbody run]    $self next}

⌨️ 快捷键说明

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