Hello, I would like a source node (n0) to broadcast CBR packets via UDP to 1 hop neighbors (n1,n2) in a in a wireless dhoc network. 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 I think in this case the same packet at the mac layer is sent by unicasting once from n0 to n1 and once from n0 to n2. But, what if I would like to use a broadcast at MAC layer? I saw that in MAC header you actually can set the type to MAC_BROADCAST but I don't know how to force to use it when I send a CBR packet. Thanks, Behnaz