📄 test-suite-full.tcl
字号:
} $errmodel set offset_ 1.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $ns_ connect $src $sink # set up TCP-level connections $sink listen set ftp1 [$src attach-app FTP] $ns_ at 0.7 "$ftp1 start" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.01 $src set packetSize_ 576 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}Class Test/droppedfirstseg -superclass TestSuiteTest/droppedfirstseg instproc init topo { $self instvar net_ defNet_ test_ set net_ $topo set defNet_ net0-lossy set test_ droppedfirstseg $self next}Test/droppedfirstseg instproc run {} { $self instvar ns_ node_ testName_ topo_ set stopt 20.0 $topo_ instvar lossylink_ set errmodule [$lossylink_ errormodule] set errmodel [$errmodule errormodels] if { [llength $errmodel] > 1 } { puts "droppedfirstseg: confused by >1 err models..abort" exit 1 } $errmodel set offset_ 3.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $ns_ connect $src $sink # set up TCP-level connections $sink listen set ftp1 [$src attach-app FTP] $ns_ at 0.7 "$ftp1 start"# $ns_ at 0.5 "$self printtimersAll $src 0.5 0.5" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.01 $src set packetSize_ 576 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}Class Test/droppedsecondseg -superclass TestSuiteTest/droppedsecondseg instproc init topo { $self instvar net_ defNet_ test_ set net_ $topo set defNet_ net0-lossy set test_ droppedsecondseg $self next}Test/droppedsecondseg instproc run {} { $self instvar ns_ node_ testName_ topo_ set stopt 20.0 $topo_ instvar lossylink_ set errmodule [$lossylink_ errormodule] set errmodel [$errmodule errormodels] if { [llength $errmodel] > 1 } { puts "droppedsecondseg: confused by >1 err models..abort" exit 1 } $errmodel set offset_ 4.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $ns_ connect $src $sink # set up TCP-level connections $sink listen set ftp1 [$src attach-app FTP] $ns_ at 0.7 "$ftp1 start"# $ns_ at 0.5 "$self printtimersAll $src 0.5 0.5" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.01 $src set packetSize_ 576 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}Class Test/simul-open -superclass TestSuiteTest/simul-open instproc init topo { $self instvar net_ defNet_ test_ set net_ $topo set defNet_ net0-lossy set test_ simul-open $self next}Test/simul-open instproc run {} { $self instvar ns_ node_ testName_ topo_ set stopt 9.0 $topo_ instvar lossylink_ set errmodule [$lossylink_ errormodule] set errmodel [$errmodule errormodels] if { [llength $errmodel] > 1 } { puts "simul-open: confused by >1 err models..abort" exit 1 } $errmodel set offset_ 20.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $ns_ connect $src $sink; # this is bi-directional # set up TCP-level connections set ftp1 [$src attach-app FTP] set ftp2 [$sink attach-app FTP] $ns_ at 0.7 "$ftp1 start; $ftp2 start" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.500 $src set packetSize_ 576 $sink set window_ 100 $sink set delay_growth_ true $sink set tcpTick_ 0.500 $sink set packetSize_ 1460 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}Class Test/simul-close -superclass TestSuiteTest/simul-close instproc init topo { $self instvar net_ defNet_ test_ set net_ $topo set defNet_ net0 set test_ simul-close $self next}Test/simul-close instproc run {} { $self instvar ns_ node_ testName_ topo_ set stopt 9.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $sink set iss_ 10000 $ns_ connect $src $sink; # this is bi-directional # set up TCP-level connections set ftp1 [$src attach-app FTP] set ftp2 [$sink attach-app FTP] $ns_ at 0.7 "$ftp1 start" $ns_ at 0.9 "$ftp2 start" $ns_ at 1.6 "$src close; $sink close" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.500 $src set packetSize_ 576 $sink set window_ 100 $sink set delay_growth_ true $sink set tcpTick_ 0.500 $sink set packetSize_ 1460 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}Class Test/droppednearfin -superclass TestSuiteTest/droppednearfin instproc init topo { $self instvar net_ defNet_ test_ set net_ $topo set defNet_ net0-lossy set test_ droppednearfin $self next}Test/droppednearfin instproc run {} { $self instvar ns_ node_ testName_ topo_ set stopt 10.0 $topo_ instvar lossylink_ set errmodule [$lossylink_ errormodule] set errmodel [$errmodule errormodels] if { [llength $errmodel] > 1 } { puts "droppednearfin: confused by >1 err models..abort" exit 1 } $errmodel set offset_ 7.0 $errmodel set period_ 100.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $ns_ connect $src $sink # set up TCP-level connections $sink listen set ftp1 [$src attach-app FTP] $ns_ at 0.7 "$ftp1 start" $ns_ at 1.5 "$src close" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.500 $src set packetSize_ 576 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}Class Test/droppedlastseg -superclass TestSuiteTest/droppedlastseg instproc init topo { $self instvar net_ defNet_ test_ set net_ $topo set defNet_ net0-lossy set test_ droppedlastseg $self next}Test/droppedlastseg instproc run {} { $self instvar ns_ node_ testName_ topo_ set stopt 10.0 $topo_ instvar lossylink_ set errmodule [$lossylink_ errormodule] set errmodel [$errmodule errormodels] if { [llength $errmodel] > 1 } { puts "droppedlastseg: confused by >1 err models..abort" exit 1 } $errmodel set offset_ 9.0 $errmodel set period_ 100.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $ns_ connect $src $sink # set up TCP-level connections $sink listen set ftp1 [$src attach-app FTP] $ns_ at 0.7 "$ftp1 start" $ns_ at 1.5 "$src close" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.500 $src set packetSize_ 576 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}Class Test/droppedretransmit -superclass TestSuiteTest/droppedretransmit instproc init topo { $self instvar net_ defNet_ test_ set net_ $topo set defNet_ net0-lossy set test_ droppedretransmit $self next}Test/droppedretransmit instproc run {} { $self instvar ns_ node_ testName_ topo_ set stopt 10.0 $topo_ instvar lossylink_ set errmodule [$lossylink_ errormodule] set errmodel [$errmodule errormodels] if { [llength $errmodel] > 1 } { puts "droppedretransmit: confused by >1 err models..abort" exit 1 } $errmodel set offset_ 62.0 $errmodel set period_ 100.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $ns_ connect $src $sink # set up TCP-level connections $sink listen set ftp1 [$src attach-app FTP] $ns_ at 0.7 "$ftp1 start" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.500 $src set packetSize_ 576 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}Class Test/droppednearretransmit -superclass TestSuiteTest/droppednearretransmit instproc init topo { $self instvar net_ defNet_ test_ set net_ $topo set defNet_ net0-lossy set test_ droppednearretransmit $self next}Test/droppednearretransmit instproc run {} { $self instvar ns_ node_ testName_ topo_ set stopt 10.0 $topo_ instvar lossylink_ set errmodule [$lossylink_ errormodule] set errmodel [$errmodule errormodels] if { [llength $errmodel] > 1 } { puts "droppednearretransmit: confused by >1 err models..abort" exit 1 } $errmodel set offset_ 63.0 $errmodel set period_ 100.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $ns_ connect $src $sink # set up TCP-level connections $sink listen set ftp1 [$src attach-app FTP] $ns_ at 0.7 "$ftp1 start" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.500 $src set packetSize_ 576 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}Class Test/droppedfastrexmit -superclass TestSuiteTest/droppedfastrexmit instproc init topo { $self instvar net_ defNet_ test_ set net_ $topo set defNet_ net0-lossy set test_ droppedfastrexmit $self next}Test/droppedfastrexmit instproc run {} { $self instvar ns_ node_ testName_ topo_ set stopt 10.0 $topo_ instvar lossylink_ set errmodule [$lossylink_ errormodule] set errmodel [$errmodule errormodels] if { [llength $errmodel] > 1 } { puts "droppedfastrexmit: confused by >1 err models..abort" exit 1 } $errmodel set offset_ 61.0 $errmodel set period_ 100.0 # set up connection (do not use "create-connection" method because # we need a handle on the sink object) set src [new Agent/TCP/FullTcp] set sink [new Agent/TCP/FullTcp] $ns_ attach-agent $node_(s1) $src $ns_ attach-agent $node_(k1) $sink $src set fid_ 0 $sink set fid_ 0 $ns_ connect $src $sink # set up TCP-level connections $sink listen set ftp1 [$src attach-app FTP] $ns_ at 0.7 "$ftp1 start" # set up special params for this test $src set window_ 100 $src set delay_growth_ true $src set tcpTick_ 0.500 $src set packetSize_ 576 $self traceQueues $node_(r1) [$self openTrace $stopt $testName_] $ns_ run}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -