LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   what does this program do? (https://www.linuxquestions.org/questions/linux-software-2/what-does-this-program-do-870020/)

tootz 03-21-2011 11:35 AM

what does this program do?
 
wad does this program do? pls advice

for {set w 24} {$w < 25} {incr w} {
set udp_($w) [new Agent/UDP];
$ns_ attach-agent $node_(1) $udp_($w);

set null_($w) [new Agent/Null];
$ns_ attach-agent $node_($w) $null_($w);

set cbr_($w) [new Application/Traffic/CBR];
$cbr_($w) set rate_ 7.5Kb
$cbr_($w) set packetSize_ 100
$cbr_($w) attach-agent $udp_($w);
$ns_ connect $udp_($w) $null_($w);
$ns_ at 100.0 "$cbr_($w) start";
$ns_ at 800.0 "$cbr_($w) stop";
}

szboardstretcher 03-21-2011 11:36 AM

Where did you get it? What was it called?

Looks like a TCL script.

EDIT: Origin of this script: http://www.cs.virginia.edu/~cs757/sl...l-exercise.pdf

tootz 03-21-2011 11:40 AM

yup it is a tcl script, can u tell me which node did they attached it to?
wad does $ns_ attach-agent $node_(1) $udp_($w); do?

and why when i change the loop condition from
for {set w 24} {$w < 25} {incr w} {
to
for {set w 22} {$w < 25} {incr w} {

after this ns-2.34 will hang, why is this so?
is it in a inifinite loop?

anutherguy 03-21-2011 12:38 PM

Oops
 
Like a mrorn, because i am still new to linux, i opened said command by copy and paste into terminal. Bad Idea, it deleted the linux partition on my mac, said acsess denied, and rebooted the computer 3 time into mac osx. Never again.:(


All times are GMT -5. The time now is 03:40 AM.