My visitors map:

How to patch TORA protocol on Ns-2

This "how to" has been tested on releases newer than 2.26

If you tried to use the TORA protocol and you got an error like:

# ns script.tcl
num_nodes is set 2
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl

(_o17 cmd line 1)
invoked from within
"_o17 cmd port-dmux _o28"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
"eval $self create-wireless-node $args"
(procedure "_o3" line 14)
(Simulator node line 14)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within

you should patch the code as in the following.

1 step: patch tora code

Open a bash shell (click here to watch how) and type at prompt:

cd /usr/share/ns-2.30/tora/
mv tora.h tora.old.h mv wget

Then you should have the patched file in the TORA folder

2 step: recompile ns

Open the bash shell and type at prompt:

cd /usr/share/ns-2.30/
make make install