<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6783330</id><updated>2012-01-26T23:05:56.008-08:00</updated><title type='text'>NS-2.27 and Leach</title><subtitle type='html'>getting NS-2.27 and LEACH protocol to work with it.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6783330.post-109043360316430974</id><published>2004-07-21T11:01:00.000-07:00</published><updated>2004-07-21T11:13:23.166-07:00</updated><title type='text'></title><content type='html'>Problem: &lt;br /&gt;The current MTE code somehow is not able to get the DATA to the basestation.&amp;nbsp; I can clearly see that it sends the data to the next hop BS, but the basestation has no message that it received the message.&lt;br /&gt;&lt;br /&gt;Wanderings:&lt;br /&gt;Wondering if the mac address is wrong, and it needs to be a $MAC_BROADCAST, but apparently not.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;no idea.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-109043360316430974?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/109043360316430974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=109043360316430974' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/109043360316430974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/109043360316430974'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/07/problem-current-mte-code-somehow-is.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108972914812196448</id><published>2004-07-13T07:28:00.000-07:00</published><updated>2004-07-21T11:01:03.656-07:00</updated><title type='text'></title><content type='html'>Problem: &lt;br /&gt;The mte (dsdv or dsr) code won't run, because it's dependent on the variable $bs. however, $bs is only set in /mit/uAMPS/sim/uamps.tcl, which is sourced in leach.tcl. When leach.tcl is not being used, uamps.tcl is never run. However, one should not be able to just take it out and source it in wireless-leach.tcl, since it requires $opt(spreading) &lt;br /&gt;&lt;br /&gt;Solution: &lt;br /&gt;The MTE does run now, for whatever reason, but dsdv and dsr doesn't.&amp;nbsp; mte does source uamps.tcl, but the other two don't.&amp;nbsp; That's ok, I just need mte.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108972914812196448?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108972914812196448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108972914812196448' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108972914812196448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108972914812196448'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/07/problem-mte-dsdv-or-dsr-code-wont-run.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108972886454895282</id><published>2004-07-13T07:25:00.000-07:00</published><updated>2004-07-14T13:27:08.240-07:00</updated><title type='text'></title><content type='html'>Problem:&lt;br /&gt;The sample leach script is actually defunct when it comes to being able to switch between mte, dsdv, dsr, leach-c, etc.  Trying to get leach to work again, but I get this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;96: Current cluster-head is 66, code is 1,  dist is 22&lt;br /&gt;97: Current cluster-head is 66, code is 1,  dist is 13&lt;br /&gt;98: Current cluster-head is 66, code is 1,  dist is 25&lt;br /&gt;ns: _o217 send_now 0xffffffff   1 8 16 139.0 1: wrong # args: should be "_o217 self class proc mac_dst link_dst type msg data_size dist code"&lt;br /&gt;    (Application/LEACH send_now line 1)&lt;br /&gt;    invoked from within&lt;br /&gt;"_o217 send_now 0xffffffff   1 8 16 139.0 1"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It looks like some interface is different.  I didn't get this error before, and I don't know where it's coming from.&lt;br /&gt;&lt;br /&gt;Wading:&lt;br /&gt;Apparently, the offending piece of code is only at once place:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Application/LEACH instproc send_now {mac_dst link_dst type msg                                           data_size dist code} {&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;called by:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;  $ns_ at [$ns_ now]  "$self send_now $mac_dst       $link_dst $type $msg $data_size $dist $code"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After running the code with it printing out the parameters it was passing, in one instance, $link_dst became null for some reason, and that's why tcl thought there was an invalid number of arguments.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;8: Current cluster-head is 8, code is 1,  dist is 139.0&lt;br /&gt;9: Current cluster-head is , code is 1,  dist is 0&lt;br /&gt;10: Current cluster-head is 50, code is 2,  dist is 29&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Looking at node #9 in the snippet above, it ends up that the clusterheads weren't sending the ADV_CH (advertise clusterhead) message loud enough so that some nodes weren't able to hear it.  Thus, they did not select a clusterhead and thus, there was no link destination for the messages they were sending.&lt;br /&gt;&lt;br /&gt;Either the density of the nodes is too low, or that the power is too low.&lt;br /&gt;&lt;br /&gt;printing out the clusterhead choices, it seems like there are some that are missing:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;node 7 CH = 48&lt;br /&gt;node 7 choice = 52 37 97 70 77 92 67 2&lt;br /&gt;node 7 CH = 77&lt;br /&gt;node 7 choice = 52 37 97 70 77 92 67 2&lt;br /&gt;7: Current cluster-head is 77, code is 5,  dist is 10&lt;br /&gt;node 8 CH = 48&lt;br /&gt;node 8 choice = {} 52 37 97 70 77 92 67 2&lt;br /&gt;node 8 CH = &lt;br /&gt;node 8 choice = {} 52 37 97 70 77 92 67 2&lt;br /&gt;8: Current cluster-head is , code is 1,  dist is 0&lt;br /&gt;node 9 CH = 36&lt;br /&gt;node 9 choice = {} {} {} {} {} 52 37 97 70 77 92 67 2&lt;br /&gt;node 9 CH = &lt;br /&gt;node 9 choice = {} {} {} {} {} 52 37 97 70 77 92 67 2&lt;br /&gt;9: Current cluster-head is , code is 1,  dist is 0&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;CH 53 received data (8 , 28.98289012430514) from 8 at 29.015228248610278&lt;br /&gt;9 rcvd ADV_CH from  at 29.031284241486009&lt;br /&gt;9 clusterchoice: {}&lt;br /&gt;CH 75 received data (25 , 29.013674076469229) from 25 at 29.046012152938452&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It ends up that these nodes are somehow getting phantom blank messages during data transfer phase from node zero when node zero never sent them in the first place.  I guess I can assume that it's somewhere in the code, but when I grep for the command, I can only find one stance calling send.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;chungw1@CHUNGW1-WD1 ~/ns-allinone-2.27/ns-2.27&lt;br /&gt;$ grep 'send .* .* $ADV_CH' *&lt;br /&gt;mit/uAMPS/ns-leach.tcl:  $self send $mac_dst $link_dst $ADV_CH $msg $datasize $opt(max_dist) $code_&lt;br /&gt;mit/uAMPS/ns-leach.tcl~:  $self send $mac_dst $link_dst $ADV_CH $msg $datasize $opt(max_dist) $code_&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;&lt;br /&gt;I'll assume it's some weird glitch in ns that sends phantom messages, and will just proceed to make the receive function a bit smarter and just ignore all blank and anonymous messages.&lt;br /&gt;&lt;br /&gt;I changed&lt;br /&gt;&lt;br /&gt;&lt;quote&gt;      puts "$nodeID rcvd ADV_CH from $chID at [$ns_ now]"&lt;br /&gt;      set clusterChoices_ [lappend clusterChoices_ $msg]&lt;br /&gt;      set clusterDist_ [lappend clusterDist_ [[$self agent] set distEst_]]&lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;&lt;quote&gt;  # if statement is a patch to deal with phantom ADV_CH messages&lt;br /&gt;  if {$msg != ""} {&lt;br /&gt;      puts "$nodeID rcvd ADV_CH from $chID at [$ns_ now]"&lt;br /&gt;      set clusterChoices_ [lappend clusterChoices_ $msg]&lt;br /&gt;      set clusterDist_ [lappend clusterDist_ [[$self agent] set distEst_]]&lt;br /&gt;  } else {&lt;br /&gt;      puts "$nodeID rcvd PHANTOM ADV_CH &lt;$chID, $msg&gt; at [$ns_ now]"&lt;br /&gt;  }&lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A weakness in the current clusterhead based algorithm is that it depends on a somewhat uniform sensor field to create the network topology.&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108972886454895282?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108972886454895282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108972886454895282' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108972886454895282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108972886454895282'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/07/problem-sample-leach-script-is.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108344569389515297</id><published>2004-05-01T14:08:00.000-07:00</published><updated>2004-05-03T07:49:59.436-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;dst_ is deprecated&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;&lt;code&gt;Warning dst_ is no longer being supported in NS. dst_ 0xffffffff&lt;br /&gt;Use dst_addr_ and dst_port_ instead&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;I replaced:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; [$self agent] set dst_ $mac_dst&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;with this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;[$self agent] set dst_addr_ $mac_dst&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Port is assumed to be zero.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108344569389515297?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108344569389515297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108344569389515297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108344569389515297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108344569389515297'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/05/dst-is-deprecated-problem-warning-dst.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108344397618788517</id><published>2004-05-01T13:39:00.000-07:00</published><updated>2004-05-01T13:43:56.170-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Hella yeah it's running!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;hella yeah, the leach code is running now.  It's complaining about a depracated function, but I'll fix that later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108344397618788517?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108344397618788517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108344397618788517' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108344397618788517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108344397618788517'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/05/hella-yeah-its-running-hella-yeah.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108344392895451814</id><published>2004-05-01T13:38:00.000-07:00</published><updated>2004-05-01T13:43:08.950-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;data_ doesn't exist&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;Tcl files don't run cuz when it asks for the data for the base station app code, it complains that there's not $data_&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;Freaking, the number of nodes is set to 101, and that can't be changed to 5, the way I had it.  number of nodes passed in must be 101 for now.  don't know intricacies of what you'd need to do to change the base station's stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108344392895451814?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108344392895451814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108344392895451814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108344392895451814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108344392895451814'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/05/data-doesnt-exist-problem-tcl-files.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108343426603579180</id><published>2004-05-01T10:57:00.000-07:00</published><updated>2004-05-01T11:22:10.340-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Does ns-packet.tcl need to have changes?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Observation:&lt;br /&gt;'tcl/lib/ns-packet.tcl' format has changed.  now you can specify which protocols to load.&lt;br /&gt;&lt;br /&gt;&lt;quote&gt;"# By default, ns includes ALL packet headers of ALL protocols in ns in &lt;br /&gt;# EVERY packet in your simulation. This is a LOT, and will increase as more&lt;br /&gt;# protocols are added into ns. For "packet-intensive" simulations, this could&lt;br /&gt;# be a huge overhead."&lt;br /&gt;...&lt;clipped&gt;...&lt;br /&gt;# NOTICE THAT ADD-PACKET-HEADER{} MUST GO BEFORE THE SIMULATOR IS CREATED.&lt;br /&gt;#&lt;br /&gt;# To include only a specific set of headers in your simulation, e.g., AODV&lt;br /&gt;# and ARP, follow this pattern:&lt;br /&gt;#&lt;br /&gt;#   remove-all-packet-headers&lt;br /&gt;#   add-packet-header AODV ARP&lt;br /&gt;#   ... &lt;br /&gt;#   set ns [new Simulator]&lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108343426603579180?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108343426603579180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108343426603579180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108343426603579180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108343426603579180'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/05/does-ns-packet.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108343202874084022</id><published>2004-05-01T10:20:00.000-07:00</published><updated>2004-05-01T11:45:16.950-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Missing class variable RCALinkLayer::avoidReordering_ and RCALinkLayer::debug_&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;The creation of nodes is missing a variable that the program needs.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Creating sensor nodes...&lt;br /&gt;0 _o12 _o13 RCALinkLayer Mac/Sensor Queue/DropTail 100 Phy/WirelessPhy Antenna/OmniAntenna _o14 {} {} {}&lt;br /&gt;warning: no class variable RCALinkLayer::avoidReordering_&lt;br /&gt;&lt;br /&gt;        see tcl-object.tcl in tclcl for info about this warning.&lt;br /&gt;&lt;br /&gt;warning: no class variable RCALinkLayer::debug_&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Observation:&lt;br /&gt;Looking in tcl-object.tcl, I found the following comments:&lt;br /&gt;&lt;br /&gt;&lt;quote&gt;# warn if a class variable not defined&lt;br /&gt;# this is in a separate method so user can nop it&lt;br /&gt;#&lt;br /&gt;# In ns, this error happens for several possible reasons:&lt;br /&gt;#&lt;br /&gt;#	1. you bound a variable in C but didn't initialize it in tcl&lt;br /&gt;#		To fix:  put initialization code in tcl/lib/ns-default.tcl&lt;br /&gt;#		(and make sure that this code ends up compiled into your&lt;br /&gt;#		version of ns!)&lt;br /&gt;#&lt;br /&gt;#	2. You bound it in C and think you initialized it in Tcl,&lt;br /&gt;#		but there's an error in your class hierarchy&lt;br /&gt;#		(for example, the Tcl hierarchy name given in&lt;br /&gt;#		the XxxClass declaration in C++&lt;br /&gt;#		doesn't match the name used in the Tcl initialization).&lt;br /&gt;#&lt;br /&gt;#	3. you invoked something which assumed that something else had&lt;br /&gt;#		been built (for example, doing "new Node" without having&lt;br /&gt;#		first done "new Simulator")&lt;br /&gt;#		To fix:  do new Simulator (or whatever).&lt;br /&gt;#&lt;br /&gt;#	4. You created a split object from C++ (with new)&lt;br /&gt;#		rather than from Tcl.&lt;br /&gt;#		Nitin Vaidya &lt;Nitin.Vaidya@Eng.Sun.COM&gt; found this problem&lt;br /&gt;#		and suggested working around it either by avoiding&lt;br /&gt;#		binding the variable or invoking tcl to create the object.&lt;br /&gt;#		See the discussion at&lt;br /&gt;#		http://www-mash.cs.berkeley.edu/dist/archive/ns-users/9808/&lt;br /&gt;#		for more details.&lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;After grepping for it, I found the following note in Changes.html&lt;br /&gt;&lt;br /&gt;&lt;quote&gt;[Sally Floyd] &lt;br /&gt;Thu Mar 27 2003 &lt;br /&gt;Adding avoidReordering_ to DelayLink, set to true to avoid reordering when changing link bandwidth or delay. The code was contributed by Andrei Gurtov, and the validation test is in ./test-all-links in the directory tcl/test. The default is for avoidReordering_ to be false, for no change in past behavior. &lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;I added the default settings for RCALinklayer in tcl/lib/ns-default.tcl&lt;br /&gt;&lt;br /&gt;&lt;code&gt;# for MIT_uAMPS LEACH protocol&lt;br /&gt;RCALinkLayer set avoidReordering_ false&lt;br /&gt;RCALinkLayer set debug_ false&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;under the section for "Wireless simulation support"&lt;br /&gt;&lt;br /&gt;need to recompile after making the change.  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108343202874084022?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108343202874084022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108343202874084022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108343202874084022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108343202874084022'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/05/missing-class-variable.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108317907687663600</id><published>2004-04-28T12:04:00.000-07:00</published><updated>2004-05-01T10:09:39.496-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;proc add-interface changed its signature&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;The tcl code complains that the wrong number of arguments was inserted:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;0 _o12 _o13 RCALinkLayer Mac/Sensor Queue/DropTail 100 Phy/WirelessPhy Antenna/OmniAntenna # _o5 {} {} {}&lt;br /&gt;wrong # args: should be "_o17 self class proc channel pmodel lltype mactype qtype qlen iftype anttype topo inerrproc outerrproc fecproc"&lt;br /&gt;    (Object next line 1)&lt;br /&gt;    invoked from within&lt;br /&gt;"_o17 next _o12 _o13 RCALinkLayer Mac/Sensor Queue/DropTail 100 Phy/WirelessPhy Antenna/OmniAntenna # _o5 {} {} {}"&lt;br /&gt;    ("eval" body line 1)&lt;br /&gt;    invoked from within&lt;br /&gt;"eval $self next $args"&lt;br /&gt;    (procedure "_o17" line 15)&lt;br /&gt;    (MobileNode/ResourceAwareNode add-interface line 15)&lt;br /&gt;    invoked from within&lt;br /&gt;"$node add-interface $chan $prop $opt(ll) $opt(mac)   $opt(ifq) $opt(ifqlen) $opt(netif) $opt(ant)  #      $ns_ "" "" """&lt;br /&gt;    (procedure "leach-create-mobile-node" line 54)&lt;br /&gt;    invoked from within&lt;br /&gt;"leach-create-mobile-node $i"&lt;br /&gt;    invoked from within&lt;br /&gt;"if { [string compare $opt(rp) "dsr"] == 0} { &lt;br /&gt;        for {set i 0} {$i &lt; $opt(nn) } {incr i} {&lt;br /&gt;                dsr-create-mobile-node $i&lt;br /&gt;        }&lt;br /&gt;} elseif { [string compare $op..."&lt;br /&gt;    (file "./wireless-leach.tcl" line 246)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This is because the Node/MobileNode procedure add-interface in file tcl/lib/ns-mobilenode.tcl is different since 2.1b5.  The documentation hasn't been keeping up either.  The old signature is:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Node/MobileNode instproc add-interface { channel pmodel 		lltype mactype qtype qlen iftype anttype} &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The new signature is:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;Node/MobileNode instproc add-interface { channel pmodel lltype mactype 		qtype qlen iftype anttype topo inerrproc outerrproc fecproc}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;As you can see, there are four extra arguments tacked on the end, but I have no idea what those argument are, much less their type.  I'm guessing it's a topology object, some incoming error procedure, an outgoing error procedure, and a forward error correction procedure.&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;I grepped for 'proc channel':&lt;br /&gt;&lt;br /&gt;&lt;code&gt;gen/ns_tcl.cc:Simulator instproc channel {val} {$self set channel_ $val}\ngen/ns_tcl.cc:Simulator instproc channelType {val} {$self set channelType_ $val}\nBinary file gen/ns_tcl.o matches&lt;br /&gt;Binary file ns.exe matches&lt;br /&gt;tcl/lib/ns-lib.tcl:Simulator instproc channel {val} {$self set channel_ $val}&lt;br /&gt;tcl/lib/ns-lib.tcl:Simulator instproc channelType {val} {$self set channelType_ $val}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;strike&gt;Which makes me guess that since the only object that has a channel procedure is simulator, I assume $topo takes a Simulator object.&lt;/strike&gt;  There is a Topography object in ns2.  It makes more sense that this is what you pass in.  I'll have to check if it has a channel procedure though.&lt;br /&gt;&lt;br /&gt;Looking at the code within proc add-interface, I noticed the following lines were added:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;if {$inerrproc != ""} {&lt;br /&gt;		set inerr_($t) [$inerrproc]&lt;br /&gt;	}&lt;br /&gt;	set outerr_($t) ""&lt;br /&gt;	if {$outerrproc != ""} {&lt;br /&gt;		set outerr_($t) [$outerrproc]&lt;br /&gt;	}&lt;br /&gt;	set fec_($t) ""&lt;br /&gt;	if {$fecproc != ""} {&lt;br /&gt;		set fec_($t) [$fecproc]&lt;br /&gt;	}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;So I assume that I can pass in nothing and leach will still work, since it didn't need it before.  Therefore, in mit/uAMPS/sims/uamps.tcl, I changed &lt;br /&gt;&lt;br /&gt;&lt;code&gt;    $node add-interface $chan $prop $opt(ll) $opt(mac)        $opt(ifq) $opt(ifqlen) $opt(netif) $opt(ant)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;into:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;    $node add-interface $chan $prop $opt(ll) $opt(mac)        $opt(ifq) $opt(ifqlen) $opt(netif) $opt(ant)       &lt;strike&gt;$ns_&lt;/strike&gt;$topo "" "" ""&lt;/code&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108317907687663600?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108317907687663600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108317907687663600' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108317907687663600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108317907687663600'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/proc-add-interface-changed-its.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108308811384570348</id><published>2004-04-27T10:48:00.000-07:00</published><updated>2004-04-27T10:53:33.326-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Looking for TDMAschedule.*.txt&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;The rest of the tcl scripts that she wrote for leach has some directory pointing problems.  Those are easily fixable.  However, the script, uamps.tcl, asks for "TDMAschedule.*.txt", which I have no idea where to find them.&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;They were being deleted if they existed, not being created.  Error in the syntax of the catch statement.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;catch "eval exec rm [glob $opt(dirname)/TDMAschedule.*.txt]"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;changes to:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;catch {eval exec rm [glob $opt(dirname)/TDMAschedule.*.txt]}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This way, the eval statement is treated as an argument into catch, so that it doesn't error out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108308811384570348?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108308811384570348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108308811384570348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108308811384570348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108308811384570348'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/looking-for-tdmaschedule.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108248628815213294</id><published>2004-04-20T11:38:00.000-07:00</published><updated>2004-04-27T10:52:18.450-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;sample-wireless-script failed&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;The execution of the tcl script (wireless-leach.tcl--formerly wireless.tcl) to validate LEACH is failing.  Somehow, nodes aren't being defined.&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;"sample_leach_script" was originally written as a sh file.  Need to convert to bash file.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;set alg = leach&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;changes to:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;alg = "leach"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;etc, for the variable instanciations.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108248628815213294?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108248628815213294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108248628815213294' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108248628815213294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108248628815213294'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/sample-wireless-script-failed-problem.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108240191573142632</id><published>2004-04-19T12:11:00.000-07:00</published><updated>2004-04-20T11:35:45.420-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Some validation tests failed&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;The following validation files filed after compilation:&lt;br /&gt;&lt;br /&gt;./test-all-full ./test-all-wireless-shadowing ./test-all-wireless-lan-aodv ./test-all-wireless-tdma ./test-all-wireless-gridkeeper ./test-all-wireless-diffusion ./test-all-wireless-lan-newnode ./test-all-WLtutorial ./test-all-energy ./test-all-diffusion3 ./test-all-tagged-trace ./test-all-smac &lt;br /&gt;&lt;br /&gt;Explaination:&lt;br /&gt;The validation failed because the tcl script could not recognize the new MIT-uAMPS variables added into wireless-phy.cc.  Therefore, no output was generated for the test, and thus the test failed.  I don't think that it's THAT important to get these validations tests up and running, since the tests weren't designed for MIT-uAMPS in the first place.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108240191573142632?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108240191573142632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108240191573142632' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108240191573142632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108240191573142632'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/some-validation-tests-failed-problem.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108214894043042665</id><published>2004-04-16T13:55:00.000-07:00</published><updated>2004-04-16T13:59:40.233-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;IT COMPILES!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yay.  It compiles. :)  Now I'll have to run the validation tests on it.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108214894043042665?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108214894043042665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108214894043042665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214894043042665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214894043042665'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/it-compiles-yay.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108214796281515785</id><published>2004-04-16T13:39:00.000-07:00</published><updated>2004-04-16T13:43:22.170-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Missing Macros in packet.h&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;&lt;code&gt;mac/mac-sensor.cc: In member function `void MacSensor::send(Packet*, Handler*)&lt;br /&gt;   ':&lt;br /&gt;mac/mac-sensor.cc:106: error: `HDR_MACSensor' undeclared (first use this &lt;br /&gt;   function)&lt;br /&gt;mac/mac-sensor.cc:106: error: (Each undeclared identifier is reported only once &lt;br /&gt;   for each function it appears in.)&lt;br /&gt;make: *** [mac/mac-sensor.o] Error 1&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;Put the following missing macros in packet.h next to the other HDR macros:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;#ifdef MIT_uAMPS&lt;br /&gt;#define HDR_RCA(p)      ((struct hdr_rca*)(p)-&gt;access(hdr_rca::offset_))&lt;br /&gt;#define HDR_MACSensor(p)    ((struct hdr_macSensor*)(p)-&gt;access(hdr_mac::offset_))&lt;br /&gt;#endif&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108214796281515785?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108214796281515785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108214796281515785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214796281515785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214796281515785'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/missing-macros-in-packet.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108214743555166097</id><published>2004-04-16T13:30:00.000-07:00</published><updated>2004-04-16T13:52:53.716-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;log_target-&gt;buffer() changed&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;In the file rcagent.cc and bsagent.cc, log_target-&gt;buffer() is no longer being used&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;Guessing from common/mobilenode.cc, it probably changed to log_target_-&gt;pt_-&gt;buffer();  After looking at trace/trace.h and trace/basetrace.h, I'm pretty sure that it is.  Same applies for the log_target_-&gt;pt_-&gt;dump(); call.&lt;br /&gt;&lt;br /&gt;Changed&lt;br /&gt;&lt;br /&gt;&lt;code&gt;  sprintf(log_target-&gt;buffer(),&lt;br /&gt;    "C %.5f %s",&lt;br /&gt;    s.clock(),&lt;br /&gt;    msg);&lt;br /&gt;  log_target-&gt;dump();&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;&lt;code&gt;  sprintf(log_target_-&gt;pt_-&gt;buffer(), &lt;br /&gt;    "C %.5f %s",&lt;br /&gt;    s.clock(),&lt;br /&gt;    msg);&lt;br /&gt;  log_target_-&gt;pt_-&gt;dump();&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note: Remember to change rcagent.h's (and bsagent.h)class attribute definition of log_target to log_target_, and all other references to the old attribute name in rcagent.cc(and bsagent.cc)&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108214743555166097?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108214743555166097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108214743555166097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214743555166097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214743555166097'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/buffer-changeddump-call.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108214321778059837</id><published>2004-04-16T12:20:00.000-07:00</published><updated>2004-04-16T13:44:38.106-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Traces and what wrk_ attribute?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;Don't know which wrk_ attribute it's referring to.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;trace/cmu-trace.cc: In member function `void CMUTrace::format_rca(Packet*, int)&lt;br /&gt;   ':&lt;br /&gt;trace/cmu-trace.cc:1200: error: `wrk_' undeclared (first use this function)&lt;br /&gt;trace/cmu-trace.cc:1200: error: (Each undeclared identifier is reported only &lt;br /&gt;   once for each function it appears in.)&lt;br /&gt;make: *** [trace/cmu-trace.o] Error 1&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;the offending line is apparently:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;sprintf(wrk_ + offset, "------- [%c %d %d %d] ",&lt;br /&gt;	    op,&lt;br /&gt;	    rca_hdr-&gt;rca_src(),&lt;br /&gt;	    rca_hdr-&gt;rca_link_dst(),&lt;br /&gt;	    rca_hdr-&gt;rca_mac_dst()&lt;br /&gt;	    );&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Since ns2.1b5, wrk_ has been replaced by another pointer.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;sprintf(pt_-&gt;buffer() + offset, "------- [%c %d %d %d] ",&lt;br /&gt;	    op,&lt;br /&gt;	    rca_hdr-&gt;rca_src(),&lt;br /&gt;	    rca_hdr-&gt;rca_link_dst(),&lt;br /&gt;	    rca_hdr-&gt;rca_mac_dst()&lt;br /&gt;	    );&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;However, I'm not sure if the trace format is correct.  It should be...though there are other types of traces, such as pt_-&gt;tagged() and newtrace_, from looking at the other format functions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108214321778059837?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108214321778059837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108214321778059837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214321778059837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214321778059837'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/traces-and-what-wrk-attribute-problem.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108214287790110319</id><published>2004-04-16T12:14:00.000-07:00</published><updated>2004-04-16T12:20:51.950-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;A GOTO statement in wireless-phy.cc!?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;Wow.  I haven't seen these since GWBASIC.  A goto statement jumps over declarations in the MIT code.  &lt;br /&gt;&lt;br /&gt;&lt;code&gt;mac/wireless-phy.cc: In member function `virtual int &lt;br /&gt;   WirelessPhy::sendUp(Packet*)':&lt;br /&gt;mac/wireless-phy.cc:483: error: jump to label `DONE'&lt;br /&gt;mac/wireless-phy.cc:387: error:   from here&lt;br /&gt;mac/wireless-phy.cc:397: error:   crosses initialization of `int code'&lt;br /&gt;mac/wireless-phy.cc:393: error:   crosses initialization of `hdr_rca*rca_hdr'&lt;br /&gt;mac/wireless-phy.cc:392: error:   crosses initialization of `hdr_cmn*ch'&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;I just moved the declarations up to the top of the function before any goto statements.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;int &lt;br /&gt;WirelessPhy::sendUp(Packet *p)&lt;br /&gt;{&lt;br /&gt;	/*&lt;br /&gt;	 * Sanity Check&lt;br /&gt;	 */&lt;br /&gt;	assert(initialized());&lt;br /&gt;&lt;br /&gt;	PacketStamp s;&lt;br /&gt;	double Pr;&lt;br /&gt;	int pkt_recvd = 0;&lt;br /&gt;&lt;br /&gt;#ifdef MIT_uAMPS&lt;br /&gt;	hdr_cmn *ch = HDR_CMN(p);&lt;br /&gt;	hdr_rca *rca_hdr = HDR_RCA(p);&lt;br /&gt;	int code = rca_hdr-&gt;get_code();&lt;br /&gt;#endif&lt;br /&gt;	&lt;br /&gt;	// if the node is in sleeping mode, drop the packet simply&lt;br /&gt;	if (em()) &lt;br /&gt;...&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108214287790110319?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108214287790110319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108214287790110319' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214287790110319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214287790110319'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/goto-statement-in-wireless-phy.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108214235233432818</id><published>2004-04-16T12:05:00.000-07:00</published><updated>2004-04-16T12:12:45.950-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Change in wireless-phy.cc&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;&lt;code&gt;mac/wireless-phy.cc: In member function `virtual int &lt;br /&gt;   WirelessPhy::sendUp(Packet*)':&lt;br /&gt;mac/wireless-phy.cc:456: error: `getLoc' undeclared (first use this function)&lt;br /&gt;mac/wireless-phy.cc:456: error: (Each undeclared identifier is reported only &lt;br /&gt;   once for each function it appears in.)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;The uAMPs assumes that the node_ attribute is a MobileNode*, but when it's really of a base type, Node*.&lt;br /&gt;&lt;br /&gt;As a quick fix, I just cast it down to a MobileNode* like the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;dynamic_cast&amp;#60;MobileNode*&amp;#62(node_)-&gt;getLoc(&amp;tX, &amp;tY, &amp;tZ);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;generally bad practice, I know, but I'm only trying to patch it, and I'm pretty sure that the uAMPs code only deals with mobile nodes, so having it call getLoc() assuming a MobileNode isn't too bad...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108214235233432818?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108214235233432818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108214235233432818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214235233432818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108214235233432818'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/change-in-wireless-phy.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108213950567967555</id><published>2004-04-16T11:18:00.000-07:00</published><updated>2004-04-16T11:22:25.106-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Change in channel.cc&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;channel.cc should use removechnl() instead of deletechnl(&amp;[arg])&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108213950567967555?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108213950567967555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108213950567967555' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108213950567967555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108213950567967555'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/change-in-channel.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108212608098622846</id><published>2004-04-16T07:34:00.000-07:00</published><updated>2004-04-16T11:44:17.263-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Where to put #define MIT_uAMPS?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;Where do you put the #define MIT_uAMPS?  Without it, the additional files, such as mit/rca/rcagent.cc cannot compile, since it needs the additional definition of PT_RCA in common/packet.h&lt;br /&gt;&lt;br /&gt;&lt;code&gt;mit/uAMPS -o mit/rca/rcagent.o mit/rca/rcagent.cc&lt;br /&gt;mit/rca/rcagent.cc: In constructor `RCAgent::RCAgent()':&lt;br /&gt;mit/rca/rcagent.cc:33: error: `PT_RCA' undeclared (first use this function)&lt;br /&gt;mit/rca/rcagent.cc:33: error: (Each undeclared identifier is reported only once &lt;br /&gt;   for each function it appears in.)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Added #define MIT_uAMPS in:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;common/packet.h&lt;br /&gt;&lt;li&gt;common/tclAppInit.cc&lt;br /&gt;&lt;li&gt;removed all #defines and put in makefile&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;Figured out that defines can be put in Makefiles.  I simply added&lt;br /&gt;&lt;br /&gt;&lt;code&gt;DEFINE_MIT = -DMIT_uAMPS&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and added $(DEFINE_MIT) to the end of:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;DEFINE	= -DTCP_DELAY_BIND_ALL -DNO_TK @V_DEFINE@ @V_DEFINES@ @DEFS@ -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=@CPP_NAMESPACE@ -DUSE_SINGLE_ADDRESS_SPACE -Drng_test &lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108212608098622846?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108212608098622846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108212608098622846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108212608098622846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108212608098622846'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/where-to-put-define-mituamps-problem.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108206936937895081</id><published>2004-04-15T15:49:00.000-07:00</published><updated>2004-04-16T07:39:12.170-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Make is seg faulting&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;Make seg faults on &lt;br /&gt;&lt;br /&gt;&lt;code&gt;g++ -c  -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_8 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H  -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I/usr/X11R6/include -I/home/chungw1/ns-allinone-2.27/tclcl-1.15 -I/home/chungw1/ns-allinone-2.27/otcl-1.8 -I/home/chungw1/ns-allinone-2.27/include -I/home/chungw1/ns-allinone-2.27/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./mit/rcs -I./mit/uAMPS -o common/ptypes2tcl.o common/ptypes2tcl.cc&lt;br /&gt;g++  -o common/ptypes2tcl common/ptypes2tcl.o&lt;br /&gt;./common/ptypes2tcl &gt; gen/ptypes.cc&lt;br /&gt;Signal 11&lt;br /&gt;make: *** [gen/ptypes.cc] Error 139 &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;ptypes.cc is a generated piece of code during compile.  Because it somehow segs out, it never finishes writing the file.  On subsequent makes, I get Error 1, due to the incomplete file not being able to generate the *.o file.  &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;first search for #ifndef instead of #ifdef...no problems.&lt;br /&gt;&lt;li&gt;replacing changed files with original 2.27 files and recompile...success.&lt;br /&gt;&lt;li&gt;put back changed files without defining MIT_uAMPS and added $(OBJ_MIT) to the end of $(OBJ) in Makefile.in and recompile...success&lt;br /&gt;&lt;li&gt;./validate wireless-test...success&lt;br /&gt;&lt;li&gt;complete recompile...success&lt;br /&gt;&lt;li&gt;#define MIT_uAMPS and recompile...failed&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Semi-Fix:&lt;br /&gt;The problem was because I uncommented #ifdef MIT_uAMPS in packet.h to bypass a compile error, and it ended up seg faulting.  Man.  A day wasted.  See next post for real problem&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108206936937895081?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108206936937895081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108206936937895081' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206936937895081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206936937895081'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/make-is-seg-faulting-problem-make-seg.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108206914290722301</id><published>2004-04-15T15:45:00.000-07:00</published><updated>2004-04-16T07:15:48.936-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Incorporating Leach&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I thought about using the older version of ns2, but figured that it should be too hard to compile leach with the new version.  Besides, there are probably bug fixes that I would want to keep up with.  ns2 should have an easier way to incorporate new protocol, instead of modifying existing code.&lt;br /&gt;&lt;br /&gt;ns-2.1b5 is the last build LEACH was written for.  The directory structure of ns-2.1b5 is different from ns-2.27, and thus, some of the files go into different directories now.  Assuming a directory of ns2.27, The following files from the ns-2.27 will change with the LEACH protocol:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/apps/app.cc&lt;br /&gt;/apps/app.h&lt;br /&gt;/mac/channel.cc&lt;br /&gt;/trace/cmu-trace.cc&lt;br /&gt;/trace/cmu-trace.h&lt;br /&gt;/common/packet.cc&lt;br /&gt;/common/packet.h&lt;br /&gt;/mac/phy.cc&lt;br /&gt;/mac/phy.h&lt;br /&gt;/mac/wireless-phy.cc&lt;br /&gt;/mac/wireless-phy.h&lt;br /&gt;/mac/ll.h&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;These files are unchanged, even though they're included in the MIT_uAMPs distribution.  I found that it was unnecessary to incorporate these changes, because those changes had been accepted in ns2.27:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/mac/mac.cc&lt;br /&gt;/mac/mobilenode.cc&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The are new files that you will need to add.  I put them in the /mac subdirectory&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/mac/mac-sensor-timers.cc&lt;br /&gt;/mac/mac-sensor-timers.h&lt;br /&gt;/mac/mac-sensor.cc&lt;br /&gt;/mac/mac-sensor.h&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Instead of just copying the old files, I searched for &lt;br /&gt;&lt;br /&gt;&lt;code&gt;#ifndef MIT_uAMPS&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;to see where it is the leach made changes, and made the corresponding changes in the existing ns2.27 code.  I will post the new ns2.27 modified LEACH code later.&lt;br /&gt;&lt;br /&gt;The Makefile.in also changes.  I have added the following definitions:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;# MIT uAMP LEACH includes&lt;br /&gt;INCLUDES_MIT = 	-I./mit/rcs -I./mit/uAMPS&lt;br /&gt;&lt;br /&gt;# MIT additions&lt;br /&gt;#&lt;br /&gt;OBJ_MIT = 	mit/rca/rcagent.o mit/rca/rca-ll.o mit/rca/resource.o  	mit/rca/energy.o 	mac/mac-sensor-timers.o mac/mac-sensor.o mit/uAMPS/bsagent.o&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I added $(INCLUDES_MIT) to the end of the definition of $(INCLUDES) &lt;br /&gt;&lt;br /&gt;I also added $(OBJ_MIT:.o=.c) to the end of the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;SRC =&lt;br /&gt;	$(OBJ_C:.o=.c) $(OBJ_CC:.o=.cc)&lt;br /&gt; 	$(OBJ_EMULATE_C:.o=.c) $(OBJ_EMULATE_CC:.o=.cc)&lt;br /&gt; 	common/tclAppInit.cc common/tkAppInit.cc &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And added $(OBJ_MIT) to the end of the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;OBJ =	$(OBJ_C) $(OBJ_CC) $(OBJ_GEN) $(OBJ_COMPAT)&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108206914290722301?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108206914290722301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108206914290722301' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206914290722301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206914290722301'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/incorporating-leach-i-thought-about.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108206735350673286</id><published>2004-04-15T15:15:00.000-07:00</published><updated>2004-04-15T15:32:30.293-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Makefile of ns-allinone-2.27 flawed&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;When I go to remake ns-2.27 without any changes, it stops and complains about namespace errors.  &lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;I found this &lt;a href="http://mailman.isi.edu/pipermail/ns-users/2004-February/039232.html"&gt;post&lt;/a&gt; in the ns2 user mailing list addressing the problem, but I didn't want to change just the makefiles if I had to reconfigure.&lt;br /&gt;&lt;br /&gt;I found out how autoconf and automake works.  Basically, autoconf reads configure.in (or configure.ac) files to configure the Makefiles for platform specific compiles.  Makefile.in is the template to generate Makefiles, and there's one in every subdirectory.  The Makefile.in is wrong in the directories:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen&lt;br /&gt;ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec&lt;br /&gt;ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The line:&lt;br /&gt;&lt;code&gt;CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@ &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;should be changed to:&lt;br /&gt;&lt;code&gt;CFLAGS = @V_CCOPT@ -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=@CPP_NAMESPACE@&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;in all Makefile.in in the aforementioned directories.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108206735350673286?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108206735350673286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108206735350673286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206735350673286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206735350673286'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/makefile-of-ns-allinone-2.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108206741244715496</id><published>2004-04-15T15:11:00.000-07:00</published><updated>2004-04-15T15:24:28.310-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Cannot simply use ./configure&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Problem:&lt;br /&gt;I don' t know if this is Cygwin specific or not, but I found that while the install file installs correctly, ./configure does not run correctly in the ns-2.27 directory.  &lt;br /&gt;&lt;br /&gt;Fix:&lt;br /&gt;I looked at the ./install file in the top-level directory, ns-allinone-2.27, and looked at the ./install file.  I found that there are options that needed to be passed into ./configure in the ns-2.27 subdirectory to make it work.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;./configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include&lt;/code&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108206741244715496?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108206741244715496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108206741244715496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206741244715496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206741244715496'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/cannot-simply-use.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108206665169860101</id><published>2004-04-15T15:04:00.000-07:00</published><updated>2004-04-15T15:08:10.093-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Where to get ns2&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can get the software and installation tutorials at the following places:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.isi.edu/nsnam/ns/"&gt;ns-2&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www-mtl.mit.edu/research/icsystems/uamps/research/leach/leach_code.shtml"&gt;uAMPs/Leach&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm currently using Cygwin.  It's not necessary for the operation of ns-2&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cygwin.com"&gt;Cygwin&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.sims.berkeley.edu/~christin/ns-cygwin.shtml"&gt;Cygwin/ns2 installation tutorial&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108206665169860101?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108206665169860101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108206665169860101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206665169860101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206665169860101'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/where-to-get-ns2-you-can-get-software.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6783330.post-108206598721510437</id><published>2004-04-15T14:53:00.000-07:00</published><updated>2004-04-15T15:50:22.793-07:00</updated><title type='text'></title><content type='html'>&lt;b&gt;Purpose of Blog&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This is so that I can keep track of the knowledge I've acquired in using the ns2 software.  And also if anyone else that needs to know this information.  If you mess up your life from the info you gleamed off of here, I'm not responsible.  Use at your own risk.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6783330-108206598721510437?l=ns2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ns2.blogspot.com/feeds/108206598721510437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6783330&amp;postID=108206598721510437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206598721510437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6783330/posts/default/108206598721510437'/><link rel='alternate' type='text/html' href='http://ns2.blogspot.com/2004/04/purpose-of-blog-this-is-so-that-i-can.html' title=''/><author><name>Wil C</name><uri>http://www.blogger.com/profile/03696320260631888445</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
