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

📄 test-suite-sctp.tcl

📁 ns-2的文件包。多多下载
💻 TCL
📖 第 1 页 / 共 5 页
字号:
    set n0 [$ns node]    set n1 [$ns node]    $ns duplex-link $n0 $n1 .5Mb 300ms DropTail    $ns duplex-link-op $n0 $n1 orient right    $ns queue-limit $n0 $n1 10000        set err [new ErrorModel/List]    $err droplist {16 35}    $ns lossmodel $err $n0 $n1        set sctp0 [new Agent/SCTP]    $ns attach-agent $n0 $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468     $sctp0 set numOutStreams_ 1        if {$quiet == 0} {	$sctp0 set debugMask_ -1 	$sctp0 set debugFileIndex_ 0	set trace_ch [open trace.sctp w]	$sctp0 set trace_all_ 1	$sctp0 trace cwnd_	$sctp0 trace rto_	$sctp0 trace errorCount_	$sctp0 attach $trace_ch    }       set sctp1 [new Agent/SCTP]    $ns attach-agent $n1 $sctp1    $sctp1 set mtu_ 1500    $sctp1 set initialRwnd_ 131072    $sctp1 set useDelayedSacks_ 0        if {$quiet == 0} {	$sctp1 set debugMask_ -1 	$sctp1 set debugFileIndex_ 1    }       $ns connect $sctp0 $sctp1        set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0}Test/sctp-multipleRtx instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 10.0 "$self finish"    $ns run}Test/sctp-multipleRtx-early instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName multipleRtx-early    $self next    set n0 [$ns node]    set n1 [$ns node]    $ns duplex-link $n0 $n1 .5Mb 300ms DropTail    $ns duplex-link-op $n0 $n1 orient right    $ns queue-limit $n0 $n1 10000        set err [new ErrorModel/List]    $err droplist {4 11}    $ns lossmodel $err $n0 $n1        set sctp0 [new Agent/SCTP]    $ns attach-agent $n0 $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468    $sctp0 set numOutStreams_ 1        if {$quiet == 0} {	$sctp0 set debugMask_ -1 	$sctp0 set debugFileIndex_ 0	set trace_ch [open trace.sctp w]	$sctp0 set trace_all_ 1	$sctp0 trace cwnd_	$sctp0 trace rto_	$sctp0 trace errorCount_	$sctp0 attach $trace_ch    }    set sctp1 [new Agent/SCTP]    $ns attach-agent $n1 $sctp1    $sctp1 set mtu_ 1500    $sctp1 set initialRwnd_ 131072    $sctp1 set useDelayedSacks_ 0       if {$quiet == 0} {	$sctp1 set debugMask_ -1 	$sctp1 set debugFileIndex_ 1    }       $ns connect $sctp0 $sctp1        set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0}Test/sctp-multipleRtx-early instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 10.0 "$self finish"    $ns run}Test/sctp-noEarlyHBs instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName noEarlyHBs    $self next    set n0 [$ns node]    set n1 [$ns node]    $ns duplex-link $n0 $n1 .5Mb 200ms DropTail    $ns duplex-link-op $n0 $n1 orient right        set sctp0 [new Agent/SCTP]    $ns attach-agent $n0 $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468    $sctp0 set numOutStreams_ 1       if {$quiet == 0} {	$sctp0 set debugMask_ -1 	$sctp0 set debugFileIndex_ 0	set trace_ch [open trace.sctp w]	$sctp0 set trace_all_ 1	$sctp0 trace cwnd_	$sctp0 trace rto_	$sctp0 trace errorCount_	$sctp0 attach $trace_ch    }        set sctp1 [new Agent/SCTP]    $ns attach-agent $n1 $sctp1    $sctp1 set mtu_ 1500    $sctp1 set initialRwnd_ 131072    $sctp1 set useDelayedSacks_ 0       if {$quiet == 0} {	$sctp1 set debugMask_ -1 	$sctp1 set debugFileIndex_ 1    }        $ns connect $sctp0 $sctp1        set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0}Test/sctp-noEarlyHBs instproc run {} {    $self instvar ns ftp0    $ns at 50.0 "$ftp0 start"    $ns at 55.0 "$self finish"    $ns run}Test/sctp-smallRwnd instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName smallRwnd    $self next    set n0 [$ns node]    set n1 [$ns node]    $ns duplex-link $n0 $n1 .5Mb 300ms DropTail    $ns duplex-link-op $n0 $n1 orient right    $ns queue-limit $n0 $n1 10000        set err [new ErrorModel/List]        set sctp0 [new Agent/SCTP]    $ns attach-agent $n0 $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 724    $sctp0 set numOutStreams_ 1       if {$quiet == 0} {	$sctp0 set debugMask_ -1 	$sctp0 set debugFileIndex_ 0	set trace_ch [open trace.sctp w]	$sctp0 set trace_all_ 1	$sctp0 trace cwnd_	$sctp0 trace rto_	$sctp0 trace errorCount_	$sctp0 attach $trace_ch    }        set sctp1 [new Agent/SCTP]    $ns attach-agent $n1 $sctp1    $sctp1 set mtu_ 1500    $sctp1 set initialRwnd_ 4096    $sctp1 set useDelayedSacks_ 0       if {$quiet == 0} {	$sctp1 set debugMask_ -1 	$sctp1 set debugFileIndex_ 1    }        $ns connect $sctp0 $sctp1        set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0}Test/sctp-smallRwnd instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 10.0 "$self finish"    $ns run}Test/sctp-zeroRtx instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName zeroRtx     $self next    set n0 [$ns node]    set n1 [$ns node]    $ns duplex-link $n0 $n1 .5Mb 200ms DropTail    $ns duplex-link-op $n0 $n1 orient right        set err [new ErrorModel/List]    $err droplist {30}            $ns lossmodel $err $n0 $n1        set sctp0 [new Agent/SCTP]    $ns attach-agent $n0 $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468    $sctp0 set numOutStreams_ 1    $sctp0 set numUnrelStreams_ 1       if {$quiet == 0} {	$sctp0 set debugMask_ -1 	$sctp0 set debugFileIndex_ 0	set trace_ch [open trace.sctp w]	$sctp0 set trace_all_ 1	$sctp0 trace cwnd_	$sctp0 trace rto_	$sctp0 trace errorCount_	$sctp0 attach $trace_ch    }    set sctp1 [new Agent/SCTP]    $ns attach-agent $n1 $sctp1    $sctp1 set mtu_ 1500    $sctp1 set initialRwnd_ 131072    $sctp1 set useDelayedSacks_ 1       if {$quiet == 0} {	$sctp1 set debugMask_ -1 	$sctp1 set debugFileIndex_ 1    }        $ns connect $sctp0 $sctp1        set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0}Test/sctp-zeroRtx instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 6.0 "$self finish"    $ns run}Test/sctp-zeroRtx-burstLoss instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName zeroRtx-burstLoss    $self next    set n0 [$ns node]    set n1 [$ns node]    $ns duplex-link $n0 $n1 .5Mb 200ms DropTail    $ns duplex-link-op $n0 $n1 orient right        set err [new ErrorModel/List]    $err droplist {16 17 18 19 20}    $ns lossmodel $err $n0 $n1    set sctp0 [new Agent/SCTP]    $ns attach-agent $n0 $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468    $sctp0 set numOutStreams_ 1    $sctp0 set numUnrelStreams_ 1       if {$quiet == 0} {	$sctp0 set debugMask_ -1 	$sctp0 set debugFileIndex_ 0	set trace_ch [open trace.sctp w]	$sctp0 set trace_all_ 1	$sctp0 trace cwnd_	$sctp0 trace rto_	$sctp0 trace errorCount_	$sctp0 attach $trace_ch    }        set sctp1 [new Agent/SCTP]    $ns attach-agent $n1 $sctp1    $sctp1 set mtu_ 1500    $sctp1 set initialRwnd_ 131072    $sctp1 set useDelayedSacks_ 0       if {$quiet == 0} {	$sctp1 set debugMask_ -1 	$sctp1 set debugFileIndex_ 1    }        $ns connect $sctp0 $sctp1        set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0}Test/sctp-zeroRtx-burstLoss instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 5.0 "$self finish"    $ns run}Test/sctp-hbAfterRto-2packetsTimeout instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName hbAfterRto-2packetsTimeout    $self next    set n0 [$ns node]    set n1 [$ns node]    $ns duplex-link $n0 $n1 .5Mb 200ms DropTail    $ns duplex-link-op $n0 $n1 orient right    set err [new ErrorModel/List]    $err droplist {14 15 31 32}    $ns lossmodel $err $n0 $n1    set sctp0 [new Agent/SCTP/HbAfterRto]    $ns attach-agent $n0 $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468    $sctp0 set numOutStreams_ 1       if {$quiet == 0} {	$sctp0 set debugMask_ -1 	$sctp0 set debugFileIndex_ 0	set trace_ch [open trace.sctp w]	$sctp0 set trace_all_ 1	$sctp0 trace cwnd_	$sctp0 trace rto_	$sctp0 trace errorCount_	$sctp0 attach $trace_ch    }        set sctp1 [new Agent/SCTP/HbAfterRto]    $ns attach-agent $n1 $sctp1    $sctp1 set mtu_ 1500    $sctp1 set initialRwnd_ 131072    $sctp1 set useDelayedSacks_ 0       if {$quiet == 0} {	$sctp1 set debugMask_ -1 	$sctp1 set debugFileIndex_ 1    }        $ns connect $sctp0 $sctp1        set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0}Test/sctp-hbAfterRto-2packetsTimeout instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 4.5 "$ftp0 stop"    $ns at 10.0 "$self finish"    $ns run}Test/sctp-hbAfterRto-multihome2-2Timeout instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName hbAfterRto-multihome2-2Timeout    $self next    set host0_core [$ns node]    set host0_if0 [$ns node]    set host0_if1 [$ns node]    $host0_core color Red    $host0_if0 color Red    $host0_if1 color Red    $ns multihome-add-interface $host0_core $host0_if0    $ns multihome-add-interface $host0_core $host0_if1    set host1_core [$ns node]    set host1_if0 [$ns node]    set host1_if1 [$ns node]    $host1_core color Blue    $host1_if0 color Blue    $host1_if1 color Blue    $ns multihome-add-interface $host1_core $host1_if0    $ns multihome-add-interface $host1_core $host1_if1    $ns duplex-link $host0_if0 $host1_if0 .5Mb 200ms DropTail    $ns duplex-link $host0_if1 $host1_if1 .5Mb 200ms DropTail    set err0 [new ErrorModel/List]    $err0 droplist {15}    $ns lossmodel $err0 $host0_if0 $host1_if0    set err1 [new ErrorModel/List]    $err1 droplist {0}    $ns lossmodel $err1 $host0_if1 $host1_if1    set sctp0 [new Agent/SCTP/HbAfterRto]    $ns multihome-attach-agent $host0_core $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468    $sctp0 set numOutStreams_ 1    if {$quiet == 0} {	$sctp0 set debugMask_ -1 	$sctp0 set debugFileIndex_ 0	set trace_ch [open trace.sctp w]	$sctp0 set trace_all_ 1	$sctp0 trace cwnd_	$sctp0 trace rto_	$sctp0 trace errorCount_	$sctp0 attach $trace_ch    }        set sctp1 [new Agent/SCTP/HbAfterRto]    $ns multihome-attach-agent $host1_core $sctp1    $sctp1 set mtu_ 1500    $sctp1 set initialRwnd_ 131072     $sctp1 set useDelayedSacks_ 1       if {$quiet == 0} {	$sctp1 set debugMask_ -1 	$sctp1 set debugFileIndex_ 1    }        $ns connect $sctp0 $sctp1    $sctp0 set-primary-destination $host1_if0        set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0}Test/sctp-hbAfterRto-multihome2-2Timeout instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 9.0 "$ftp0 stop"    $ns at 12.0 "$self finish"    $ns run}Test/sctp-multipleFastRtx-2packetsTimeout instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName multipleFastRtx-2packetsTimeout    $self next    set n0 [$ns node]    set n1 [$ns node]    $ns duplex-link $n0 $n1 .5Mb 200ms DropTail    $ns duplex-link-op $n0 $n1 orient right    set err [new ErrorModel/List]    $err droplist {14 15 31 32}    $ns lossmodel $err $n0 $n1    set sctp0 [new Agent/SCTP/MultipleFastRtx]    $ns attach-agent $n0 $sctp0    $sctp0 s

⌨️ 快捷键说明

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