Hello,

I would like a source node (n0) to broadcast CBR packets via
UDP to  1 hop neighbors (n1,n2) in a wireless dhoc network.

I've tried the following solution:

One way, could be to attach the source to each destination
as below:


set udp1 [new Agent/UDP] 
$ns attach-agent $n0 $udp1 

set src1 [new Application/Traffic/CBR] 
$src1 attach-agent $udp1 

set null1 [new Agent/Null] 
ns attach-agent $n1 $null1 
ns attach-agent $n2 $null1 

$ns connect $udp1 $null1 

$ns at 0.1 "$src1 start" 

$ns at 50 finish 

But in this case the CBR packets are only recieved by node
n2. 

What should I do? Any help would be appreciated..
Thanks,
Behnaz

Reply via email to