[ns] how to establish wireless links from 1 source to 2 destinations?
Chuah Seong Ping
SPCHUAH at ntu.edu.sg
Tue Sep 23 05:31:16 PDT 2008
Dear all,
I wish to establish wireless links to connect a source node to 2
destination nodes:
set udp0 [new Agent/myUDP]
$udp0 set_filename src_tr0
$ns attach-agent $node_(0) $udp0
set rcvr1 [new Agent/LossMonitor]
$rcvr1 set_trace_filename dst_tr1
$ns attach-agent $node_(1) $rcvr1
set rcvr2 [new Agent/LossMonitor]
$rcvr2 set_trace_filename dst_tr2
$ns attach-agent $node_(2) $rcvr2
$ns connect $udp0 $rcvr1
$ns connect $udp0 $rcvr2
But this piece of code only establishes a link from $udp0 to $rcvr2,
without $udp0 to $rcvr1.
Is there any other way to do so?
Thanks,
Seong Ping
More information about the Ns-users
mailing list