[ns] ns-2.34 validation tests fail (64bit-processor)

2012-08-09 Thread Behnaz Bostanipour

Hello, 

I successfuly installed ns2.34 on a MacOS(Lion). My Mac is a (Core i7-64bit 
processor). When I execute ./validate and these tests fail: 

validate overall report: some portable tests failed: 
./test-all-newreno ./test-all-sack ./test-all-tcpOptions ./test-all-tcpLinux 
./test-all-tcpHighspeed ./test-all-red ./test-all-cbq ./test-all-webtraf 
some non-portable tests also failed: 
./test-all-srm ./test-all-smac-multihop ./test-all-hier-routing 
./test-all-algo-routing ./test-all-mcast ./test-all-vc ./test-all-session 
./test-all-mixmode ./test-all-webcache ./test-all-mcache ./test-all-plm 
./test-all-wireless-tdma 
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME 

Do you know what should I do? I read in the official Nsnam Troubleshooting page 
that “ns-2 is known to have problems with some validation tests on certain 
platforms due to 64-bit problems”. I am not sure if theses tests fail because 
of the 64-bit processor but if it's the case is there a solution? 

Thanks in advance for your reply. 



[ns] Error while installing NS2.35 to Mac OS(Lion)

2012-08-09 Thread Behnaz Bostanipour

Hi all, 

I've downloaded ns-allinone-2.35 and extracted into the directory 
/Users/username/ (where username refers to my username on my Mac). 

Then, I run ./install and it fails to build OTcl-1.14, as you can see below: 


 
* Build OTcl-1.14 
 
No .configure file found in current directory 
Continuing with default options... 
checking build system type... i386-apple-darwin11.3.0 
checking host system type... i386-apple-darwin11.3.0 
checking target system type... i386-apple-darwin11.3.0 
checking for gcc... gcc 
checking for C compiler default output file name... a.out 
checking whether the C compiler works... yes 
checking whether we are cross compiling... no 
checking for suffix of executables... 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc accepts -g... yes 
checking for gcc option to accept ISO C89... none needed 
checking for g++... g++ 
checking whether we are using the GNU C++ compiler... yes 
checking whether g++ accepts -g... yes 
checking how to run the C preprocessor... gcc -E 
checking for grep that handles long lines and -e... /usr/bin/grep 
checking for egrep... /usr/bin/grep -E 
checking for ANSI C header files... yes 
checking for sys/types.h... yes 
checking for sys/stat.h... yes 
checking for stdlib.h... yes 
checking for string.h... yes 
checking for memory.h... yes 
checking for strings.h... yes 
checking for inttypes.h... yes 
checking for stdint.h... yes 
checking for unistd.h... yes 
checking for string.h... (cached) yes 
checking for main in -lXbsd... no 
checking for socket in -lsocket... no 
checking for gethostbyname in -lnsl... no 
checking for dcgettext in -lintl... no 
checking for getnodebyname in -ldnet_stub... no 
checking that g++ can handle -O2... no 
checking standard STL is available... no 
checking for tcl.h... -I../include 
checking for tclInt.h... -I../include 
checking for libtcl8.5... -L../lib -ltcl8.5 
checking for init.tcl... ../lib/tcl8.5 
checking for http.tcl... ../lib/tcl8.5/http1.0 
checking Tcl http.tcl library... yes 
checking for tclsh8.5.10... no 
checking for tclsh8.5... ../bin/tclsh8.5 
checking for tk.h... -I../include 
checking for libtk8.5... -L../lib -ltk8.5 
checking for tk.tcl... ../lib/tk8.5 
checking for X11 header files 
checking for X11 library archive 
checking for XOpenDisplay in -lX11... no 
checking for libXext.a 
checking for ranlib... ranlib 
checking for a BSD-compatible install... /usr/bin/install -c 
checking system version (for dynamic loading)... Darwin-11.3.0 
checking for dlopen in -ldl... yes 
No explicit static compilation flag; setting V_STATIC to  
no dynamic load lib 
checking system version (for system-dependent libraries)... Darwin-11.3.0 
checking for unistd.h... (cached) yes 
checking for a BSD-compatible install... /usr/bin/install -c 
configure: creating ./config.status 
config.status: creating Makefile 
creating ./gen 
creating ./bin 
rm -f libotcl.a otcl.o 
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -I. 
-I/Users/behnaz/ns-allinone-2.35/include 
-I/Users/behnaz/ns-allinone-2.35/include 
-I/Users/behnaz/ns-allinone-2.35/include -I/include  otcl.c 
otcl.c: In function ‘FindProc’: 
otcl.c:784: warning: cast to pointer from integer of different size 
otcl.c: In function ‘PrimitiveODestroyNoFree’: 
otcl.c:1008: warning: cast from pointer to integer of different size 
otcl.c: In function ‘OTclODestroyMethod’: 
otcl.c:1300: warning: cast from pointer to integer of different size 
ar cq libotcl.a otcl.o 
ranlib libotcl.a 
rm -f libotcl otcl.o so_locations 
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -fPIC -I. 
-I/Users/behnaz/ns-allinone-2.35/include 
-I/Users/behnaz/ns-allinone-2.35/include 
-I/Users/behnaz/ns-allinone-2.35/include -I/include  otcl.c 
otcl.c: In function ‘FindProc’: 
otcl.c:784: warning: cast to pointer from integer of different size 
otcl.c: In function ‘PrimitiveODestroyNoFree’: 
otcl.c:1008: warning: cast from pointer to integer of different size 
otcl.c: In function ‘OTclODestroyMethod’: 
otcl.c:1300: warning: cast from pointer to integer of different size 
o libotcl otcl.o 
make: o: No such file or directory 
make: [libotcl] Error 1 (ignored) 
rm -f libotcl 
gcc -o otclsh  -g -O2 -I. -I/Users/behnaz/ns-allinone-2.35/include 
-I/Users/behnaz/ns-allinone-2.35/include 
-I/Users/behnaz/ns-allinone-2.35/include -I/include  otclAppInit.c \ 
-L. -lotcl -L/Users/behnaz/ns-allinone-2.35/lib -ltk8.5 
-L/Users/behnaz/ns-allinone-2.35/lib -ltcl8.5 -L/usr/X11R6/lib -lXext -lX11  
-lm 
Undefined symbols for architecture x86_64: 
  _CFLocaleCopyCurrent, referenced from: 
  _TclpSetVariables in libtcl8.5.a(tclUnixInit.o) 
  _CFLocaleGetIdentifier, referenced from: 
  _TclpSetVariables in libtcl8.5.a(tclUnixInit.o) 
  _CFStringGetCString, referenced from: 
  _TclpSetVariables in 

[ns] Fwd: ns-2.34 validation tests fail (64bit-processor)

2012-08-29 Thread Behnaz Bostanipour

Hello Tom,

If you remember some ns-2.34 validation tests failed on my machine (MAC OS 
Lion, 10.7.3, Intel Core i7), so I installed ns-2-35 and still the validation 
failed for:

 ./test-all-tcpLinux ./test-all-tcpHighspeed/test-all-red ./test-all-cbq

Then you proposed that I send the output of ./validate  validate.log to you, 
but I have not yet received any news from you or some one else regarding this 
problem (so I forward my last email  again , see below). 

BTW, in your last email, you said that:

If you aren't using these specific models in your work, you have less to worry 
about.

I would like to do some simulations for IEEE 802.11 MAC layer and also use some 
routing protocols , for sure
that validation tests failures for TCP will not be a problem, my only concern 
is that these tests fail:

/test-all-red ./test-all-cbq

Do you think that will cause a problem for my simulations if I these models do 
not work properly on my machine?

Thanks in advance for your reply,
Kind regards,
Behnaz

Begin forwarded message:

 From: Behnaz Bostanipour behnaz.bostanip...@unil.ch
 Subject: Re: [ns] ns-2.34 validation tests fail (64bit-processor)
 Date: 10 août 2012 16:53:33 HAEC
 To: behnaz.bostanip...@unil.ch
 
 Thanks for your reply. If I understood well, I should execute this in my 
 terminal:
 
 ./validate  validate.log
 
 
 But this results to no output on the terminal and I cannot bring back the 
 command prompt unless by pressing (ctrl+c).
 
 Actually I found in folder /Users/username/ns-allinone-2.35/ns-2.35, a 
 validate.log that I send to you in the attachment.
 
 Although I don't think that it's relevant to failures of validation tests, 
 but actually I had to do some changes in install file in order to be able 
 to install both ns2.34 and ns2.35 on my machine (precisely my machine is a 
 10.7.3, Intel Core i7) . In fact with both versions of ns2, after running the 
 ./install I got this error:
 
 ld: symbol(s) not found for architecture x86_64 
 collect2: ld returned 1 exit status 
 make: *** [otclsh] Error 1 
 otcl-1.14 make failed! Exiting ...
 
 So wherever I had ./configure... in install file, I added the following:
 
  --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include 
 CFLAGS=-framework CoreFoundation 
 
 An example of my changes in install file can be found below (the line that 
 I added is bold):
 
 
 echo 
 echo * Build OTcl-$OTCLVER
 echo 
 
 cd ./otcl-$OTCLVER
 
 blame='Please check http://www.isi.edu/nsnam/ns/ns-problems.html
 for common problems and bug fixes.'
 if  [ ${test_cygwin} = true ]; then
 ./configure --x-libraries=/usr/X11R6/lib 
 --x-includes=/usr/X11R6/include --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER 
 --disable-shlib || die otcl-$OTCLVER configuration failed! Exiting ...;
   ..
 
 else
 ./configure --x-libraries=/usr/X11R6/lib 
 --x-includes=/usr/X11R6/include CFLAGS=-framework CoreFoundation 
 --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER || die otcl-$OTCLVER 
 configuration failed! Exiting ...;
 
  .
 fi
 
 cd ..
 
 # Build tclcl
 
 
 Just in case I send you my install file in the attachment.
 
 Thanks,
 Best,
 Behnaz
 
 On 10 août 2012, at 07:18, Tom Henderson wrote:
 
 
 On 08/09/2012 08:59 AM, behnaz.bostanip...@unil.ch wrote:
 Hi,
 
 Thanks for your reply. I installed ns2.35 and actually the
 majority of these problems are solved. But still these tests
 fail:
 
 validate overall report: some tests failed:
  ./test-all-tcpLinux ./test-all-tcpHighspeed
 /test-all-red ./test-all-cbq
 
 
 whith a closer look I noticed this error message for these
 tests:
 
 couldn't execute xgraph: no such file or directory
 
 This shouldn't cause validation errors.
 
 I don't have a 10.7 64-bit test machine at my disposal so I can't try to 
 reproduce at the moment.  I have 10.6.8 32-bit machine which doesn't 
 exhibit that.  I also have a newly-upgraded 10.8 64-bit machine, but 
 there are other issues related to X11 changes in Mountain Lion that, for 
 now, are blocking me to test it there.
 
 Anyway, I would suggest to send to me or post to the tracker [*] the 
 output of this:
 ./validate  validate.log
 so that someone can look at the specific errors reported.  If you aren't 
 using these specific models in your work, you have less to worry about.
 
 - Tom
 
 [*] http://sourceforge.net/tracker/?group_id=149743atid=775392
 
 
 



Re: [ns] ns-2.34 validation tests fail (64bit-processor)

2012-08-29 Thread Behnaz Bostanipour


On 29 août 2012, at 15:00, Tom Henderson wrote:

 
 Could you please send the full validate output?  It seems like the file you 
 sent is truncated at 2204 lines.
 


Thanks for your reply. I opened this one in my texShop and it has 7167  lines.
Best,
Behnaz


Re: [ns] ns-2.34 validation tests fail (64bit-processor)

2012-08-30 Thread Behnaz Bostanipour

Hello Tom,

Thanks for your reply. I put some comments on your email below:


On 30 août 2012, at 16:13, Tom Henderson wrote:

 
 On 08/29/2012 06:50 AM, behnaz.bostanip...@unil.ch wrote:
 I'm not able to reproduce that error, so I would like to
 see some  examples of the diffed output.  Would you mind
 collecting all of the  *.test output files for the tests
 that failed and send them to me in a  tarball, such as:
 
 cd tcl/tests
 find . -name *.test -type f | xargs tar cvfj
 ns-2-diffs.tbz2
 
 and send me the ns-2-diffs.tbz2 file?
 
 Thanks,
 Tom
 
 
 Here you are, I exactly execuuted your command, but not sure
 if it has all the outputs that we want (i.e., for tests:
 test-all-tcpLinux, test-all-tcpHighspeed, test-all-red
 and test-all-cbq.
 
 
 There seem to be a few things going on here.
 
 for the test-all-cbq and test-all-red files, the data seems correct but 
 the formatting is slightly off:  there are commas for periods in some of 
 the outputs.  e.g.
 
 test-output-red/flows-combined.test
 == flows_combined.test ==
 TitleText: test_flows_combined
 Device: Postscript
 
 flow  1
 84,8786 74,1902
 48,3181 46,8733
 
 vs. test-output-red/flows-combined (good output)
 TitleText: test_flows_combined
 Device: Postscript
 
 flow  1
 84.8786 74.1902
 48.3181 46.8733
 
 
 This may have something to do with the version of xgraph on the system.

Yes, if you look at the validation output, whenever a test fails , it says:

  couldn't execute xgraph: no such file or directory 


So, maybe I should do something about my graph, (e.g., reinstall it or …, do 
you have any suggestions?)


 
 for the tcpLinux and tcpHighspeed tests, there are lines missing (either 
 truncated, or interleaved in the test output) from the output when 
 compared to the reference output.  I don't know whether this is again a 
 post-processing error or whether the simulation is not producing the 
 same data.
 
 The test-output-xcp data is different:
 
 0.12186 420
 0.12186 420
 0.12186 420
 0.12228 8
 0.12228 8
 
 vs
 
 0.12186 420
 0.12186 420
 0.12186 420
 0.12228 819
 0.12228 819
 
 In summary, I would be suspicious of the use of the tcpLinux, 
 tcpHighspeed, and xcp models on this platform.  To debug this probably 
 requires to step through the code at the points where the output 
 diverge, using also a platform such as Linux that produces the reference 
 output.
 
 I don't have ns-2 running on Mountain Lion yet but I'll check whether 
 similar issues arise there.
 
 - Tom
 
 

As I explained in my last email, I would like to do some simulations for IEEE 
802.11 MAC layer and also use some routing protocols , I don't think that 
validation tests failures for TCP will not be a problem, my only concern is 
that these tests fail:

/test-all-red ./test-all-cbq

Do you think that will cause a problem for my simulations if I these models do 
not work properly on my machine?


Thanks,
Behnaz




[ns] NS2 development using Xcode IDE

2012-09-05 Thread Behnaz Bostanipour

Hello,

Has anybody used Xcode IDE for developing and running ns2 code on MAC OS? It 
would be nice to present a source that explains how one can do it.

Thanks in advance,
RGDS,
Behnaz



Re: [ns] NS2 development using Xcode IDE

2012-09-06 Thread Behnaz Bostanipour

Thank you for the link. But my question was mostly related to how people 
usually develop and run simulations.

I mean I can create  a .tcl file and run it using e.g., this command in the 
terminal:

ns  name of tcl file,

But I was wondering if one can use Xcode or another IDE instead,

Best,
Behnaz

On 5 sept. 2012, at 16:06, Stephan Lorenz wrote:

 see:  http://mailman.isi.edu/pipermail/ns-users/2011-February/069537.html 
 
 On Wed, Sep 5, 2012 at 9:14 AM, Behnaz Bostanipour 
 behnaz.bostanip...@unil.ch wrote:
 
 Hello,
 
 Has anybody used Xcode IDE for developing and running ns2 code on MAC OS? It 
 would be nice to present a source that explains how one can do it.
 
 Thanks in advance,
 RGDS,
 Behnaz
 
 



Re: [ns] ns 2.35/4 on MAC OS Mountain Lion (10.8)

2012-09-30 Thread Behnaz Bostanipour

Hi,

see this (works for both lion and mouton lion):

http://old.nabble.com/build-nam-on-mac-OSx-td34431429.html

Here is the url for the patch:

http://old.nabble.com/file/p34431582/install.osx.patch

Best,
Behnaz

On Sep 30, 2012, at 12:08 PM, bcaceiro bcace...@gmail.com wrote:

 
 
 Hello everyone, I've been having huge problems trying to install ns-2 on my
 mac. Since it always fails to compile for tcl, and I know is something
 related to x11 libraries . I have  installed xquartz, and Xcode( witih the
 command line tools) but probably is something about the path or the commands
 in the install file . Did anyone managed to install it  ?
 -- 
 View this message in context: 
 http://old.nabble.com/ns-2.35-4-on-MAC-OS-Mountain-Lion-%2810.8%29-tp34491383p34491383.html
 Sent from the ns-users mailing list archive at Nabble.com.
 



Re: [ns] ns 2.35/4 on MAC OS Mountain Lion (10.8)

2012-10-01 Thread Behnaz Bostanipour

Actually, the first line of the content of my .profile was truncated in the 
email, so here it is again:

export 
PATH=$PATH:/Users/behnaz/ns-allinone-2.35/bin:/Users/behnaz/ns-allinone-2.35/tcl8.5.10/unix:/Users/behnaz/ns-allinone-2.35/tk8.5.10/unix:/Users/behnaz/ns-allinone-2.35/nam-1.15/bin
export 
LD_LIBRARY_PATH=/Users/behnaz/ns-allinone-2.35/otcl-1.14:/Users/behnaz/ns-allinone-2.35/lib
export TCL_LIBRARY=/Users/behnaz/ns-allinone-2.35/tcl8.5.10/library

But basically, once you install the ns2, it is displayed in the terminal that 
you should configure these environment variables, and their exact values on 
your system are also given.

Best,
Behnaz



On Oct 1, 2012, at 3:50 PM, Bruno Caceiro bcace...@gmail.com wrote:

 Hello again, thanks for the help, though it didn't worked as I expected, 
 since I still get that ns isn't a command found for bash . I copied the code 
 you gave me , replacing my username, and , for instance the name of the 
 folder is ns-allinone--RC8, and I changed it all according to what you sent 
 me. Even made a .profile and saved it in My Users/bcaceiro. Or this profile 
 should be saved in the ns folder ?
 
 Thanks again for all the help provided .
 Best regards .
 
 2012/9/30 behnaz.bostanip...@unil.ch
 Well,I executed this in the directory
 /Users/behnaz/ns-allinone-2.35/ns-2.35:
 
 echo “PATH=/Users/behnaz/ns-allinone-2.35/bin:$PATH” 
 .bashrc
 
 where /Users/behnaz is the home directory, also, I created a
 ‘.profile’ in my home directory and I put the following
 inside it:
 
 export
 PATH=$PATH:/Users/behnaz/ns-allinone-2.35/bin:/Users/behnaz/ns-allinone-2.35/tcl8.5.10/unix:/Users/behnaz/ns-$
 
 export
 LD_LIBRARY_PATH=/Users/behnaz/ns-allinone-2.35/otcl-1.14:/Users/behnaz/ns-allinone-2.35/lib
 
 export
 TCL_LIBRARY=/Users/behnaz/ns-allinone-2.35/tcl8.5.10/library
 
 Best regards,
 Behnaz
 - Original Message -
 Expéditeur: bcaceiro bcace...@gmail.com
 à: ns-users@ISI.EDU
 Sujet: Re: [ns] ns 2.35/4 on MAC OS Mountain Lion (10.8)
 Date: Sun, 30 Sep 2012 09:06:24 -0700 (PDT)
 
  Hello it worked like charm , it compiled with no errors,
  but now how can I edit the bash profile to make it work ?
  since i tried to do like :ns example.tcl and it doesn't
  recognize anything ..
 
  bostanip wrote:
  
  
   Hi,
  
   see this (works for both lion and mouton lion):
  
  
  
  http://old.nabble.com/build-nam-on-mac-OSx-td34431429.html
   Here is the url for the patch:
  
   http://old.nabble.com/file/p34431582/install.osx.patch
  
   Best,
   Behnaz
  
   On Sep 30, 2012, at 12:08 PM, bcaceiro
   bcace...@gmail.com wrote:
  
  
   Hello everyone, I've been having huge problems trying
  to install ns-2 on  my
   mac. Since it always fails to compile for tcl, and I
  know is something  related to x11 libraries . I have
  installed xquartz, and Xcode( witih  the
   command line tools) but probably is something about the
  path or the  commands
   in the install file . Did anyone managed to install it
  ?  --
   View this message in context:
  
 
 http://old.nabble.com/ns-2.35-4-on-MAC-OS-Mountain-Lion-%2810.8%29-tp34491383p34491383.html
   Sent from the ns-users mailing list archive at
  Nabble.com. 
  
  
  
 
  --
  View this message in context:
 
 http://old.nabble.com/ns-2.35-4-on-MAC-OS-Mountain-Lion-%2810.8%29-tp34491383p34497283.html
  Sent from the ns-users mailing list archive at Nabble.com.
 
 
 
 
 -- 
 Bruno Caceiro
 



Re: [ns] Error while installing NS2.35 to Mac OS(Lion)

2012-10-05 Thread Behnaz Bostanipour
 install.osx.patch
 patch:  Can't open patch file install.osx.patch : No such file or
 directory
 
 
 Can you direct me to the patch or post it again?
 
 Would be grateful.
 
 NAmanquah
 
 Tom Henderson-2 wrote:
 
 
 
 On 08/08/2012 11:49 PM, Behnaz Bostanipour wrote:
 
 Hi all,
 
 I've downloaded ns-allinone-2.35 and extracted into the directory
 /Users/username/ (where username refers to my username on my Mac).
 
 Then, I run ./install and it fails to build OTcl-1.14, as you can see
 below:
 
 
 
 * Build OTcl-1.14
 
 No .configure file found in current directory
 Continuing with default options...
 checking build system type... i386-apple-darwin11.3.0
 checking host system type... i386-apple-darwin11.3.0
 checking target system type... i386-apple-darwin11.3.0
 checking for gcc... gcc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ISO C89... none needed
 checking for g++... g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether g++ accepts -g... yes
 checking how to run the C preprocessor... gcc -E
 checking for grep that handles long lines and -e... /usr/bin/grep
 checking for egrep... /usr/bin/grep -E
 checking for ANSI C header files... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 checking for string.h... (cached) yes
 checking for main in -lXbsd... no
 checking for socket in -lsocket... no
 checking for gethostbyname in -lnsl... no
 checking for dcgettext in -lintl... no
 checking for getnodebyname in -ldnet_stub... no
 checking that g++ can handle -O2... no
 checking standard STL is available... no
 checking for tcl.h... -I../include
 checking for tclInt.h... -I../include
 checking for libtcl8.5... -L../lib -ltcl8.5
 checking for init.tcl... ../lib/tcl8.5
 checking for http.tcl... ../lib/tcl8.5/http1.0
 checking Tcl http.tcl library... yes
 checking for tclsh8.5.10... no
 checking for tclsh8.5... ../bin/tclsh8.5
 checking for tk.h... -I../include
 checking for libtk8.5... -L../lib -ltk8.5
 checking for tk.tcl... ../lib/tk8.5
 checking for X11 header files
 checking for X11 library archive
 checking for XOpenDisplay in -lX11... no
 checking for libXext.a
 checking for ranlib... ranlib
 checking for a BSD-compatible install... /usr/bin/install -c
 checking system version (for dynamic loading)... Darwin-11.3.0
 checking for dlopen in -ldl... yes
 No explicit static compilation flag; setting V_STATIC to 
 no dynamic load lib
 checking system version (for system-dependent libraries)...
 Darwin-11.3.0
 checking for unistd.h... (cached) yes
 checking for a BSD-compatible install... /usr/bin/install -c
 configure: creating ./config.status
 config.status: creating Makefile
 creating ./gen
 creating ./bin
 rm -f libotcl.a otcl.o
 gcc -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -I.
 -I/Users/behnaz/ns-allinone-2.35/include
 -I/Users/behnaz/ns-allinone-2.35/include
 -I/Users/behnaz/ns-allinone-2.35/include -I/include  otcl.c
 otcl.c: In function ‘FindProc’:
 otcl.c:784: warning: cast to pointer from integer of different size
 otcl.c: In function ‘PrimitiveODestroyNoFree’:
 otcl.c:1008: warning: cast from pointer to integer of different size
 otcl.c: In function ‘OTclODestroyMethod’:
 otcl.c:1300: warning: cast from pointer to integer of different size
 ar cq libotcl.a otcl.o
 ranlib libotcl.a
 rm -f libotcl otcl.o so_locations
 gcc -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -fPIC -I.
 -I/Users/behnaz/ns-allinone-2.35/include
 -I/Users/behnaz/ns-allinone-2.35/include
 -I/Users/behnaz/ns-allinone-2.35/include -I/include  otcl.c
 otcl.c: In function ‘FindProc’:
 otcl.c:784: warning: cast to pointer from integer of different size
 otcl.c: In function ‘PrimitiveODestroyNoFree’:
 otcl.c:1008: warning: cast from pointer to integer of different size
 otcl.c: In function ‘OTclODestroyMethod’:
 otcl.c:1300: warning: cast from pointer to integer of different size
 o libotcl otcl.o
 make: o: No such file or directory
 make: [libotcl] Error 1 (ignored)
 rm -f libotcl
 gcc -o otclsh  -g -O2 -I. -I/Users/behnaz/ns-allinone-2.35/include
 -I/Users/behnaz/ns-allinone-2.35/include
 -I/Users/behnaz/ns-allinone-2.35/include -I/include  otclAppInit.c \
 -L. -lotcl -L/Users/behnaz/ns-allinone-2.35/lib -ltk8.5
 -L/Users/behnaz/ns-allinone-2.35/lib -ltcl8.5 -L/usr/X11R6/lib -lXext
 -lX11  -lm
 Undefined symbols for architecture x86_64

Re: [ns] what is the meaning of HDR_CMN?

2012-11-05 Thread Behnaz Bostanipour

Hi,

It is the common header for NS2 packets. I would suggest that you read the ns2 
manual or look here :

http://nile.wpi.edu/NS/

for this type of questions. 

Best,
Behnaz
On Nov 5, 2012, at 1:39 PM, shiny shiny@gmail.com wrote:

 
 hi frndz,
 what is the meaning of HDR_CMN? where this member function was defined in
 ns2.
 
 -- 
 With Regards,
 John Shiny.J




[ns] Broadcast a UDP packet using 802.11 MAC layer broadcast

2012-11-05 Thread Behnaz Bostanipour

Hello,

I would like a source node (n0) to broadcast CBR packets via UDP to  1 hop 
neighbors (n1,n2) in a in a wireless dhoc network.
One way, could be to attach the source to each destination as below:


set udp1 [new Agent/UDP] 
$ns attach-agent $n0 $udp1 

set src1 [new Application/Traffic/CBR] 
$src1 attach-agent $udp1 

set null1 [new Agent/Null] 
ns attach-agent $n1 $null1 
ns attach-agent $n2 $null1 

$ns connect $udp1 $null1 

$ns at 0.1 $src1 start 

$ns at 50 finish 

I think in this case the same packet at the mac layer is sent by unicasting 
once from n0 to n1 and once from n0 to n2. 

But, what if I would like to use a broadcast at MAC layer? I saw that in MAC 
header you actually can set the type to MAC_BROADCAST but I don't know how to 
force to use it when I send a CBR packet.

Thanks,
Behnaz



[ns] one hop Wireless Broadcast of CBR packets

2012-11-06 Thread Behnaz . Bostanipour

Hello,

I would like a source node (n0) to broadcast CBR packets via
UDP to  1 hop neighbors (n1,n2) in a wireless dhoc network.

I've tried the following solution:

One way, could be to attach the source to each destination
as below:


set udp1 [new Agent/UDP] 
$ns attach-agent $n0 $udp1 

set src1 [new Application/Traffic/CBR] 
$src1 attach-agent $udp1 

set null1 [new Agent/Null] 
ns attach-agent $n1 $null1 
ns attach-agent $n2 $null1 

$ns connect $udp1 $null1 

$ns at 0.1 $src1 start 

$ns at 50 finish 

But in this case the CBR packets are only recieved by node
n2. 

What should I do? Any help would be appreciated..
Thanks,
Behnaz



[ns] Where is the tcl implementation of FTP or CBR?

2012-11-07 Thread Behnaz . Bostanipour

Hi all,

Sorry for this easy question but I always have the same
problem when I want to find c++ or tcl implementation of an
ns2 element. Is there any source where I can find the path
of classes?


For instance, in which directory is the TCL class for FTP or
CBR?

Thanks in advance,
Behnaz




[ns] Implement a key-value list in TCL

2012-11-13 Thread Behnaz Bostanipour

Hi,

I need to make a key-value list  in TCL (where key is the time and value is the 
(x,y) coordinates of a mobile node).
However the command keyless of the tclX does not recognized in NS2 
environment and I can not use keyed list structure 
of tclX.

Do you have a code example or implementation of a key-value list  or a hash map 
in ns2 (TCL) side.

Thanks,
B.




Re: [ns] Fragmentation in SMAC

2012-11-19 Thread Behnaz . Bostanipour

Hi,

I do not know anything about SMAC, but usually if you have a
UDP agent connected to your CBR application, the
fragmantation is done by UDP. So, a UDP packet is by default
1000 bytes. if your CBR sends less than 1000 bytes to UDP,
the CBR bytes are put in one UDP packet and the packet is
sent to the MAC layer.

Hope this helps,
Best,
B. 
- Original Message -
Expéditeur: faraz iqbal faraz4...@yahoo.com
à: ns-users@isi.edu ns-users@ISI.EDU
Sujet: [ns] Fragmentation in SMAC
Date: Mon, 19 Nov 2012 05:40:22 -0800 (PST)

 Hi All
 
            I have CBR 512 kbps in tcl  but
it is not doing
 fragmentation in 50 byte per packet according to SMAC C++
 code. Further more, if i select CBR of 300 bytes then it
 has to show fragments of 50 bytes in trace file, means 6
 fragments (packets) of 50 bytes, Am i right.?
 
 
 How can i control fragmentation in smac.?
 
 please help.
  
 Regards
 
 
 Faraz



Re: [ns] Error Model

2012-11-25 Thread Behnaz . Bostanipour

Hello,

Personally I have not seen the use of Error Models in
Wireless Networks.
I thought that they are only used for modeling transmission
error in wired networks.

As I am also working on wireless networks, that would be
nice 
if you could send me the link for a wireless example in
which
an error  model is used.

Thanks,
Regards

- Original Message -
Expéditeur: Fazlullah Khan fazlullah@gmail.com
à: ns-users ns-users@ISI.EDU
Sujet: [ns] Error Model
Date: Mon, 26 Nov 2012 11:46:52 +0900

 Hi everybody!
 How to add NS2 built-in Error Models in Wireless Networks.
 I followed the NS example and some other tutorials but
 could not implement it.
 
 -- 
 Regards
 Fazlullah Khan
 Department of Electrical Electronics and Information
 Engineering, Nagaoka University of Technology, Nagaoka-shi
 , Niigata-ken, Japan Cell # +8180 3474 4286



Re: [ns] how to get value from .cc file to tcl script?????

2012-11-26 Thread Behnaz . Bostanipour

Hi,

Tcl tcl=Tcl::instance();
tcl.resultf(%1.1f,value);

where resultf(const char* fmt,...) uses the C++ format
“fmt” of printf to passe a string to the TCL
interpreter.

There are other functions similar to resultf. I am sure you
can find them easily on the Web.

Best,
Behnaz



- Original Message -
Expéditeur: itishi saxena itish...@yahoo.com
à: ns-users@ISI.EDU ns-users@ISI.EDU,
mohit.ni...@yahoo.com mohit.ni...@yahoo.com
Sujet: [ns] how to get value from .cc file to tcl
script?
Date: Tue, 27 Nov 2012 09:11:33 +0800 (SGT)

 Hello Friends,
 
 How it is possible to check a value of a parameter in the
 tcl script from a .cc code? e.g. in AODV i have declared a
 variable and assigning a value at certain point. I want
 tcl script can read that value so that I can perform some
 other operation in tcl script.
 
 I know use of bind( x_ , x) and it works like passing
 value from tcl to .cc, what if I want other way around
 from .cc to tcl??
 
 Any clue will be appreciated.
 
 with Regards.



[ns] Default Channel bandwidth in 802.11?

2012-12-02 Thread Behnaz Bostanipour

Hello,

I would like to calculate transmission time (tx_time) for packets sent by  CMU 
MAC 802.11.

Usually we have tx_time=packet size/channel bandwidth.

I looked in the ns-default.tcl file and I have found this value:

Phy/WirelessPhy set bandwidth_ 2e6

Is this the value used for calculation of tx_time by 802.11?

Thanks,
Behnaz



Re: [ns] Default Channel bandwidth in 802.11?

2012-12-02 Thread Behnaz . Bostanipour

Hello Saravanan, 
 
Thanks for your reply! 
 
Ok, I checked this function and basically and if I
understood correctly, 
in function sendData for broadcast packets we call
txtime() as below: 
 
ch-txtime() = txtime(ch-size(), basicRate_); 
 
 
So, roughly speaking the txtime for a broadcast data packet
is as following: 
 
txtime= plcp_hdr/plcpdataRate + datalength/dataRate_ 
 
where basicRate_=bandwidth_ according to 
implementation of constructor of mac-802.11.cc. 
 
But I still have some questions, that I would really be
greateful if you reply: 
 
1) How we know the value of bandwidth_ is Phy/WirelessPhy
set bandwidth_, I though that I should find something like
Mac 802.11 set bandwidth_ in ns-default.tcl 
 
2)How should I choose the value of basicRate_, if I would
like to set it my self? 
 
 
 
Thanks, 
Best regards, 
Behnaz
- Original Message -
Expéditeur: Saravanan Kandasamy svana...@gmail.com
à: ns-users@ISI.EDU ns-users@ISI.EDU
Sujet: Re: [ns] Default Channel bandwidth in 802.11?
Date: Sun, 2 Dec 2012 13:28:46 +

 Dear Behnaz,
 
 Looks like you don't quite understand how MAC 802.11
 works.
 
 Phy/WirelessPhy set bandwidth_ 2e6 will only be used if
 you have not set basicRate_ or dataRate_ in your MAC
 setup.
 
 Even so the transmission time does not do packet
 size/channel bandwidth, suggest you to study how
 Mac802_11::txtime(double psz, double drt) function works
 in mac-802.11.cc
 
 Good Luck.
 
 rgds
 Saravanan K
 
 On Sun, Dec 2, 2012 at 1:02 PM, Behnaz Bostanipour
 behnaz.bostanip...@unil.ch wrote:
 
  Hello,
 
  I would like to calculate transmission time (tx_time)
 for packets sent by  CMU MAC 802.11. 
  Usually we have tx_time=packet size/channel bandwidth.
 
  I looked in the ns-default.tcl file and I have found
 this value: 
  Phy/WirelessPhy set bandwidth_ 2e6
 
  Is this the value used for calculation of tx_time by
 802.11? 
  Thanks,
  Behnaz
 
 



[ns] call-back from mac-802.11.cc to interface queue

2012-12-03 Thread Behnaz Bostanipour

Hi all,


As I checked in mac-802.11.cc, it seems that interface queue only sends one 
packet at a time to MAC 802.11 (but i am not 100% sure) and it waits to dequeue 
and send the next packet to 802.11 MAC until a callback is triggered by 
mac-802.11.

So the call back is triggered by mac-802.11 in tx_resume()

oid
Mac802_11::tx_resume()
{
double rTime;
assert(mhSend_.busy() == 0);
assert(mhDefer_.busy() == 0);

if(pktCTRL_) {
….  }
} else if(pktTx_) {

….
}
}
} else if(callback_) {
Handler *h = callback_;
callback_ = 0;
h-handle((Event*) 0);
}
setTxState(MAC_IDLE);

}

am I right?

Thanks,
Behnaz



Re: [ns] Default Channel bandwidth in 802.11?

2012-12-03 Thread Behnaz Bostanipour

Hello,

Thanks for you reply but my question is :
 
 1) How we know the value of bandwidth_ is Phy/WirelessPhy
 set bandwidth_, I though that I should find something like
 Mac 802.11 set bandwidth_ in ns-default.tcl 

and

 
 2)How should I choose the value of basicRate_, if I would
 like to set it my self? 

I mean what are usually the values that we choose.

Best regards.
Behnaz


 - Original Message -
 Expéditeur: Saravanan Kandasamy svana...@gmail.com
 à: ns-users@ISI.EDU ns-users@ISI.EDU
 Sujet: Re: [ns] Default Channel bandwidth in 802.11?
 Date: Sun, 2 Dec 2012 13:28:46 +
 
  Dear Behnaz,
  
  Looks like you don't quite understand how MAC 802.11
  works.
  
  Phy/WirelessPhy set bandwidth_ 2e6 will only be used if
  you have not set basicRate_ or dataRate_ in your MAC
  setup.
  
  Even so the transmission time does not do packet
  size/channel bandwidth, suggest you to study how
  Mac802_11::txtime(double psz, double drt) function works
  in mac-802.11.cc
  
  Good Luck.
  
  rgds
  Saravanan K
  
  On Sun, Dec 2, 2012 at 1:02 PM, Behnaz Bostanipour
  behnaz.bostanip...@unil.ch wrote:
  
   Hello,
  
   I would like to calculate transmission time (tx_time)
  for packets sent by  CMU MAC 802.11. 
   Usually we have tx_time=packet size/channel bandwidth.
  
   I looked in the ns-default.tcl file and I have found
  this value: 
   Phy/WirelessPhy set bandwidth_ 2e6
  
   Is this the value used for calculation of tx_time by
  802.11? 
   Thanks,
   Behnaz
  
  
 
 
 



Re: [ns] problem in ns2.35 installation

2012-12-05 Thread Behnaz Bostanipour

Hello,

1) Please send your questions to the ns mailing list and not only to a specific 
user (in this case not only to me). So please do not repeat this.

2) There was a whole discussion regarding this problem in the mailing list, so 
I do not know which part of the discussion you have found, but 
briefly, a patch is written for installation of ns2-35 by Tom Henderson, here 
is the url for the patch:

http://old.nabble.com/file/p34431582/install.osx.patch

The attached workaround patch allows to build ns-allinone-2.35 on Mac 
OS X Mountain Lion 64-bit server. 

cd ns-allinone-2.35 
patch -p1 -i install.osx.patch 
./install 


Best regards,
Behnaz




On Dec 5, 2012, at 10:58 AM, Sandhya Aneja sandhya.an...@gmail.com wrote:

 Hello Behnaz,
 
 I am installing ns2.35 on MAC OS Lion, 10.7.3. I am not able to compile otcl 
 for which you have suggested following changes in install file. 
 
 if  [ ${test_cygwin} = true ]; then
  ./configure --x-libraries=/usr/X11R6/lib 
  --x-includes=/usr/X11R6/include --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER 
  --disable-shlib || die otcl-$OTCLVER configuration failed! Exiting ...;
  ..
  
  else
  ./configure --x-libraries=/usr/X11R6/lib 
  --x-includes=/usr/X11R6/include CFLAGS=-framework CoreFoundation 
  --with-tcl-ver=$TCLVER --with-tk-ver=$TKVER || die otcl-$OTCLVER 
  configuration failed! Exiting ...;
  
   .
 It is showing
 ./install: line 480: syntax error near unexpected token `else'
 ./install: line 480: `else'
 
 
 Please suggest what is the problem
 
 Thanks
 Sandhya
 



Re: [ns] Schedule the backoff timer in mac-802_11

2012-12-05 Thread Behnaz Bostanipour

Itishi - No, ack mechanism in 802.11 DCF is used for unicast packets, in this 
code  we are faced to mac broadcast, and there is no ack mechanism for mac 
broadcast regardless of version of ns2.

M. Falahati - i am also working on mac-802.11, the code is very complicated, 
as I understood :

About evolution of backoff timer:  as I see before calling 
Mac802_11::transmit(Packet *p, double timeout), in function 
Mac802_11::check_pktTx(), we call setTxState(MAC_SEND), this will cause:

inline void
Mac802_11::setTxState(MacState newState)
{
tx_state_ = newState;
checkBackoffTimer();
}

which will call:

Mac802_11::checkBackoffTimer()
{
if(is_idle()  mhBackoff_.paused())
mhBackoff_.resume(phymib_.getDIFS());
if(! is_idle()  mhBackoff_.busy()  ! mhBackoff_.paused())
mhBackoff_.pause();
}

so by this call of checkBackoffTimer(), I think we're in the second if and 
therefore mhBackoff_.pause() is called and backoff timer is paused during 
transmission.

Then, once packet is transmitted in Mac802_11::send_timer(), for broadcast 
packets we have:

case MAC_SEND:
RetransmitDATA();
break;

……
….

}
tx_resume();

so as you indicated in RetransmitDATA(), we have:

  rst_cw();
mhBackoff_.start(cw_, is_idle());

So  if  is_idle() == true, the call of mhBackoff_.start causes the backoff 
timer to start to count down; else it causes the timer to freeze. Here the 
state is still MAC_SEND so the timer will be still freezed.

Then in tx_resume() by call of setTxState(MAC_IDLE), we cause  
:mhBackoff_.resume(phymib_.getDIFS());.

So I think what you said is true, by I also do not understand why we should 
call  mhBackoff_.start(cw_, is_idle()) in retransmit data since the backoff 
timer is already freezed for the transmission.

I also do not understand what happens if in Mac802_11::check_pktTx(), the 
medium is always busy ? i mean do we backoff all the time as below?

if(! is_idle()) {
sendRTS(ETHER_ADDR(mh-dh_ra));
inc_cw();
mhBackoff_.start(cw_, is_idle());
return 0;
}
 Or is there a limit for the maximum number of back-off tries.

Hope this helps,
Best Regards,
Behnaz

 





On Dec 5, 2012, at 10:57 PM, itishi saxena itish...@yahoo.com wrote:

 
 For each transmission MAC waits for its ack if ack did not receive on 
 time...it retransmit at time assigned by backoff time... in ns-2.34, MAC 
 tries 7 times before declaring link break.
 
 
 I don't know that why is the following highlight line used in *
 Mac802_11::RetransmitDATA()* function?
 
 
 
 
 It is the function responsible for that retransmission...I m talknig about 
 ns-2.34...I hope mechanism is similar for ns-2.35.
 
 
 
 From: M Falahati md.falah...@gmail.com
 To: ns-users@ISI.EDU 
 Sent: Thursday, 6 December 2012 2:55 AM
 Subject: [ns] Schedule the backoff timer in mac-802_11
 
 
 Dear All,
 
 I'm studying on implementation of mac-802_11 in ns-2.35.
 
 I don't know that why is the following highlight line used in *
 Mac802_11::RetransmitDATA()* function?
 
 ==
 *if((u_int32_t)ETHER_ADDR(mh-dh_ra) == MAC_BROADCAST)
 {
 Packet::free(pktTx_);
 pktTx_ = 0;
 rst_cw();
 mhBackoff_.start(cw_, is_idle());
 return;
 }*
 ==
 
 I think that line runs following steps:
 1- it invokes *BackoffTimer::start()* that because of *idle* parameter is
 zero, then *pause*_ parameter will set to one.
 2- *tx_resume()* in the *Mac802_11::send_timer()* invokes
 *setTxState()*and changes
 *tx_state*  to  *MAC_IDLE* , then invokes *checkBackoffTimer()*.
 3- *checkBackoffTimer()* invokes *mhBackoff_.resume()* and backoff timer
 will schedule with [0-CWMin] + DIFS value.
 
 Are above steps true?
 If answer is true,is it necessary to start backoff timer (with value
 between [0-CWMin] + DIFS) after sending a broadcast packet?
 
 Sincerely Yours.



[ns] PriQueue queueing delay

2012-12-10 Thread Behnaz Bostanipour

Hi friends,

Is there a formula to calculate packet delay in a prioritized queue of a mobile 
node? I mean if a CBR connected to UDP, sends a pocket at rate r to a 
PriQueue, what is the queuing delay?

I know that a queue can only send down a packet if  (in this cases) the 
underlying MAC 802.11 does a call back , so queuing delay also depends on the 
basic rate_ or data rate_ of the mac layer and also the backoff interval.

Can somebody knows how should we see this process from the queuing theory or 
Kendall theorem?

Thanks,
Behnaz



[ns] Patch to install NS2.35 to Mac OS(Lion)/Mountain Lion

2012-12-17 Thread Behnaz Bostanipour

Hello,

Just by a deeper search you could find the link for the patch since it has been 
posted in this forum by me many times until now (last time was last week). So, 
I guess I send it for the very last time:

http://old.nabble.com/file/p34431582/install.osx.patch

you can find the instructions of how to use the patch for installation in my 
previous replies regarding this subject.

Best regards,
Behnaz




On Dec 17, 2012, at 10:39 PM, Fuat Basık fuatba...@gmail.com wrote:

 
 Hello Everyone,
 I also have the same problem.
 
 I will be happy if you can send patch to me?
 e-mail: fuatba...@gmail.com
 
 Thanks in advance.
 



[ns] Shadowing propagation model

2012-12-18 Thread Behnaz Bostanipour

Hi all,

As far as I understood we can use the shadowing propagation model for wireless 
simulation only with Mac/802_11Ext and not with Mac/802_11.
Am I right?

Thanks,
behnaz



[ns] Code example of using Mac/802_11Ext

2012-12-18 Thread Behnaz Bostanipour

Hi All,

Has any one a model of using Mac/802_11Ext?

Thanks,
Best,
Behnaz



[ns] Simulate 802.11b or g

2013-01-21 Thread Behnaz Bostanipour

Hi,

Does any body have an example of how should I put the parameters of 
Mac-802_11Ext or Mac_802_11 to implement 802.11 b or g?
I know that some patch written for this in ns-miracle but it seems complicated 
to use.

Thanks,
Behnaz



[ns] Is 802.11 multi rate only used for unicast in dei80211mr-1.1.4/nsmiracle?

2013-01-23 Thread Behnaz Bostanipour

Hello all,

I read somewhere that most network cards use multirate only in unicast mode and 
for broadcast they use only the basic rate (i.e., 1 or 2 Mbps in 802.11b/b+g, 
6Mbps in 802.11a/g).

Is it the case if in dei80211mr-1.1.4/nsmiracle implementation.

I would really appreciate your reply,
Thanks,
Behnaz


[ns] Parameters of 802.11Ext to simulate 802.11 b/g

2013-01-23 Thread Behnaz Bostanipour

Hello,

In ns2.35/tcl/ex/IEEE.802-11.a.tcl, we have the parameters to simulate 802.11a 
with 802.11Ext module. As I read in documentations of 802.11Ext, the parameters 
for 802.11 b/g should be set by the user. 

Below is the content of EEE.802-11.a.tc, I wonder if it is sufficient to only 
change these parameters to simulate 802.11 b/g.

Phy/WirelessPhyExt set CSThresh_6.31e-12;#-82 dBm Wireless 
interface sensitivity (sensitivity defined in the standard)
Phy/WirelessPhyExt set Pt_  0.001 
Phy/WirelessPhyExt set freq_5.18e+9
Phy/WirelessPhyExt set noise_floor_ 2.512e-13   ;#-96 dBm for 10MHz 
bandwidth
Phy/WirelessPhyExt set L_   1.0 ;#default radio 
circuit gain/loss
Phy/WirelessPhyExt set PowerMonitorThresh_  1.259e-13   ;#-99dBm power 
monitor  sensitivity
Phy/WirelessPhyExt set HeaderDuration_  0.20;#20 us
Phy/WirelessPhyExt set BasicModulationScheme_   0
Phy/WirelessPhyExt set PreambleCaptureSwitch_   1
Phy/WirelessPhyExt set DataCaptureSwitch_   0
Phy/WirelessPhyExt set SINR_PreambleCapture_2.5118; ;# 4 dB
Phy/WirelessPhyExt set SINR_DataCapture_100.0;  ;# 10 dB
Phy/WirelessPhyExt set trace_dist_  1e6 ;# PHY trace until 
distance of 1 Mio. km (infinty)
Phy/WirelessPhyExt set PHY_DBG_ 0

Mac/802_11Ext set CWMin_15
Mac/802_11Ext set CWMax_1023
Mac/802_11Ext set SlotTime_ 0.09
Mac/802_11Ext set SIFS_ 0.16
Mac/802_11Ext set ShortRetryLimit_  7
Mac/802_11Ext set LongRetryLimit_   4
Mac/802_11Ext set HeaderDuration_   0.20
Mac/802_11Ext set SymbolDuration_   0.04
Mac/802_11Ext set BasicModulationScheme_0
Mac/802_11Ext set use_802_11a_flag_ true
Mac/802_11Ext set RTSThreshold_ 2346
Mac/802_11Ext set MAC_DBG   0


In fact, 802.11a and 802.11b use OFDM and the signal is spread over 20 MHz 
while 802.11 b uses DSSS modulation and the signal is spread over 22 MHz but I 
do not know how to change these parameters.

Thanks,
Best regards,
Behnaz



[ns] How noise_floor_ is chosen for 802.11a

2013-02-05 Thread Behnaz Bostanipour

Hello,

I would like to use an implementation of 802.11a which can be found in file 
IEEE802-11a.tcl, under the directory:

.../ns-allinone-2.35/ns-2.35/tcl/ex/802.11

This implementation uses Phy/WirelessPhyExt and  Mac/802_11Ext of ns2. 

So, I read the documentation about 802.11a standard and also the code of 
Phy/WirelessPhyExt.cc. 

As I understood in implemtation of Phy/WirelessPhyExt.cc, there is no 
RXThreshold_ and there is a CSThreshold_ which is only used to inform the 
upper mac layer about the fact that the carrier is busy. But the decision to 
keep or drop a packet is made roughly speaking by the below comparisons:

if (Pr(or received signal power) / noise_floor_ =SNIR (of basic scheme) and if 
(Pr(or received signal power) / noise_floor_ =SNIR (of body modulation scheme)
then signal could be received.


Where basic scheme is a modulation scheme used for the header and the body 
scheme id the modulation scheme used for the body and which both by default are 
BPSK modulation with 1/2 coding rate.

So I have two questions:

1) By default in IEEE802-11a.tcl, the value of noise_floor_  is 2.512e-13  
which corresponds to -96 dBm for 10MHz bandwidth. I could not find how this 
value is set. Since, I could not find something which corresponds to the noise 
floor in the official documentation of 802.11a. Also, since 802.11a channel 
bandwidth is 20Mhz; should not we increase this value?

2) Is there a way in this model (i.e., Phy/WirelessPhyExt and  
Mac/802_11Ext ), to define the transmission range for a node? I guess it 
should be independent of CSThreshold_.

Thanks in advance for your time and consideration,
Behnaz





[ns] Nakagami, shadowing or Rayleigh RF model?

2013-02-07 Thread Behnaz Bostanipour

Hello,

Which RF model among one shadowing, Nakagami or Rayleigh are better for MANETs 
simulation in indoor and outdoor simulations?

 As I understood Nakagami is better for mobility situations and Vanet 
scenarios, but I do not know the exact difference between these models. Also I 
saw that Rayleigh is used for dense urban conditions, so it could also be an 
alternative instead of shadowing model.

Thanks in advance for the answer,
Behnaz
P.s. I read NS manual and did not find the comparaison.





[ns] BonnMotion and MAC-OS

2013-02-11 Thread Behnaz Bostanipour

Hi,

Just a question : have anybody tried to install and use BonnMotion on a MAC-OS.

Thanks,
Best,
behnaz



[ns] Create circular random topology for ad hoc wireless

2013-02-18 Thread Behnaz Bostanipour

Hello,

I would like to place randomly 1800 wireless nodes in a circle of radius 600m. 
How could I generate a circular random topology like this?

I would appreciate your reply,
Thanks,
Behnaz



[ns] reference distance for Shadowing propagation model

2013-02-20 Thread Behnaz Bostanipour

Hello,

By default the reference distance for shadowing model is 1. Which I suppose is 
1meter. I read the manual but it is not still clear to me how we choose 
distance? and How does it influence the reception power.

Thanks for your reply in advance,
Behnaz


[ns] what is antenna gain unit in ns2?

2013-04-24 Thread Behnaz Bostanipour

Hello, 

In ns2, default.tcl we have :

Antenna/OmniAntenna set Gt_ 1.0
Antenna/OmniAntenna set Gr_ 1.0

what is the unit of the gain? watts or dBm?

Thanks,
Behnaz



Re: [ns] received signal power

2013-06-27 Thread Behnaz Bostanipour

Hello,

It's called P_r and is usually calculated using a propagation model such as Two 
Ray Ground or shadowing.
You can find more details in the ns manual chapter radio propagation.

Best,
Behnaz
On Jun 27, 2013, at 10:51 PM, Fatma LOUATI fatma.lou...@gmail.com wrote:

 
 hi ns-users,
 How can I have the the power received at a destination?
 Is that done for the each paket?
 thkx




Re: [ns] received signal power

2013-06-27 Thread Behnaz Bostanipour

Well, you need to better study the propagation.cc and related source codes 
under ns-2/mobile/.
For example in propagation.cc and in all its subclasses there is a function 

double Propagation::Pr(PacketStamp *, PacketStamp *, WirelessPhy *)

which returns p_r given the packet and the wireless physical interface. 
Best,
Behnaz

On Jun 27, 2013, at 11:38 PM, Fatma LOUATI fatma.lou...@gmail.com wrote:

 hi,
 first of all thkx for your quick reply. I already know that but what I need 
 how I can print the power received during a simulation ?(2 nodes 1 source and 
 1 destination)
 thkx
 
 
 
 2013/6/27 Behnaz Bostanipour behnaz.bostanip...@unil.ch
 Hello,
 
 It's called P_r and is usually calculated using a propagation model such as 
 Two Ray Ground or shadowing.
 You can find more details in the ns manual chapter radio propagation.
 
 Best,
 Behnaz
 On Jun 27, 2013, at 10:51 PM, Fatma LOUATI fatma.lou...@gmail.com wrote:
 
 
  hi ns-users,
  How can I have the the power received at a destination?
  Is that done for the each paket?
  thkx
 
 



Re: [ns] MTU handling for 802.11 in NS2

2013-06-30 Thread Behnaz Bostanipour

Hello,

The default size of udp packets is defined in  ̃/ns /tcl/lib/ns-default.tcl as 
1000 bytes. Now, when udp receives a CBR packet it does this (Look at  
̃/ns/apps/udp.cc):

void UdpAgent::sendmsg(int nbytes, AppData* data, const char* flags)
{

Packet *p;
  int n;

if (size_)
 n = nbytes / size_;
 else
 printf(Error: UDP size = 0\n);
 
 if (nbytes == -1) {
 printf(Error:  sendmsg() for UDP should not be -1\n);
 return;
 }   
 
 // If they are sending data, then it must fit within a single packet.
 if (data  nbytes  size_) {
 printf(Error: data greater than maximum UDP packet size\n);
 return;
 }


 while (n--  0) {
 p = allocpkt();
hdr_cmn::access(p)-size() = size_;
hdr_rtp* rh = hdr_rtp::access℗;
 rh-flags() = 0;
 rh-seqno() = ++seqno_;
 hdr_cmn::access(p)-timestamp() = 
 (u_int32_t)(SAMPLERATE*local_time);
 // add beginning of talkspurt labels (tcl/ex/test-rcvr.tcl)
 if (flags  (0 ==strcmp(flags, NEW_BURST)))
 rh-flags() |= RTP_M;
 p-setdata(data);
 target_-recv(p);
 }
 n = nbytes % size_;
 if (n  0) {
 p = allocpkt();
 hdr_cmn::access(p)-size() = n;
 hdr_rtp* rh = hdr_rtp::access(p);
 rh-flags() = 0;
 rh-seqno() = ++seqno_;
 hdr_cmn::access(p)-timestamp() = 
 (u_int32_t)(SAMPLERATE*local_time);
 // add beginning of talkspurt labels (tcl/ex/test-rcvr.tcl)
 if (flags  (0 == strcmp(flags, NEW_BURST)))
 rh-flags() |= RTP_M;
 p-setdata(data);
 target_-recv(p);
 }
 idle();
 }

SO for each CBR packet of 1500 bytes it sends 2 udp packets. If you want no 
fragmentation, you should set the default size of udp packet in ns_default.tcl 
to 1500 bytes.

Best,
Behnaz

On Jun 30, 2013, at 3:15 AM, Dhrubojyoti Roy r...@cse.ohio-state.edu wrote:

 
 I've designed a routing protocol that works over 802.11 in NS2. I have 
 used a standard CBR source attached to a UDP agent to simulate traffic 
 in the network. I find that when I change the CBR packet-size to 1500 
 from 1000, the number of packets in the system doubles for the same data 
 rate; so there is fragmentation happening somewhere in the lower layers. 
 However, I'm unable to find the code segment that handles this 
 fragmentation in any of the C++ modules. I know that mac-802_3.h defines 
 an IEEE_8023_MAXFRAME, but I don't see an MTU defined in mac-802_11.h or 
 mac.h. So I'm curious as to how and where the data packets actually get 
 fragmented. Is it implemented in mac itself, or in the link/physical 
 layers? If someone could point me in the right direction, that would be 
 great.
 
 Thanks in advance,
 
 Dhrubo.
 
 -- 
 Dhrubojyoti Roy
 PhD Student (2nd year)
 Department of Computer Science and Engineering,
 The Ohio State University,
 2015 Neil Avenue,
 Columbus, OH-43210.
 +1-740-417-5890   
 



Re: [ns] How noise_floor_ is chosen for 802.11a

2013-07-02 Thread Behnaz Bostanipour

Hello,

I have recently received many emails sent only to my email address and not to 
ns-users mailing list, with questions regarding ns-2.

I would like to clarify this once for all:  please send your emails only to 
ns2 mailing list and stop spanning specific users like me
Ns2- mailing list is made so that you can share your questions with all 
ns2-users, and you will receive an answer if some one is wiling to send a reply 
to you. In this way, the reply could be seen by other users and will remain in 
the archive so it could be useful for other users who have the same question.



Thanks for you understanding,
Best regards,

On Jul 2, 2013, at 11:40 AM, Kriti Gupta kritigupt...@gmail.com wrote:

 hello sir 
 i am doing a project in manets i need to calculate throughput of tcp for 
 wired scenario and wireless scenario
  can u provide me the tcl script in ns2 for wired and wireless network and 
 awk script to calculate throughput for wired network.  plzzz help me as i am 
 new to this.
 
 
 On Fri, Jun 28, 2013 at 3:01 AM, Bostanip behnaz.bostanip...@unil.ch wrote:
 
 Well, after many months I know the answer. The noise floor is defined in the
 official documentation of 802.11a and corresponds to thermal noise of the
 system.
 
 
 
 --
 View this message in context: 
 http://network-simulator-ns-2.7690.n7.nabble.com/How-noise-floor-is-chosen-for-802-11a-tp26183p27187.html
 Sent from the ns-users mailing list archive at Nabble.com.
 
 



Re: [ns] reading a variable in aodv.cc from channel.cc and channel.h

2014-07-11 Thread Behnaz Bostanipour

Hi,

It's a segmentation fault since you create an uninitilized object 
WirelessChannel *tifp in your aodv class and after you call your function for 
this null object. Note that segmentation fault usually occurs when you call a 
function for a null object.

Thus, you should first initialize WirelessChannel *tifp to the channel 
object assicited to the aodv object.
See, you have a node where aodv is running and for this node you have an 
associated  physical layer and below the physical layer you have an associated 
channel.
I had a similar problem some time ago, where in application layer I wanted to 
access physical layer, so I used the code below:


//To enable packet discard writing
MobileNode* node_ = 
(MobileNode*)(Node::get_node_by_address(here_.addr_));
WirelessPhyExt* physicalLayer = 
(WirelessPhyExt*)(node_-ifhead()).lh_first;
physicalLayer-writePktDiscardToFile();

Note that I used WirelessPhyExt ( a variant of WirelessPhy) in my program 
so in your case you should replace it with WirelessPhy. 
Now in your case, you want to access the channel associated to the physical 
layer so as I saw in the ns2 library you need to get the channel_ object of 
the physical layer and then call your function for it.

I think this code should work to get the node object in the network layer 
(i.e., aodv), if this does not work, in any case you should find a way to 
access to the associated channel object of your node when adov is running.

Hope this helps,
Best regards,
Behnaz


On Jul 11, 2014, at 1:39 PM, Alireza Shamsoshoara a.shamsosho...@gmail.com 
wrote:

 
 Hello
 
 I'm working on my MS thesis and I want to use some value from a variable in
 channel.cc , this variable return the Pr and Pt , power of receiver and
 power of transmitter respectively. so i defined a variable (getvalue_)
 and a function (getvalue) in channel.h (channel header file) in this way:
 
 [channel.h :]
 
 class WirelessChannel : public Channel {
 
 public:
 ...
 WirelessChannel(void);
 double getvalue_;
 inline double getvalue() {return getvalue_;}
 
 }
 
 and also in channel.cc ,call the variable and equal it to the function that
 desire to read   :
 
 [channel.cc]
 
 void
 WirelessChannel::calcHighestAntennaZ(Phy *tifp)
 {
 ...
 getvalue_ = wifp-getPt();
 printf(P_t = %f\n,getvalue_);
 ...
 }
 it's noticable that getvalue_ is printed in channel.cc
 but when call the function getvalue in AODV.CC
 [AODV.cc]
 {
 
 void
 AODV::recvRequest(Packet *p) {
 ...
 WirelessChannel *tifp;
 double x=tifp-gethighestAntennaZ();
 printf(x = %f\n,x);
 double y=tifp-getvalue();
 printf(y = %f\n,y);
 ...
 }
 
 the value of x is printed in terminal but
 but for the getvalue function segmentation fault occur.
 
 what should i do to read a variable from other cc files? which part of
 above i was wrong that segmentation fault happened?
 
 Thanks in advance for your help.
 
 
 
 __
 
 Alireza Shamsoshoara, M.Sc.
 
 Faculty of Electrical and Computer Engineering (ECE)
 
 K.N.Toosi University of Technology
 
 Tehran, IRAN.