Mar 3, 2006

To add a module in Ns-2 is not a simple task especially for beginner. Therefore it's the author's wish to assist beginner by writing this article. However, the author would like to remind that there are plenty of modules that already existing in Ns-2. By merely editing the exiting module and adding extra functions, it's sufficient to be the first step to add a new module in Ns=2.

Step 1

Open cygwin command window, and change directory to the following pathcd ns-allinone-2.27/ns-2.27/queue

Step 2

Change the name of drop-tail.[cc, h] to myfifo.[cc, h]cp drop-tail.cc myfifo.cccp drop-tail.h myfifo.h

Step 3

By using editor, edit myfifo.h and myfifo.c (if you are in windows environment, you may use software like Ultra-edit to edit)

a. Firstly, edit myfifo.h by changing everything from Droptail to myfifo and drop_tail to myfifo