Creation of a New Agent in ns2 - NS2 Tutorial # 10

To create an new Agent in NS2 that describes the OTcl and C++ linkages

We know that the file is stored in the folder

Open the file ns-2.35/ and make an entry of your own file (in this case, it is

Find a vairable inside the called


and make an entry there as shown below pradeep/tspagent.o \

Save the file and open a terminal, go to the folder ~ns-2.35/ and execute the command one by one

$] ./configure
$] make

Correct any mistakes or errors in your .cc file and run the above commands.
Successful OTcl and C++ linkages....

Thank you and Stay tuned for more lectures

Next lecture will be on AODV protocol and its modification.

Refer my website for downloading the source code and refer my videos at

Share and Subscribe.

Thank you......

Download the files here

T S Pradeep Kumar