http://www.cse.msu.edu/~wangbo1/ns2/nshowto8.html
原本的multi channel, 在添加新的interface時, 只有加五筆資料, 所以最多只能設定五個NIC資訊.
像我要設定ll_(5)時, 就會出現錯誤訊息了.
因為原本的code頂多只有到ll_(4)
(可參閱tcl/lib/ns-mobilenode.tcl)
========================================
簡單說, 如果我現在想要把NIC的資訊設定到8張網卡時, 要參考網址的修改資訊.
http://www.cse.msu.edu/~wangbo1/ns2/nshowto8.html
1. Modifications in tcl/lib/ns-lib.tcl
2. Modifications in tcl/lib/ns-mobilenode.tcl
像是原本語法是寫chan chan2 chan3 chan4 chan5, 那就在後面多加chan6, chan7, chan8.
還有$sndT5 target [$self set ll_(4)], 後面再多加$sndT6 target [$self set ll_(5)]....等
全部以此類推!!
========================================
還有ns-2.29/manual/manual.{cc, h}
在.h要NsObject *downtarget5_; 的後面多加三筆資訊
在.cc
1. 要在這個後面多加三組
else if (prte->nic_id == 5)
downtarget5_->recv(p, (Handler *)0);
2. 還有downtarget5_(0) 要再多三筆資訊
3. 這個也是
else if (strcasecmp (argv[1], "down-target-5") == 0) {
downtarget5_ = (NsObject *) obj;
return TCL_OK;
}
========================================
大概就是這樣吧 zzzZZZ....
========================================
補充幾個容易忘記設定的檔案:
gedit ns-2.29/tcl/lib/ns-lib.tcl -> 設定MCMI的數量
gedit ns-2.29/tcl/lib/ns-mobilenode.tcl -> 設定MCMI的數量
gedit ns-2.29/mac/mac-802_11.cc -> 設定MCMI的數量
========================================
需要修改檔案的清單備份
Multi-channel Multi-interface Extension
1. Modifications in tcl/lib/ns-lib.tcl
2. Modifications in tcl/lib/ns-mobilenode.tcl
3. Modifications in mac/arp.cc
4. Modifications in mac/channel.h
5. Modifications in mac/channel.cc
6. Modifications in mac/mac-802_11.cc
Use Multi-channel Multi-interface — Manual Routing Protocol (proposed in Hyacinth)
7. Modifications in tcl/lib/ns-lib.tcl
8. Modifications in tcl/lib/ns-mobilenode.tcl
9. Modifications in common/packet.h
10. Modifications in apps/udp.h
11. Modifications in apps/udp.cc
12. Modifications in tcp/tcp.h
13. Modifications in tcp/tcp.cc
14. Modifications in tcp/tcp-sink.h
15. Modifications in tcp/tcp-sink.cc
16. Manual routing protocol implmentation and NS2 configuration
Simuilation Results
17. Simulation results for validating the extension
沒有留言:
張貼留言