?? bcast-01-060
字號(hào):
## First Multicast group# 1 sender: node 0# receiver(s): nodes 40 through 99#set udp_(0) [new Agent/UDP]$udp_(0) set dst_addr_ 0xE000000$ns_ attach-agent $node_(0) $udp_(0)#set cbr_(0) [new Application/Traffic/CBR]$cbr_(0) set packetSize_ 256$cbr_(0) set interval_ 0.50$cbr_(0) set random_ 1# send enough packets to keep simulation nearly busy: 2 packets# a second, starting at 30, stopping at 899: 2*870 = 1740$cbr_(0) set maxpkts_ 1740$cbr_(0) attach-agent $udp_(0)$cbr_(0) set dst_ 0xE000000$ns_ at 30.0 "$cbr_(0) start"## the nodes have to join the multicast group to receive the packet...#for {set i 40} {$i < 100} {incr i} { $ns_ at 0.0100000000 "$node_($i) bcast-join-group 0xE000000"}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -