Upload
joseph-jude
View
222
Download
0
Embed Size (px)
Citation preview
<PRE>TITLE:InstallingNRL'sSensorNetworkextensionstoNS-2.27
AUTHOR:IanDownard<[email protected]>
DATE:April2004
ABSTRACT:
TheseinstructionsdescribehowtoinstallthecodenecessaryforsimulatingsensornetworksintheNetworkSimulator,version2.27,distributedbytheInformationSciencesInstituteattheUSCSchoolofEngineering[1].
QUICKANDDIRTYINSTALLATION:
Downloadnrlsensorsim-2.27.tgz.
Ascripthasbeenwrittentoautomaticallypatchthens-2.27.Thatscriptiscalled"patch_script-2.27.sh",andmustberunfromthenrlsensorsim-2.27/directory,whichinturnmustbelocatedinthesamedirectorythathasthens-allinone-2.27directory.Sohere'stheprocedure:
tar-xzvfns-allinone-2.27.tgztar-xzvfnrlsensorsim-2.27.tgzcdnrlsensorsim-2.27/./patch_script-2.27.shcd../ns-allinone-2.27/./install
Ourextensionstons-2.27donotyetincludesupportfortheNRLOLSRroutingalgorithm.IfyoudesireNRLOSLR,downloadourpatchesforns-2.26.
PATCHINGSUMMARY:
SomeofISI'senhancementsaddedtons-2.27wereremovedinordertoforceincompatibilitywithoursensornetworkextensions.Thesideeffectsofourhacksarenotyetunderstood.Usersshouldcorroboratetheirsimulationresultsasmuchaspossiblewithearlierversionsofns.
PATCHINGDETAILS:
HerearetheproblemsI'vefixedwithns-2.27(firsttwoareinmac/channel.cc):
1.WirelessChannel::sendUpcontainsanelsestructurewithlist-basedimprovements.Irevertedthatelsestructurebacktowhatitwasin2.26.Withoutthismodification,PHENOMpacketswillnevergetreceived.
2.WirelessChannel::updateNodesListcontainsacalltosortLists().Iremovedthatcallinordertofixasegmentationfault.
3.Themakefilesns-2.27/indep-utils/cmu-scen-gen/setdest/Makefile,ns-2.27/indep-utils/webtrace-conv/conv/Makefile,andns-2.27/indep-utils/webtrace-conv/dec/Makefile,
neededtobemodifiedinordertofixabuginISI'sdistribution.Thebugcausedacompile-timeerrorthatlookedlikethis:
g++-c-Dstand_alone-DSTL_NAMESPACE=@[email protected]../../../config.h:54,fromsetdest.h:5,fromsetdest.cc:57:../../../autoconf.h:85:Error:namespace`CPP_NAMESPACE'undeclaredsetdest.cc:71:1:warning:"INFINITY"redefinedInfileincludedfrom/usr/include/math.h:40,fromsetdest.cc:43:/usr/include/bits/mathdef.h:35:1:warning:thisisthelocationofthepreviousdefinitionmake[1]:***[setdest.o]Error1make[1]:Leavingdirectory`/home/iandow/netsim/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'make[1]:Enteringdirectory`/home/iandow/netsim/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
Tofixthebug,editns-2.27/indep-utils/cmu-scen-gen/setdest/Makefileandchangethisline:DEFINE=-Dstand_alone-DSTL_NAMESPACE=@STL_NAMESPACE@tothisline:DEFINE=-Dstand_alone-DSTL_NAMESPACE=@STL_NAMESPACE@-DCPP_NAMESPACE=std
Intheothertwomakefiles,append-DCPP_NAMESPACE=stdtoCFLAGS.
IdiscoveredthatfixbysearchingtheNSnewsdatabase[2]for"CPP_NAMESPACE".
REFERENCES:
[1]TheNetworkSimulator-ns-2,http://www.isi.edu/nsnam/ns/[2]NSnewsdatabase,http://www.isi.edu/nsnam/htdig/search.html</PRE>