Hi Faraz, You need to recompile ns2, so that the changes taken into effect by using
make clean make sudo make install Moreover, it may happen that the printf that you inserted may not be encountered by the program pointer. I mean, you need to put prinft in the appropriate position of the mac protocol (cf. the pdf below for mac). http://www.cs.binghamton.edu/~kliu/research/ns2code/note.pdf<http://www.cs.binghamton.edu/%7Ekliu/research/ns2code/note.pdf> Hope it helps Regards Mubashir Husain Rehmani Lip6, UPMC, Paris, France On 17 May 2010 15:54, Syed Faraz Hasan <faraz_hasa...@email.ulster.ac.uk>wrote: > > Hi NS2 Users, > > I am trying to make some changes in the NS2 source files, attempting to > modify the scan procedure in the 802.11 network simulations. I added an > extra "printf" command in the mac/mac-802_11.cc and saved the changes. When > I am running the tcl code for 802.11 infrastructure networks, it is not > printing the extra message. This was just a simple check to see if the > changes are working but it failed. > Can anyone tell me how a source file is changed in NS2? > > Thanks, > Faraz > -- Mubashir Husain Rehmani