ns2的一些技巧

来源:互联网 发布:2017总决赛数据 编辑:程序博客网 时间:2024/05/16 08:14

Suggested by ns2 manual, putting the below codes in your tcl script

remove-all-packet-headersadd-packet-header DSR ARP LL MAC CBR IP

 

In windows, there is NO doubt, the best IDE is Visual Studio (most of us do not really like Microsoft, but we have to admit, MS is the best software company on earth).
However, for ns2, the best IDE should be Eclipse -- both Windows and Linux

  • Installation Eclipse with CDT package.
  • Build ns2 through (Windows, you need cygwin. And either for Windows/Linux, don't forget to install the tcl library first).
  • Use the ns2 root path as the workspace path of your Eclipse to launch it.
  • Use Eclipse's C/C++ Perspective. Create a project for your ns2: "New" --> "C++ Project". Select the "Makefile project" --> "Empty project". Give the same ns2 sub directory name as the project name.
  • "Project" --> "Build All". Now you should be able to use Eclipse the Code/Compile/Debug ns2.
  • The most important feature you would get there is the "intellisense". Although Vi/Emacs both provide "Code completion", they are No-comparable -- "intellisense" has much more good features than "Code completion".