hi,
we are working on computer networks project: implementation of ariadne (a
secure mobile network protocol). ARIADNE is a secure version of DSR (a
protocol present in NS). Our project incharge asked us to start the work by
simply renaming DSR protocol's classes and variables. renaming: DSR -> ARI.
We did it, by taking help from NS-official tutorial.
But after we make. It gives errors like:
trace/cmu-trace.o(.gnu.linkonce.t._ZN10ari_hdr_sr6accessEPK6Packet[ari_hdr_sr::access(Packet
const*)]+0x7): In function `ari_hdr_sr::access(Packet const*)':
cmu-trace.cc: undefined reference to `ari_hdr_sr::offset_'
collect2: ld returned 1 exit status
make: *** [ns] Error 1
To give u an insight of what we did, the details of operations we performed
are, as follows:
1. Copy->Paste the folder "/ns-2.30/dsr" and rename it to ari.
Then we renamed all the files with DSR prefix as follows:
DSRAGENT.CC -> ARIAGENT.CC
and all other .cc and .h files similarly.
2. Rename all classes, global variables and function names in .cc and .h
files:
DSR -> ARI SR -> ARI_SR HDR_SR -> ARI_HDR_SR
in the "ns-2.30-allinone/ns-2.30/ari" folder.
3. Editing "/common/packet.h" (by adding the following lines):
#define ARI_HDR_SR (ari_hdr_sr :: access)
.
.
PT_ARI;
.
.
name_[PT_ARI] = "ARI" ;
4. Edit "/tcl/lib/ns-lib.tcl" as follows (following lines are added
without deleting dsr) :
-> source ../mobility/ari.tcl
-> ARI {
$self at 0.0 "$node start-ari"
}
-> if {$routingAgent_ != "ARI"} {
$node attach $ragent [Node set rtagent_port_]
}
-> if { $routingAgent_ != "ARI" } {
$node mip-call $ragent
}
-> # DSR is a special case
if {$routingAgent_ == "DSR"} {
set nodeclass [$self set-dsr-nodetype]
} else {
if {$routingAgent_ == "ARI"} {
set nodeclass [$self set-dsr-nodetype]
} else {
set nodeclass Node/MobileNode
}
}
-> Simulator instproc set-ari-nodetype {} {
$self instvar wiredRouting_
set nodetype ari_SRNodeNew
# MIP mobilenode
if [Simulator set mobile_ip_] {
set nodetype ari_SRNodeNew/MIPMH
}
# basestation ari node
if { [info exists wiredRouting_] && $wiredRouting_ == "ON"} {
set nodetype Node/MobileNode/BaseStationNode
}
return $nodetype
}
5. Adding in "/ns-2.30/tcl/lib/ns-packet.tcl" the following line:
-> ari_SR # source routing, ari/hdr_sr.cc
after this line: " SR # source routing, dsr/hdr_sr.cc"
-> # Routing Protocols:
ari_SR # source routing, ari/hdr_sr.cc
6. Created a new tcl file in "/tcl/mobility/ari.tcl".
Then we edit the make file to incorporate our ari folder while making ns...
Then we make the ns (by typing make in "/ns-2.30" folder)
But still it gives errors as stated above.
Thanks ,
Farid Zafar ([EMAIL PROTECTED])
College of E&ME, NUST.
_________________________________________________________________
Fixing up the home? Live Search can help
http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=hmemailtaglinenov06&FORM=WLMTAG