this is some part of my file AODV.tcl example of AODV implementation in ns2 the problem that i need to use the aodv.c and aodv.h in this implementation i don't know how to do this ?? i need to use all the functions in aodv.c file and i don't know how to do it? please help and thanks .
my code:
set ns [new Simulator]
set namfile [open AODV_final.nam w]
set Time [open time.tr w]
...
global TN
set TN 2
set god_ [create-god $TN]
$ns node-config -adhocRouting AODV \
-llType LL \
-macType Mac/802_11\
-ifqLen 50 \
-ifqType Queue/DropTail/PriQueue \
-antType Antenna/OmniAntenna \
-propType Propagation/TwoRayGround \
-phyType Phy/WirelessPhy \
-channel [new Channel/WirelessChannel] \
-topoInstance $topography \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace ON
set x1 150
set y1 150
...
for {set j1 0} {$j1 < $TN} {incr j1 20} {
incr x1 0
incr y1 150
$node($j1) set X_ $x1
$node($j1) set Y_ $y1
$node($j1) set Z_ 0
$node($j1) color "green"
$ns at 0.000000 "$node($j1) setdest $x1 $y1 0.00"
}
...
$ns at 10.000000 "$node(0) setdest 160 450 75"
$ns connect $Tcp(0) $TcpSink(1)
$ns at 0.020000 "$Ftp(0) start"
$ns at 590.000000 "$Ftp(0) stop"
...
proc finish {} {
global ns namfile
$ns flush-trace
close $namfile
exit 0
}
$ns at 10.000000 "finish"
$ns run