test-suite-tcpVariants.tcl
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:37k
源码类别:

通讯编程

开发平台:

Visual C++

  1. #
  2. # Copyright (c) 1995 The Regents of the University of California.
  3. # All rights reserved.
  4. #
  5. # Redistribution and use in source and binary forms, with or without
  6. # modification, are permitted provided that the following conditions
  7. # are met:
  8. # 1. Redistributions of source code must retain the above copyright
  9. #    notice, this list of conditions and the following disclaimer.
  10. # 2. Redistributions in binary form must reproduce the above copyright
  11. #    notice, this list of conditions and the following disclaimer in the
  12. #    documentation and/or other materials provided with the distribution.
  13. # 3. All advertising materials mentioning features or use of this software
  14. #    must display the following acknowledgement:
  15. # This product includes software developed by the Computer Systems
  16. # Engineering Group at Lawrence Berkeley Laboratory.
  17. # 4. Neither the name of the University nor of the Laboratory may be used
  18. #    to endorse or promote products derived from this software without
  19. #    specific prior written permission.
  20. #
  21. # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. # ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31. # SUCH DAMAGE.
  32. #
  33. # @(#) $Header: /cvsroot/nsnam/ns-2/tcl/test/test-suite-tcpVariants.tcl,v 1.32 2007/09/25 04:29:56 sallyfloyd Exp $
  34. #
  35. # To view a list of available tests to run with this script:
  36. # ns test-suite-tcpVariants.tcl
  37. #
  38. source misc_simple.tcl
  39. remove-all-packet-headers       ; # removes all except common
  40. add-packet-header Flags IP TCP  ; # hdrs reqd for TCP
  41.  
  42. # FOR UPDATING GLOBAL DEFAULTS:
  43. Agent/TCP set precisionReduce_ false ;   # default changed on 2006/1/24.
  44. Agent/TCP set rtxcur_init_ 6.0 ;      # Default changed on 2006/01/21
  45. Agent/TCP set updated_rttvar_ false ;  # Variable added on 2006/1/21
  46. Agent/TCP set minrto_ 1
  47. # default changed on 10/14/2004.
  48. Agent/TCP/Newreno set newreno_changes1_ 0
  49. # The default is being changed to 1 on 5/5/03, to reflect RFC 2582.
  50. Agent/TCP/Newreno set partial_window_deflation_ 0  
  51. # The default is being changed to 1 on 5/5/03, to reflect RFC 2582.
  52. Agent/TCP set singledup_ 0
  53. # The default has been changed to 1
  54. Trace set show_tcphdr_ 1
  55. set wrap 90
  56. set wrap1 [expr $wrap * 512 + 40]
  57. Class Topology
  58. Topology instproc node? num {
  59.     $self instvar node_
  60.     return $node_($num)
  61. }
  62. #
  63. # Links1 uses 8Mb, 5ms feeders, and a 800Kb 10ms bottleneck.
  64. # Queue-limit on bottleneck is 2 packets.
  65. #
  66. Class Topology/net4 -superclass Topology
  67. Topology/net4 instproc init ns {
  68.     $self instvar node_
  69.     set node_(s1) [$ns node]
  70.     set node_(s2) [$ns node]
  71.     set node_(r1) [$ns node]
  72.     set node_(k1) [$ns node]
  73.     $self next
  74.     $ns duplex-link $node_(s1) $node_(r1) 8Mb 0ms DropTail
  75.     $ns duplex-link $node_(s2) $node_(r1) 8Mb 0ms DropTail
  76.     $ns duplex-link $node_(r1) $node_(k1) 800Kb 100ms DropTail
  77.     $ns queue-limit $node_(r1) $node_(k1) 8
  78.     $ns queue-limit $node_(k1) $node_(r1) 8
  79.     $self instvar lossylink_
  80.     set lossylink_ [$ns link $node_(r1) $node_(k1)]
  81.     set em [new ErrorModule Fid]
  82.     set errmodel [new ErrorModel/Periodic]
  83.     $errmodel unit pkt
  84.     $lossylink_ errormodule $em
  85. }
  86. TestSuite instproc finish file {
  87. global quiet wrap wrap1 PERL
  88.         set space 512
  89.         if [string match {*full*} $file] {
  90.                 exec $PERL ../../bin/getrc -s 2 -d 3 all.tr | 
  91.                    $PERL ../../bin/raw2xg -c -n $space -s 0.01 -m $wrap1 -t $file > temp.rands
  92.                 exec $PERL ../../bin/getrc -s 3 -d 2 all.tr | 
  93.                    $PERL ../../bin/raw2xg -a -c -f -p -y -n $space -s 0.01 -m $wrap1 -t $file >> temp.rands
  94.         } else {
  95.                 exec $PERL ../../bin/getrc -s 2 -d 3 all.tr | 
  96.                   $PERL ../../bin/raw2xg -s 0.01 -m $wrap -t $file > temp.rands
  97.                 exec $PERL ../../bin/getrc -s 3 -d 2 all.tr | 
  98.                   $PERL ../../bin/raw2xg -a -c -p -y -s 0.01 -m $wrap -t $file 
  99.                   >> temp.rands
  100.         }  
  101.         #exec $PERL ../../bin/set_flow_id -s all.tr | 
  102.         #  $PERL ../../bin/getrc -s 2 -d 3 | 
  103.         #  $PERL ../../bin/raw2xg -s 0.01 -m $wrap -t $file > temp.rands
  104. if {$quiet == "false"} {
  105. exec xgraph -bb -tk -nl -m -x time -y packets temp.rands &
  106. }
  107.         ## now use default graphing tool to make a data file
  108. ## if so desired
  109.         # exec csh gnuplotC2.com temp.rands temp.rands $file
  110.         ##
  111.         exit 0
  112. }
  113. TestSuite instproc printtimers { tcp time} {
  114. global quiet
  115. if {$quiet == "false"} {
  116.          puts "time: $time sRTT(in ticks): [$tcp set srtt_]/8 RTTvar(in ticks): [$tcp set rttvar_]/4 backoff: [$tcp set backoff_]"
  117. }
  118. }
  119. TestSuite instproc printtimersAll { tcp time interval } {
  120.         $self instvar dump_inst_ ns_
  121.         if ![info exists dump_inst_($tcp)] {
  122.                 set dump_inst_($tcp) 1
  123.                 $ns_ at $time "$self printtimersAll $tcp $time $interval"
  124.                 return
  125.         }
  126. set newTime [expr [$ns_ now] + $interval]
  127. $ns_ at $time "$self printtimers $tcp $time"
  128.         $ns_ at $newTime "$self printtimersAll $tcp $newTime $interval"
  129. }
  130. TestSuite instproc emod {} {
  131.         $self instvar topo_
  132.         $topo_ instvar lossylink_
  133.         set errmodule [$lossylink_ errormodule]
  134.         return $errmodule
  135. TestSuite instproc drop_pkts pkts {
  136.     $self instvar ns_
  137.     set emod [$self emod]
  138.     set errmodel1 [new ErrorModel/List]
  139.     $errmodel1 droplist $pkts
  140.     $emod insert $errmodel1
  141.     $emod bind $errmodel1 1
  142. }
  143.  
  144. TestSuite instproc setup {tcptype list} {
  145. global wrap wrap1
  146.         $self instvar ns_ node_ testName_
  147. $self setTopo
  148.         ###Agent/TCP set bugFix_ false
  149. set fid 1
  150.         # Set up TCP connection
  151.      if {$tcptype == "Tahoe"} {
  152.        set tcp1 [$ns_ create-connection TCP $node_(s1) 
  153.            TCPSink $node_(k1) $fid]
  154.      } elseif {$tcptype == "Sack1"} {
  155.        set tcp1 [$ns_ create-connection TCP/Sack1 $node_(s1) 
  156.            TCPSink/Sack1  $node_(k1) $fid]
  157.      } elseif {$tcptype == "Fack"} {
  158.        set tcp1 [$ns_ create-connection TCP/Fack $node_(s1) 
  159.            TCPSink/Sack1  $node_(k1) $fid]
  160.      } elseif {$tcptype == "SackRH"} {
  161.        set tcp1 [$ns_ create-connection TCP/SackRH $node_(s1) 
  162.            TCPSink/Sack1 $node_(k1) $fid]
  163.      } elseif {$tcptype == "FullTcp"} {
  164. set wrap $wrap1
  165.         set tcp1 [new Agent/TCP/FullTcp]
  166.         set sink [new Agent/TCP/FullTcp]
  167.         $ns_ attach-agent $node_(s1) $tcp1
  168.         $ns_ attach-agent $node_(k1) $sink
  169.         $tcp1 set fid_ $fid
  170.         $sink set fid_ $fid
  171.         $ns_ connect $tcp1 $sink
  172.         # set up TCP-level connections
  173.         $sink listen ; # will figure out who its peer is
  174.      } elseif {$tcptype == "FullTcpTahoe"} {
  175. set wrap $wrap1
  176.         set tcp1 [new Agent/TCP/FullTcp/Tahoe]
  177.         set sink [new Agent/TCP/FullTcp/Tahoe]
  178.         $ns_ attach-agent $node_(s1) $tcp1
  179.         $ns_ attach-agent $node_(k1) $sink
  180.         $tcp1 set fid_ $fid
  181.         $sink set fid_ $fid
  182.         $ns_ connect $tcp1 $sink
  183.         # set up TCP-level connections
  184.         $sink listen ; # will figure out who its peer is
  185.      } elseif {$tcptype == "FullTcpNewreno"} {
  186. set wrap $wrap1
  187.         set tcp1 [new Agent/TCP/FullTcp/Newreno]
  188.         set sink [new Agent/TCP/FullTcp/Newreno]
  189.         $ns_ attach-agent $node_(s1) $tcp1
  190.         $ns_ attach-agent $node_(k1) $sink
  191.         $tcp1 set fid_ $fid
  192.         $sink set fid_ $fid
  193.         $ns_ connect $tcp1 $sink
  194.         # set up TCP-level connections
  195.         $sink listen ; # will figure out who its peer is
  196.      } elseif {$tcptype == "FullTcpSack1"} {
  197. set wrap $wrap1
  198.         set tcp1 [new Agent/TCP/FullTcp/Sack]
  199.         set sink [new Agent/TCP/FullTcp/Sack]
  200.         $ns_ attach-agent $node_(s1) $tcp1
  201.         $ns_ attach-agent $node_(k1) $sink
  202.         $tcp1 set fid_ $fid
  203.         $sink set fid_ $fid
  204.         $ns_ connect $tcp1 $sink
  205.         # set up TCP-level connections
  206.         $sink listen ; # will figure out who its peer is
  207.      } else {
  208.        set tcp1 [$ns_ create-connection TCP/$tcptype $node_(s1) 
  209.            TCPSink $node_(k1) $fid]
  210.      }
  211.         $tcp1 set window_ 28
  212.         set ftp1 [$tcp1 attach-app FTP]
  213.         $ns_ at 1.0 "$ftp1 start"
  214.         $self tcpDump $tcp1 5.0
  215.         $self drop_pkts $list
  216.         #$self traceQueues $node_(r1) [$self openTrace 6.0 $testName_]
  217. $ns_ at 6.0 "$self cleanupAll $testName_"
  218.         $ns_ run
  219. }
  220. # Definition of test-suite tests
  221. ###################################################
  222. ## One drop
  223. ###################################################
  224. Class Test/onedrop_tahoe -superclass TestSuite
  225. Test/onedrop_tahoe instproc init {} {
  226. $self instvar net_ test_ guide_
  227. set net_ net4
  228. set test_ onedrop_tahoe
  229. set guide_ "Tahoe TCP, one drop."
  230. $self next pktTraceFile
  231. }
  232. Test/onedrop_tahoe instproc run {} {
  233. $self instvar guide_
  234. puts "Guide: $guide_"
  235.         $self setup Tahoe {14}
  236. }
  237. Class Test/onedrop_SA_tahoe -superclass TestSuite
  238. Test/onedrop_SA_tahoe instproc init {} {
  239. $self instvar net_ test_ guide_
  240. set net_ net4
  241. set test_ onedrop_SA_tahoe
  242. set guide_ "Tahoe TCP with Limited Transmit, one drop."
  243. Agent/TCP set singledup_ 1
  244. Test/onedrop_SA_tahoe instproc run {} [Test/onedrop_tahoe info instbody run ]
  245. $self next pktTraceFile
  246. }
  247. Class Test/onedrop_tahoe_full -superclass TestSuite
  248. Test/onedrop_tahoe_full instproc init {} {
  249. $self instvar net_ test_ guide_
  250. set net_ net4
  251. set test_ onedrop_tahoe_full
  252. set guide_ "Tahoe, Full TCP, one drop."
  253. $self next pktTraceFile
  254. }
  255. Test/onedrop_tahoe_full instproc run {} {
  256. $self instvar guide_
  257. puts "Guide: $guide_"
  258.         $self setup FullTcpTahoe {16}
  259. }
  260. Class Test/onedrop_reno -superclass TestSuite
  261. Test/onedrop_reno instproc init {} {
  262. $self instvar net_ test_ guide_
  263. set net_ net4
  264. set test_ onedrop_reno
  265. set guide_ "Reno TCP, one drop."
  266. $self next pktTraceFile
  267. }
  268. Test/onedrop_reno instproc run {} {
  269. $self instvar guide_
  270. puts "Guide: $guide_"
  271.         $self setup Reno {14}
  272. }
  273. Class Test/onedrop_SA_reno -superclass TestSuite
  274. Test/onedrop_SA_reno instproc init {} {
  275. $self instvar net_ test_ guide_
  276. set net_ net4
  277. set test_ onedrop_SA_reno
  278. set guide_ "Reno TCP with Limited Transmit, one drop."
  279. Agent/TCP set singledup_ 1
  280. Test/onedrop_SA_reno instproc run {} [Test/onedrop_reno info instbody run ]
  281. $self next pktTraceFile
  282. }
  283. Class Test/onedrop_reno_full -superclass TestSuite
  284. Test/onedrop_reno_full instproc init {} {
  285. $self instvar net_ test_ guide_
  286. set net_ net4
  287. set test_ onedrop_reno_full
  288. set guide_ "Reno, Full TCP, one drop."
  289. $self next pktTraceFile
  290. }
  291. Test/onedrop_reno_full instproc run {} {
  292. $self instvar guide_
  293. puts "Guide: $guide_"
  294.         $self setup FullTcp {16}
  295. }
  296. Class Test/onedrop_newreno -superclass TestSuite
  297. Test/onedrop_newreno instproc init {} {
  298. $self instvar net_ test_ guide_
  299. set net_ net4
  300. set test_ onedrop_newreno
  301. set guide_ "NewReno TCP, one drop."
  302. $self next pktTraceFile
  303. }
  304. Test/onedrop_newreno instproc run {} {
  305. $self instvar guide_
  306. puts "Guide: $guide_"
  307.         $self setup Newreno {14}
  308. }
  309. Class Test/onedrop_SA_newreno -superclass TestSuite
  310. Test/onedrop_SA_newreno instproc init {} {
  311. $self instvar net_ test_ guide_
  312. set net_ net4
  313. set test_ onedrop_SA_newreno
  314. set guide_ "NewReno TCP with Limited Transmit, one drop."
  315. Agent/TCP set singledup_ 1
  316. Test/onedrop_SA_newreno instproc run {} [Test/onedrop_newreno info instbody run ]
  317. $self next pktTraceFile
  318. }
  319. Class Test/onedrop_newreno_full -superclass TestSuite
  320. Test/onedrop_newreno_full instproc init {} {
  321. $self instvar net_ test_ guide_
  322. set net_ net4
  323. set test_ onedrop_newreno_full
  324. set guide_ "NewReno TCP, one drop."
  325. $self next pktTraceFile
  326. }
  327. Test/onedrop_newreno_full instproc run {} {
  328. $self instvar guide_
  329. puts "Guide: $guide_"
  330.         $self setup FullTcpNewreno {16}
  331. }
  332. Class Test/onedrop_sack -superclass TestSuite
  333. Test/onedrop_sack instproc init {} {
  334. $self instvar net_ test_ guide_
  335. set net_ net4
  336. set test_ onedrop_sack
  337. set guide_ "Sack TCP, one drop."
  338. $self next pktTraceFile
  339. }
  340. Test/onedrop_sack instproc run {} {
  341. $self instvar guide_
  342. puts "Guide: $guide_"
  343.         $self setup Sack1 {14}
  344. }
  345. Class Test/onedrop_SA_sack -superclass TestSuite
  346. Test/onedrop_SA_sack instproc init {} {
  347. $self instvar net_ test_ guide_
  348. set net_ net4
  349. set test_ onedrop_SA_sack
  350. set guide_ "Sack TCP with Limited Transmit, one drop."
  351. Agent/TCP set singledup_ 1
  352. Test/onedrop_SA_sack instproc run {} [Test/onedrop_sack info instbody run ]
  353. $self next pktTraceFile
  354. }
  355. Class Test/onedrop_sack_full -superclass TestSuite
  356. Test/onedrop_sack_full instproc init {} {
  357. $self instvar net_ test_ guide_
  358. set net_ net4
  359. set test_ onedrop_sack_full
  360. set guide_ "Sack, Full TCP, one drop."
  361. $self next pktTraceFile
  362. }
  363. Test/onedrop_sack_full instproc run {} {
  364. $self instvar guide_
  365. puts "Guide: $guide_"
  366.         $self setup FullTcpSack1 {16}
  367. }
  368. Class Test/onedrop_fack -superclass TestSuite
  369. Test/onedrop_fack instproc init {} {
  370. $self instvar net_ test_ guide_
  371. set net_ net4
  372. set test_ onedrop_fack
  373. set guide_ "Fack TCP, one drop."
  374. $self next pktTraceFile
  375. }
  376. Test/onedrop_fack instproc run {} {
  377. $self instvar guide_
  378. puts "Guide: $guide_"
  379.         $self setup Fack {14}
  380. }
  381. Class Test/onedrop_sackRH -superclass TestSuite
  382. Test/onedrop_sackRH instproc init {} {
  383. $self instvar net_ test_ guide_
  384. set net_ net4
  385. set test_ onedrop_sackRH
  386. set guide_ "Sack TCP with Rate Halving, one drop."
  387. $self next pktTraceFile
  388. }
  389. Test/onedrop_sackRH instproc run {} {
  390. $self instvar guide_
  391. puts "Guide: $guide_"
  392.         $self setup SackRH {14}
  393. }
  394. ###################################################
  395. ## Two drops
  396. ###################################################
  397. Class Test/twodrops_tahoe -superclass TestSuite
  398. Test/twodrops_tahoe instproc init {} {
  399. $self instvar net_ test_ guide_
  400. set net_ net4
  401. set test_ twodrops_tahoe
  402. set guide_ "Tahoe TCP, two drops."
  403. $self next pktTraceFile
  404. }
  405. Test/twodrops_tahoe instproc run {} {
  406. $self instvar guide_
  407. puts "Guide: $guide_"
  408.         $self setup Tahoe {14 28}
  409. }
  410. Class Test/twodrops_SA_tahoe -superclass TestSuite
  411. Test/twodrops_SA_tahoe instproc init {} {
  412. $self instvar net_ test_ guide_
  413. set net_ net4
  414. set test_ twodrops_SA_tahoe
  415. set guide_ "Tahoe TCP with Fast Retransmit, two drops."
  416. Agent/TCP set singledup_ 1
  417. Test/twodrops_SA_tahoe instproc run {} [Test/twodrops_tahoe info instbody run ]
  418. $self next pktTraceFile
  419. }
  420. Class Test/twodrops_tahoe_full -superclass TestSuite
  421. Test/twodrops_tahoe_full instproc init {} {
  422. $self instvar net_ test_ guide_
  423. set net_ net4
  424. set test_ twodrops_tahoe_full
  425. set guide_ "Tahoe Full TCP, two drops."
  426. $self next pktTraceFile
  427. }
  428. Test/twodrops_tahoe_full instproc run {} {
  429. $self instvar guide_
  430. puts "Guide: $guide_"
  431.         $self setup FullTcpTahoe {16 30}
  432. }
  433. Class Test/twodrops_reno -superclass TestSuite
  434. Test/twodrops_reno instproc init {} {
  435. $self instvar net_ test_ guide_
  436. set net_ net4
  437. set test_ twodrops_reno
  438. set guide_ "Reno TCP, two drops."
  439. $self next pktTraceFile
  440. }
  441. Test/twodrops_reno instproc run {} {
  442. $self instvar guide_
  443. puts "Guide: $guide_"
  444.         $self setup Reno {14 28}
  445. }
  446. Class Test/twodrops_SA_reno -superclass TestSuite
  447. Test/twodrops_SA_reno instproc init {} {
  448. $self instvar net_ test_ guide_
  449. set net_ net4
  450. set test_ twodrops_SA_reno
  451. set guide_ "Reno TCP with Limited Transmit, two drops."
  452. Agent/TCP set singledup_ 1
  453. Test/twodrops_SA_reno instproc run {} [Test/twodrops_reno info instbody run ]
  454. $self next pktTraceFile
  455. }
  456. Class Test/twodrops_reno_full -superclass TestSuite
  457. Test/twodrops_reno_full instproc init {} {
  458. $self instvar net_ test_ guide_
  459. set net_ net4
  460. set test_ twodrops_reno_full
  461. set guide_ "Reno, Full TCP, two drops."
  462. $self next pktTraceFile
  463. }
  464. Test/twodrops_reno_full instproc run {} {
  465. $self instvar guide_
  466. puts "Guide: $guide_"
  467.         $self setup FullTcp {16 30}
  468. }
  469. Class Test/twodrops_newreno -superclass TestSuite
  470. Test/twodrops_newreno instproc init {} {
  471. $self instvar net_ test_ guide_
  472. set net_ net4
  473. set test_ twodrops_newreno
  474. set guide_ "NewReno TCP, two drops."
  475. $self next pktTraceFile
  476. }
  477. Test/twodrops_newreno instproc run {} {
  478. $self instvar guide_
  479. puts "Guide: $guide_"
  480.         $self setup Newreno {14 28}
  481. }
  482. Class Test/twodrops_SA_newreno -superclass TestSuite
  483. Test/twodrops_SA_newreno instproc init {} {
  484. $self instvar net_ test_ guide_
  485. set net_ net4
  486. set test_ twodrops_SA_newreno
  487. set guide_ "NewReno TCP with Limited Transmit, two drops."
  488. Agent/TCP set singledup_ 1
  489. Test/twodrops_SA_newreno instproc run {} [Test/twodrops_newreno info instbody run ]
  490. $self next pktTraceFile
  491. }
  492. Class Test/twodrops_newreno_full -superclass TestSuite
  493. Test/twodrops_newreno_full instproc init {} {
  494. $self instvar net_ test_ guide_
  495. set net_ net4
  496. set test_ twodrops_newreno_full
  497. set guide_ "NewReno, Full TCP, two drops."
  498. $self next pktTraceFile
  499. }
  500. Test/twodrops_newreno_full instproc run {} {
  501. $self instvar guide_
  502. puts "Guide: $guide_"
  503.         $self setup FullTcpNewreno {16 30}
  504. }
  505. Class Test/twodrops_sack -superclass TestSuite
  506. Test/twodrops_sack instproc init {} {
  507. $self instvar net_ test_ guide_
  508. set net_ net4
  509. set test_ twodrops_sack
  510. set guide_ "Sack TCP, two drops."
  511. $self next pktTraceFile
  512. }
  513. Test/twodrops_sack instproc run {} {
  514. $self instvar guide_
  515. puts "Guide: $guide_"
  516.         $self setup Sack1 {14 28}
  517. }
  518. Class Test/twodrops_SA_sack -superclass TestSuite
  519. Test/twodrops_SA_sack instproc init {} {
  520. $self instvar net_ test_ guide_
  521. set net_ net4
  522. set test_ twodrops_SA_sack
  523. set guide_ "Sack TCP with Limited Transmit, two drops."
  524. Agent/TCP set singledup_ 1
  525. Test/twodrops_SA_sack instproc run {} [Test/twodrops_sack info instbody run ]
  526. $self next pktTraceFile
  527. }
  528. Class Test/twodrops_sack_full -superclass TestSuite
  529. Test/twodrops_sack_full instproc init {} {
  530. $self instvar net_ test_ guide_
  531. set net_ net4
  532. set test_ twodrops_sack_full
  533. set guide_ "Sack, Full TCP, two drops."
  534. $self next pktTraceFile
  535. }
  536. Test/twodrops_sack_full instproc run {} {
  537. $self instvar guide_
  538. puts "Guide: $guide_"
  539.         $self setup FullTcpSack1 {16 30}
  540. }
  541. Class Test/twodrops_fack -superclass TestSuite
  542. Test/twodrops_fack instproc init {} {
  543. $self instvar net_ test_ guide_
  544. set net_ net4
  545. set test_ twodrops_fack
  546. set guide_ "Fack TCP, two drops."
  547. $self next pktTraceFile
  548. }
  549. Test/twodrops_fack instproc run {} {
  550. $self instvar guide_
  551. puts "Guide: $guide_"
  552.         $self setup Fack {14 28}
  553. }
  554. Class Test/twodrops_sackRH -superclass TestSuite
  555. Test/twodrops_sackRH instproc init {} {
  556. $self instvar net_ test_ guide_
  557. set net_ net4
  558. set test_ twodrops_sackRH
  559. set guide_ "Sack TCP with Rate Halving, two drops."
  560. $self next pktTraceFile
  561. }
  562. Test/twodrops_sackRH instproc run {} {
  563. $self instvar guide_
  564. puts "Guide: $guide_"
  565.         $self setup SackRH {14 28}
  566. }
  567. ###################################################
  568. ## Three drops
  569. ###################################################
  570. Class Test/threedrops_tahoe -superclass TestSuite
  571. Test/threedrops_tahoe instproc init {} {
  572. $self instvar net_ test_ guide_
  573. set net_ net4
  574. set test_ threedrops_tahoe
  575. set guide_ "Tahoe TCP, three drops."
  576. $self next pktTraceFile
  577. }
  578. Test/threedrops_tahoe instproc run {} {
  579. $self instvar guide_
  580. puts "Guide: $guide_"
  581.         $self setup Tahoe {14 26 28}
  582. }
  583. Class Test/threedrops_SA_tahoe -superclass TestSuite
  584. Test/threedrops_SA_tahoe instproc init {} {
  585. $self instvar net_ test_ guide_
  586. set net_ net4
  587. set test_ threedrops_SA_tahoe
  588. set guide_ "Tahoe TCP with Limited Transmit, three drops."
  589. Agent/TCP set singledup_ 1
  590. Test/threedrops_SA_tahoe instproc run {} [Test/threedrops_tahoe info instbody run ]
  591. $self next pktTraceFile
  592. }
  593. Class Test/threedrops_tahoe_full -superclass TestSuite
  594. Test/threedrops_tahoe_full instproc init {} {
  595. $self instvar net_ test_ guide_
  596. set net_ net4
  597. set test_ threedrops_tahoe_full
  598. set guide_ "Tahoe, Full TCP, three drops."
  599. $self next pktTraceFile
  600. }
  601. Test/threedrops_tahoe_full instproc run {} {
  602. $self instvar guide_
  603. puts "Guide: $guide_"
  604.         $self setup FullTcpTahoe {16 28 30}
  605. }
  606. Class Test/threedrops_reno -superclass TestSuite
  607. Test/threedrops_reno instproc init {} {
  608. $self instvar net_ test_ guide_
  609. set net_ net4
  610. set test_ threedrops_reno
  611. set guide_ "Reno TCP, three drops."
  612. $self next pktTraceFile
  613. }
  614. Test/threedrops_reno instproc run {} {
  615. $self instvar guide_
  616. puts "Guide: $guide_"
  617.         $self setup Reno {14 26 28}
  618. }
  619. Class Test/threedrops_SA_reno -superclass TestSuite
  620. Test/threedrops_SA_reno instproc init {} {
  621. $self instvar net_ test_ guide_
  622. set net_ net4
  623. set test_ threedrops_SA_reno
  624. set guide_ "Reno TCP with Limited Transmit, three drops."
  625. Agent/TCP set singledup_ 1
  626. Test/threedrops_SA_reno instproc run {} [Test/threedrops_reno info instbody run ]
  627. $self next pktTraceFile
  628. }
  629. Class Test/threedrops_reno_full -superclass TestSuite
  630. Test/threedrops_reno_full instproc init {} {
  631. $self instvar net_ test_ guide_
  632. set net_ net4
  633. set test_ threedrops_reno_full
  634. set guide_ "Reno, Full TCP, three drops."
  635. $self next pktTraceFile
  636. }
  637. Test/threedrops_reno_full instproc run {} {
  638. $self instvar guide_
  639. puts "Guide: $guide_"
  640.         $self setup FullTcp {16 28 30}
  641. }
  642. Class Test/threedrops_newreno -superclass TestSuite
  643. Test/threedrops_newreno instproc init {} {
  644. $self instvar net_ test_ guide_
  645. set net_ net4
  646. set test_ threedrops_newreno
  647. set guide_ "NewReno TCP, three drops."
  648. $self next pktTraceFile
  649. }
  650. Test/threedrops_newreno instproc run {} {
  651. $self instvar guide_
  652. puts "Guide: $guide_"
  653.         $self setup Newreno {14 26 28}
  654. }
  655. Class Test/threedrops_SA_newreno -superclass TestSuite
  656. Test/threedrops_SA_newreno instproc init {} {
  657. $self instvar net_ test_ guide_
  658. set net_ net4
  659. set test_ threedrops_SA_newreno
  660. set guide_ "NewReno TCP with Limited Transmit, three drops."
  661. Agent/TCP set singledup_ 1
  662. Test/threedrops_SA_newreno instproc run {} [Test/threedrops_newreno info instbody run ]
  663. $self next pktTraceFile
  664. }
  665. Class Test/threedrops_newreno_full -superclass TestSuite
  666. Test/threedrops_newreno_full instproc init {} {
  667. $self instvar net_ test_ guide_
  668. set net_ net4
  669. set test_ threedrops_newreno_full
  670. set guide_ "NewReno, Full TCP, three drops."
  671. $self next pktTraceFile
  672. }
  673. Test/threedrops_newreno_full instproc run {} {
  674. $self instvar guide_
  675. puts "Guide: $guide_"
  676.         $self setup FullTcpNewreno {16 28 30}
  677. }
  678. Class Test/threedrops_sack -superclass TestSuite
  679. Test/threedrops_sack instproc init {} {
  680. $self instvar net_ test_ guide_
  681. set net_ net4
  682. set test_ threedrops_sack
  683. set guide_ "Sack TCP, three drops."
  684. $self next pktTraceFile
  685. }
  686. Test/threedrops_sack instproc run {} {
  687. $self instvar guide_
  688. puts "Guide: $guide_"
  689.         $self setup Sack1 {14 26 28}
  690. }
  691. Class Test/threedrops_SA_sack -superclass TestSuite
  692. Test/threedrops_SA_sack instproc init {} {
  693. $self instvar net_ test_ guide_
  694. set net_ net4
  695. set test_ threedrops_SA_sack
  696. set guide_ "Sack TCP with Limited Transmit, three drops."
  697. Agent/TCP set singledup_ 1
  698. Test/threedrops_SA_sack instproc run {} [Test/threedrops_sack info instbody run ]
  699. $self next pktTraceFile
  700. }
  701. Class Test/threedrops_sack_full -superclass TestSuite
  702. Test/threedrops_sack_full instproc init {} {
  703. $self instvar net_ test_ guide_
  704. set net_ net4
  705. set test_ threedrops_sack_full
  706. set guide_ "Sack, Full TCP, three drops."
  707. $self next pktTraceFile
  708. }
  709. Test/threedrops_sack_full instproc run {} {
  710. $self instvar guide_
  711. puts "Guide: $guide_"
  712.         $self setup FullTcpSack1 {16 28 30}
  713. }
  714. Class Test/threedrops_fack -superclass TestSuite
  715. Test/threedrops_fack instproc init {} {
  716. $self instvar net_ test_ guide_
  717. set net_ net4
  718. set test_ threedrops_fack
  719. set guide_ "Fack TCP, three drops."
  720. $self next pktTraceFile
  721. }
  722. Test/threedrops_fack instproc run {} {
  723. $self instvar guide_
  724. puts "Guide: $guide_"
  725.         $self setup Fack {14 26 28}
  726. }
  727. Class Test/threedrops_sackRH -superclass TestSuite
  728. Test/threedrops_sackRH instproc init {} {
  729. $self instvar net_ test_ guide_
  730. set net_ net4
  731. set test_ threedrops_sackRH
  732. set guide_ "Sack TCP with Rate Halving, three drops."
  733. $self next pktTraceFile
  734. }
  735. Test/threedrops_sackRH instproc run {} {
  736. $self instvar guide_
  737. puts "Guide: $guide_"
  738.         $self setup SackRH {14 26 28}
  739. }
  740. ###################################################
  741. ## Four drops
  742. ###################################################
  743. Class Test/fourdrops_tahoe -superclass TestSuite
  744. Test/fourdrops_tahoe instproc init {} {
  745. $self instvar net_ test_ guide_
  746. set net_ net4
  747. set test_ fourdrops_tahoe
  748. set guide_ "Tahoe TCP, four drops."
  749. $self next pktTraceFile
  750. }
  751. Test/fourdrops_tahoe instproc run {} {
  752. $self instvar guide_
  753. puts "Guide: $guide_"
  754.         $self setup Tahoe {14 24 26 28}
  755. }
  756. Class Test/fourdrops_SA_tahoe -superclass TestSuite
  757. Test/fourdrops_SA_tahoe instproc init {} {
  758. $self instvar net_ test_ guide_
  759. set net_ net4
  760. set test_ fourdrops_SA_tahoe
  761. set guide_ "Tahoe TCP with Limited Transmit, four drops."
  762. Agent/TCP set singledup_ 1
  763. Test/fourdrops_SA_tahoe instproc run {} [Test/fourdrops_tahoe info instbody run ]
  764. $self next pktTraceFile
  765. }
  766. Class Test/fourdrops_tahoe_full -superclass TestSuite
  767. Test/fourdrops_tahoe_full instproc init {} {
  768. $self instvar net_ test_ guide_
  769. set net_ net4
  770. set test_ fourdrops_tahoe_full
  771. set guide_ "Tahoe, Full TCP, four drops."
  772. $self next pktTraceFile
  773. }
  774. Test/fourdrops_tahoe_full instproc run {} {
  775. $self instvar guide_
  776. puts "Guide: $guide_"
  777.         $self setup FullTcpTahoe {16 26 28 30}
  778. }
  779. Class Test/fourdrops_reno -superclass TestSuite
  780. Test/fourdrops_reno instproc init {} {
  781. $self instvar net_ test_ guide_
  782. set net_ net4
  783. set test_ fourdrops_reno
  784. set guide_ "Reno TCP, four drops."
  785. $self next pktTraceFile
  786. }
  787. Test/fourdrops_reno instproc run {} {
  788. $self instvar guide_
  789. puts "Guide: $guide_"
  790.         $self setup Reno {14 24 26 28}
  791. }
  792. Class Test/fourdrops_SA_reno -superclass TestSuite
  793. Test/fourdrops_SA_reno instproc init {} {
  794. $self instvar net_ test_ guide_
  795. set net_ net4
  796. set test_ fourdrops_SA_reno
  797. set guide_ "Reno TCP with Limited Transmit, four drops."
  798. Agent/TCP set singledup_ 1
  799. Test/fourdrops_SA_reno instproc run {} [Test/fourdrops_reno info instbody run ]
  800. $self next pktTraceFile
  801. }
  802. Class Test/fourdrops_reno_full -superclass TestSuite
  803. Test/fourdrops_reno_full instproc init {} {
  804. $self instvar net_ test_ guide_
  805. set net_ net4
  806. set test_ fourdrops_reno_full
  807. set guide_ "Reno, Full TCP, four drops."
  808. $self next pktTraceFile
  809. }
  810. Test/fourdrops_reno_full instproc run {} {
  811. $self instvar guide_
  812. puts "Guide: $guide_"
  813.         $self setup FullTcp {16 26 28 30}
  814. }
  815. Class Test/fourdrops_newreno -superclass TestSuite
  816. Test/fourdrops_newreno instproc init {} {
  817. $self instvar net_ test_ guide_
  818. set net_ net4
  819. set test_ fourdrops_newreno
  820. set guide_ "NewReno TCP, four drops."
  821. $self next pktTraceFile
  822. }
  823. Test/fourdrops_newreno instproc run {} {
  824. $self instvar guide_
  825. puts "Guide: $guide_"
  826.         $self setup Newreno {14 24 26 28}
  827. }
  828. Class Test/fourdrops_SA_newreno -superclass TestSuite
  829. Test/fourdrops_SA_newreno instproc init {} {
  830. $self instvar net_ test_ guide_
  831. set net_ net4
  832. set test_ fourdrops_SA_newreno
  833. set guide_ "NewReno TCP with Limited Transmit, four drops."
  834. Agent/TCP set singledup_ 1
  835. Test/fourdrops_SA_newreno instproc run {} [Test/fourdrops_newreno info instbody run ]
  836. $self next pktTraceFile
  837. }
  838. Class Test/fourdrops_newreno_full -superclass TestSuite
  839. Test/fourdrops_newreno_full instproc init {} {
  840. $self instvar net_ test_ guide_
  841. set net_ net4
  842. set test_ fourdrops_newreno_full
  843. set guide_ "NewReno, Full TCP, four drops."
  844. $self next pktTraceFile
  845. }
  846. Test/fourdrops_newreno_full instproc run {} {
  847. $self instvar guide_
  848. puts "Guide: $guide_"
  849.         $self setup FullTcpNewreno {16 26 28 30}
  850. }
  851. Class Test/fourdrops_sack -superclass TestSuite
  852. Test/fourdrops_sack instproc init {} {
  853. $self instvar net_ test_ guide_
  854. set net_ net4
  855. set test_ fourdrops_sack
  856. set guide_ "Sack TCP, four drops."
  857. $self next pktTraceFile
  858. }
  859. Test/fourdrops_sack instproc run {} {
  860. $self instvar guide_
  861. puts "Guide: $guide_"
  862.         $self setup Sack1 {14 24 26 28}
  863. }
  864. Class Test/fourdrops_SA_sack -superclass TestSuite
  865. Test/fourdrops_SA_sack instproc init {} {
  866. $self instvar net_ test_ guide_
  867. set net_ net4
  868. set test_ fourdrops_SA_sack
  869. set guide_ "Sack TCP with Limited Transmit, four drops."
  870. Agent/TCP set singledup_ 1
  871. Test/fourdrops_SA_sack instproc run {} [Test/fourdrops_sack info instbody run ]
  872. $self next pktTraceFile
  873. }
  874. Class Test/fourdrops_sack_full -superclass TestSuite
  875. Test/fourdrops_sack_full instproc init {} {
  876. $self instvar net_ test_ guide_
  877. set net_ net4
  878. set test_ fourdrops_sack_full
  879. set guide_ "Sack, Full TCP, four drops."
  880. $self next pktTraceFile
  881. }
  882. Test/fourdrops_sack_full instproc run {} {
  883. $self instvar guide_
  884. puts "Guide: $guide_"
  885.         $self setup FullTcpSack1 {16 26 28 30}
  886. }
  887. Class Test/fourdrops_fack -superclass TestSuite
  888. Test/fourdrops_fack instproc init {} {
  889. $self instvar net_ test_ guide_
  890. set net_ net4
  891. set test_ fourdrops_fack
  892. set guide_ "Fack TCP, four drops."
  893. $self next pktTraceFile
  894. }
  895. Test/fourdrops_fack instproc run {} {
  896. $self instvar guide_
  897. puts "Guide: $guide_"
  898.         $self setup Fack {14 24 26 28}
  899. }
  900. Class Test/fourdrops_sackRH -superclass TestSuite
  901. Test/fourdrops_sackRH instproc init {} {
  902. $self instvar net_ test_ guide_
  903. set net_ net4
  904. set test_ fourdrops_sackRH
  905. set guide_ "Sack TCP with Rate Halving, four drops."
  906. $self next pktTraceFile
  907. }
  908. Test/fourdrops_sackRH instproc run {} {
  909. $self instvar guide_
  910. puts "Guide: $guide_"
  911.         $self setup SackRH {14 24 26 28}
  912. }
  913. ###################################################
  914. ## Multiple drops
  915. ###################################################
  916. Class Test/multiple_tahoe -superclass TestSuite
  917. Test/multiple_tahoe instproc init {} {
  918. $self instvar net_ test_ guide_
  919. set net_ net4
  920. set test_ multiple_tahoe
  921. set guide_ "Tahoe TCP, eight drops."
  922. $self next pktTraceFile
  923. }
  924. Test/multiple_tahoe instproc run {} {
  925. $self instvar guide_
  926. puts "Guide: $guide_"
  927.         $self setup Tahoe {11 12 13 14 16 17 18 19 }
  928. }
  929. ## This can result in an unnecessary packet transmission, unless the
  930. ## Limited Transmit option checks not to send packets less than maxseq_,
  931. ## the highest sequence number sent to far.
  932. Class Test/multiple_SA_tahoe -superclass TestSuite
  933. Test/multiple_SA_tahoe instproc init {} {
  934. $self instvar net_ test_ guide_
  935. set net_ net4
  936. set test_ multiple_SA_tahoe
  937. set guide_ "Tahoe TCP with Limited Transmit, eight drops."
  938. Agent/TCP set singledup_ 1
  939. Test/multiple_SA_tahoe instproc run {} [Test/multiple_tahoe info instbody run ]
  940. $self next pktTraceFile
  941. }
  942. Class Test/multiple_reno -superclass TestSuite
  943. Test/multiple_reno instproc init {} {
  944. $self instvar net_ test_ guide_
  945. set net_ net4
  946. set test_ multiple_reno
  947. set guide_ "Reno TCP, eight drops."
  948. $self next pktTraceFile
  949. }
  950. Test/multiple_reno instproc run {} {
  951. $self instvar guide_
  952. puts "Guide: $guide_"
  953. $self setup Reno {11 12 13 14 16 17 18 19 }
  954. }
  955. Class Test/multiple_SA_reno -superclass TestSuite
  956. Test/multiple_SA_reno instproc init {} {
  957. $self instvar net_ test_ guide_
  958. set net_ net4
  959. set test_ multiple_SA_reno
  960. set guide_ "Reno TCP with Limited Transmit, eight drops."
  961. Agent/TCP set singledup_ 1
  962. Test/multiple_SA_reno instproc run {} [Test/multiple_reno info instbody run ]
  963. $self next pktTraceFile
  964. }
  965. Class Test/multiple_newreno -superclass TestSuite
  966. Test/multiple_newreno instproc init {} {
  967. $self instvar net_ test_ guide_
  968. set net_ net4
  969. set test_ multiple_newreno
  970. set guide_ "NewReno TCP, eight drops."
  971. $self next pktTraceFile
  972. }
  973. Test/multiple_newreno instproc run {} {
  974. $self instvar guide_
  975. puts "Guide: $guide_"
  976. $self setup Newreno {11 12 13 14 16 17 18 19 }
  977. }
  978. Class Test/multiple_SA_newreno -superclass TestSuite
  979. Test/multiple_SA_newreno instproc init {} {
  980. $self instvar net_ test_ guide_
  981. set net_ net4
  982. set test_ multiple_SA_newreno
  983. set guide_ "NewReno TCP with Limited Transmit, eight drops."
  984. Agent/TCP set singledup_ 1
  985. Test/multiple_SA_newreno instproc run {} [Test/multiple_newreno info instbody run ]
  986. $self next pktTraceFile
  987. }
  988. Class Test/multiple_sack -superclass TestSuite
  989. Test/multiple_sack instproc init {} {
  990. $self instvar net_ test_ guide_
  991. set net_ net4
  992. set test_ multiple_sack
  993. set guide_ "Sack TCP, eight drops."
  994. $self next pktTraceFile
  995. }
  996. Test/multiple_sack instproc run {} {
  997. $self instvar guide_
  998. puts "Guide: $guide_"
  999. $self setup Sack1 {11 12 13 14 16 17 18 19 } 
  1000. }
  1001. # Limited Transmit
  1002. Class Test/multiple_SA_sack -superclass TestSuite
  1003. Test/multiple_SA_sack instproc init {} {
  1004. $self instvar net_ test_ guide_
  1005. set net_ net4
  1006. set test_ multiple_SA_sack
  1007. set guide_ "Sack TCP with Limited Transmit, eight drops."
  1008. Agent/TCP set singledup_ 1
  1009. Test/multiple_SA_sack instproc run {} [Test/multiple_sack info instbody run ]
  1010. $self next pktTraceFile
  1011. }
  1012. # Partial_ack 
  1013. Class Test/multiple_partial_ack_sack -superclass TestSuite
  1014. Test/multiple_partial_ack_sack instproc init {} {
  1015. $self instvar net_ test_ guide_
  1016. set net_ net4
  1017. set test_ multiple_partial_ack_sack
  1018. set guide_ "Sack TCP with an ensured response to a partial ack, eight drops."
  1019. Agent/TCP set partial_ack_ 1
  1020. Test/multiple_partial_ack_sack instproc run {} [Test/multiple_sack info instbody run ]
  1021. $self next pktTraceFile
  1022. }
  1023. ###################################################
  1024. ## Multiple drops, scenario #2
  1025. ###################################################
  1026. Class Test/multiple2_tahoe -superclass TestSuite
  1027. Test/multiple2_tahoe instproc init {} {
  1028. $self instvar net_ test_ guide_
  1029. set net_ net4
  1030. set test_ multiple2_tahoe
  1031. set guide_ "Tahoe TCP, five drops."
  1032. $self next pktTraceFile
  1033. }
  1034. Test/multiple2_tahoe instproc run {} {
  1035. $self instvar guide_
  1036. puts "Guide: $guide_"
  1037.         $self setup Tahoe {11 12 13 14 16 }
  1038. # $self setup Tahoe {11 12 13 14 16 17 18 19 }
  1039. }
  1040. ## This can result in an unnecessary packet transmission, unless the
  1041. ## Limited Transmit option checks not to send packets less than maxseq_,
  1042. ## the highest sequence number sent to far.
  1043. Class Test/multiple2_SA_tahoe -superclass TestSuite
  1044. Test/multiple2_SA_tahoe instproc init {} {
  1045. $self instvar net_ test_ guide_
  1046. set net_ net4
  1047. set test_ multiple2_SA_tahoe
  1048. set guide_ "Tahoe TCP with Limited Transmit, five drops."
  1049. Agent/TCP set singledup_ 1
  1050. Test/multiple2_SA_tahoe instproc run {} [Test/multiple2_tahoe info instbody run ]
  1051. $self next pktTraceFile
  1052. }
  1053. Class Test/multiple2_reno -superclass TestSuite
  1054. Test/multiple2_reno instproc init {} {
  1055. $self instvar net_ test_ guide_
  1056. set net_ net4
  1057. set test_ multiple2_reno
  1058. set guide_ "Reno TCP, five drops."
  1059. $self next pktTraceFile
  1060. }
  1061. Test/multiple2_reno instproc run {} {
  1062. $self instvar guide_
  1063. puts "Guide: $guide_"
  1064. $self setup Reno {11 12 13 14 16 }
  1065. }
  1066. Class Test/multiple2_SA_reno -superclass TestSuite
  1067. Test/multiple2_SA_reno instproc init {} {
  1068. $self instvar net_ test_ guide_
  1069. set net_ net4
  1070. set test_ multiple2_SA_reno
  1071. set guide_ "Reno TCP with Limited Transmit, five drops."
  1072. Agent/TCP set singledup_ 1
  1073. Test/multiple2_SA_reno instproc run {} [Test/multiple2_reno info instbody run ]
  1074. $self next pktTraceFile
  1075. }
  1076. Class Test/multiple2_newreno -superclass TestSuite
  1077. Test/multiple2_newreno instproc init {} {
  1078. $self instvar net_ test_ guide_
  1079. set net_ net4
  1080. set test_ multiple2_newreno
  1081. set guide_ "NewReno TCP, five drops."
  1082. $self next pktTraceFile
  1083. }
  1084. Test/multiple2_newreno instproc run {} {
  1085. $self instvar guide_
  1086. puts "Guide: $guide_"
  1087. $self setup Newreno {11 12 13 14 16 }
  1088. }
  1089. Class Test/multiple2_SA_newreno -superclass TestSuite
  1090. Test/multiple2_SA_newreno instproc init {} {
  1091. $self instvar net_ test_ guide_
  1092. set net_ net4
  1093. set test_ multiple2_SA_newreno
  1094. set guide_ "NewReno TCP with Limited Transmit, five drops."
  1095. Agent/TCP set singledup_ 1
  1096. Test/multiple2_SA_newreno instproc run {} [Test/multiple2_newreno info instbody run ]
  1097. $self next pktTraceFile
  1098. }
  1099. Class Test/multiple2_sack -superclass TestSuite
  1100. Test/multiple2_sack instproc init {} {
  1101. $self instvar net_ test_ guide_
  1102. set net_ net4
  1103. set test_ multiple2_sack
  1104. set guide_ "Sack TCP, five drops."
  1105. $self next pktTraceFile
  1106. }
  1107. Test/multiple2_sack instproc run {} {
  1108. $self instvar guide_
  1109. puts "Guide: $guide_"
  1110. $self setup Sack1 {11 12 13 14 16 } 
  1111. }
  1112. # Limited Transmit
  1113. Class Test/multiple2_SA_sack -superclass TestSuite
  1114. Test/multiple2_SA_sack instproc init {} {
  1115. $self instvar net_ test_ guide_
  1116. set net_ net4
  1117. set test_ multiple2_SA_sack
  1118. set guide_ "Sack TCP with Limited Transmit, five drops."
  1119. Agent/TCP set singledup_ 1
  1120. Test/multiple2_SA_sack instproc run {} [Test/multiple2_sack info instbody run ]
  1121. $self next pktTraceFile
  1122. }
  1123. # Partial_ack 
  1124. # Because partial_ack is used, there is an unnecessary packet retransmission.
  1125. #  Partial_ack needs to be made smarter, not to retransmit a packet that
  1126. #  has just been sent?
  1127. Class Test/multiple2_partial_ack_sack -superclass TestSuite
  1128. Test/multiple2_partial_ack_sack instproc init {} {
  1129. $self instvar net_ test_ guide_
  1130. set net_ net4
  1131. set test_ multiple2_partial_ack_sack
  1132. set guide_ "Sack TCP with an ensured response to a partial ack, five drops."
  1133. Agent/TCP set partial_ack_ 1
  1134. Test/multiple2_partial_ack_sack instproc run {} [Test/multiple2_sack info instbody run ]
  1135. $self next pktTraceFile
  1136. }
  1137. TestSuite runTest