#!/usr/bin/perl 

# UDP Background Traffic experiment (Section IV-F, Figure 11)

$bnqueuetype = 0; # DropTail Bottleneck
$cbrrate = "1.0Mb";
$simtime = 1000.0;



qx!rm -f sim.data!;
for ($udpscale = 1; $udpscale <= 7; $udpscale++) {
	$httpflows = 24;
	$ftpflows =  8;
	$udpflows = $udpscale*6;
	$time = qx!date!; print("\nStart time: $time"); 
	print "\n>./ns http.tcl -udpflows $udpflows -cbrrate $cbrrate -bnqueuetype $bnqueuetype -ftpbkgflows $ftpflows -httpbkgflows $httpflows -simtime $simtime ";
	qx!rm bnlink.data!;
	$output = qx!./ns http.tcl -udpflows $udpflows -cbrrate $cbrrate -bnqueuetype $bnqueuetype -ftpbkgflows $ftpflows -httpbkgflows $httpflows -simtime $simtime !;
	print "\n$output\n";
	qx!cat bnlink.data >> sim.data !;
	$time = qx!date!; print("\nEnd time: $time"); 
}
