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

📄 test-suite-sctp.tcl

📁 跑leach需要的
💻 TCL
📖 第 1 页 / 共 5 页
字号:
    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 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37}     $ns lossmodel $err0 $host0_if0 $host1_if0    set err1 [new ErrorModel/List]    $err1 droplist {0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15}    $ns lossmodel $err1 $host0_if1 $host1_if1    set sctp0 [new Agent/SCTP]    $ns multihome-attach-agent $host0_core $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468    $sctp0 set numOutStreams_ 1    $sctp0 set oneHeartbeatTimer_ 0    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 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    set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0    $sctp0 set-primary-destination $host1_if0}Test/sctp-multihome2-2AMR-Exceeded instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 180.0 "$self finish"    $ns run}Test/sctp-multihome2-2Failover instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName multihome2-2Failover    $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 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31}    $ns lossmodel $err0 $host0_if0 $host1_if0        set sctp0 [new Agent/SCTP]    $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]    $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-multihome2-2Failover instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 180.0 "$self finish"    $ns run}Test/sctp-multihome2-2Failover0 instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName multihome2-2Failover0    $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 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31}     $ns lossmodel $err0 $host0_if0 $host1_if0    set sctp0 [new Agent/SCTP]    $ns multihome-attach-agent $host0_core $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468    $sctp0 set numOutStreams_ 1    $sctp0 set heartbeatInterval_ 0    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 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-multihome2-2Failover0 instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 195.0 "$self finish"    $ns run}Test/sctp-multihome2-2Failover1 instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName multihome2-2Failover1    $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 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31}     $ns lossmodel $err0 $host0_if0 $host1_if0    set sctp0 [new Agent/SCTP]    $ns multihome-attach-agent $host0_core $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468    $sctp0 set numOutStreams_ 1    $sctp0 set oneHeartbeatTimer_ 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 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-multihome2-2Failover1 instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 195.0 "$self finish"    $ns run}Test/sctp-multihome2-2Rtx1 instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName multihome2-2Rtx1    $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 err [new ErrorModel/List]    $err droplist {15}    $ns lossmodel $err $host0_if0 $host1_if0        set sctp0 [new Agent/SCTP]    $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]    $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        set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0        $sctp0 set-primary-destination $host1_if0}Test/sctp-multihome2-2Rtx1 instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 10.0 "$self finish"    $ns run}Test/sctp-multihome2-2Rtx3 instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName multihome2-2Rtx3    $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 err [new ErrorModel/List]    $err droplist {15 16 17}    $ns lossmodel $err $host0_if0 $host1_if0    set sctp0 [new Agent/SCTP]    $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]    $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    set ftp0 [new Application/FTP]    $ftp0 attach-agent $sctp0    $sctp0 set-primary-destination $host1_if0       }Test/sctp-multihome2-2Rtx3 instproc run {} {    $self instvar ns ftp0    $ns at 0.5 "$ftp0 start"    $ns at 10.0 "$self finish"    $ns run}Test/sctp-multihome2-2Timeout instproc init {} {    $self instvar ns testName ftp0    global quiet    set testName 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]    $ns multihome-attach-agent $host0_core $sctp0    $sctp0 set mtu_ 1500    $sctp0 set dataChunkSize_ 1468     $sctp0 set numOutStreams_ 1    if {$quiet == 0} {

⌨️ 快捷键说明

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