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

Error in Marc Greiss Tutorial



Hi

I had a problem a few weeks ago with a script. I followed the tutorial
instructions and there is a little mistake.

In part IV.3 Sending data,
the instruction 
	"$cbr0 set packetSize_ 500"
sould be replaced with 
	"$cbr0 set packet_size_ 500"

as Massimo Pegorer and Alton Yu answered me

Maybe it would be also better to use a transport agent as udp or tcp to
explain in a better way to newbies how to use ns.

for example replace
 set cbr0 [new Agent/CBR]
 $ns attach-agent $n0 $cbr0
 $cbr0 set packetSize_ 500
 $cbr0 set interval_ 0.005

with
   #data source generation
 set cbr0 [new Application/Traffic/CBR]
 $cbr0 set packet_size 500
 $cbr0 set interval_ 0.005
   #transport agent
 set udp0 [new Agent/UDP]
   #attach transport agent to node
 $ns attach-agent $n0 $udp0
   #send data source output in transport agent input
 $cbr0 attach-agent $udp0

I think it is more meaningfull but I'm am a beginner with ns and I'll
let Marc choose the rigth solution.

Mickael