[ns] Exponential traffic

Φανή fanoulaki at yahoo.gr
Wed Apr 15 02:49:08 PDT 2009


I am trying to create an exponential traffic where packet_size should be 512, rate 250k and poisson packet rate 1 packet/10 sec . I have the following declaration for exponential traffic. What changes should I make? I tried to put 512 in packet size and left everything else the same but I get errors. Is there a CC file that I should change too? Please help me I am totally lost!
 
 
proc poissontraffic { src dst interval starttime } {
global ns_ node_
set udp($src) [new Agent/UDP]
eval $ns_ attach-agent \$node_($src) \$udp($src)
set null(0) [new Agent/Null]
eval $ns_ attach-agent \$node_(0) \$null(0)
set expl($src) [new Application/Traffic/Exponential]
eval \$expl($src) set packetSize_ 70
eval \$expl($src) set burst_time_ 0
eval \$expl($src) set idle_time_ [expr $interval*1000.0-70.0*8/250]ms ;# idle_time + pkt_tx_time = interval
eval \$expl($src) set rate_ 250k
eval \$expl($src) attach-agent \$udp($src)
eval $ns_ connect \$udp($src) \$null(0)
$ns_ at $starttime "$expl($src) start"
 
 
 
Thank you,
Fani
Greece


      
___________________________________________________________ 
Χρησιμοποιείτε Yahoo!; 
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail 
διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών 
μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr 


More information about the Ns-users mailing list