2
<PRE> TITLE:InstallingNRL'sSensorNetworkextensionstoNS-2.27 AUTHOR:IanDownard<[email protected]> DATE:April2004 ABSTRACT: Theseinstructionsd escribehowtoinstallt hecodenecessaryforsim ulating sensornetworksint heNetworkSimulator,version2.27,distributedbythe InformationSciences InstituteattheUSCSc hoolofEngineering[1]. QUICKANDDIRTYINSTALLATION: Downloadnrlsensorsim-2.27.tgz. Ascripthasbeenwr ittentoautomaticallyp atchthens-2.27.Thatsc riptis called"patch_script -2.27.sh",andmustberunfromthenrlsensorsim-2.27/ directory,whichin turnmustbelocatedin thesamedirectorythath asthe ns-allinone-2.27directory.Sohere'stheprocedure: tar-xzvfns-allinone-2.27.tgz tar-xzvfnrlsensorsim-2.27.tgz cdnrlsensorsim-2.27/ ./patch_script-2.27.sh cd../ns-allinone-2.27/ ./install Ourextensionstons -2.27donotyetinclude supportfortheNRLOLSR routing algorithm.Ifyoud esireNRLOSLR,download ourpatchesforns-2.26. PATCHINGSUMMARY: SomeofISI'senhancementsaddedtons-2.27wereremovedinordertoforcein compatibilitywithour sensornetworkextensio ns.Thesideeffectsof our hacksarenotyetunderstood.Usersshouldcorroboratetheirsimulation resultsasmuchaspossiblewithearlierversionsofns. PATCHINGDETAILS: Herearetheproblems I'vefixedwithns-2.27 (firsttwoareinmac/cha nnel.cc): 1.WirelessChannel::se ndUpcontainsanelsest ructurewithlist-based improvements.Ireve rtedthatelsestructure backtowhatitwasin2 .26. Withoutthismodifi cation,PHENOMpacketsw illnevergetreceived. 2.WirelessChannel::updateNodesListcontainsa calltosortLists().I removed thatcallinordertofixasegmentationfault. 3.Themakefiles ns-2.27/indep-utils/cmu-scen-gen/setdest/Makefile, ns-2.27/indep-utils/webtrace-conv/conv/Makefile,and ns-2.27/indep-utils/webtrace-conv/dec/Makefile,

Install 2.27

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>