[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Lloyd Wood



thank you..
you said me "increase a counter with your own recvBytes() method in TcpSink"
but i don't understand what is recvBytes()!
is it a variable that my tcpsink already knows?
excuse me but i'm new user of ns!
 
 
I have:
 
.................
 
#Create a TCP agent source and attach it to n0
###############################################
set tcp0 [new Agent/TCP/Vegas]   
$ns attach-agent $n0 $tcp0
$tcp0 set fid_ 1    
$tcp0 set window_ 25
$tcp0 set packetSize_ 500
 
........................
 
 

# Create a FTP Traffic and attach it to tcp0 
############################################
set ftp0 [new Application/FTP]   
$ftp0 attach-agent $tcp0
 
 
................................
 
# Create a TCP/Sink and attach it to node n5
############################################
set sink0 [new Agent/TCPSink]   
$ns attach-agent $n5 $sink0                  
$sink0 set window_ 50
$sink0 set packetSize_ 40
$ns connect $tcp0 $sink0
 
i'd like to have anything variable that says me how many bytes my tcpsink had received  from tcpsender and after i'd like to put them in a file.tr to plot my trhoughput....
what can i do?
thank you another time!