how to broadcast packet in ns2.34?
using ns2.34 how to broadcast a packet to some nodes from a source node at a time? is it possible to do this using tcl file only or i need cc file also?
|
I go through these steps declare in the link below.
http://www.math.unipd.it/~cpalazzi/fastbroadcast.html and i follow all the instruction from this http://www.math.unipd.it/~cpalazzi/r...README_INSTALL (i found this link from the first link) But at last when i use the commands i get these... anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34$ make clean Makefile:335: *** commands commence before first target. Stop. anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34$ make depend Makefile:335: *** commands commence before first target. Stop. anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34$ make Makefile:335: *** commands commence before first target. Stop. anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34$ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ when i use the command ns broadcast.tcl i get these... anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34/tcl/ex$ ns broadcast.tcl noises car 5 src node 399 num_nodes is set 400 INITIALIZE THE LIST xListHead invalid command name "Agent/Broadcastbase" while executing "Agent/Broadcastbase create _o30 " invoked from within "catch "$className create $o $args" msg" invoked from within "if [catch "$className create $o $args" msg] { if [string match "__FAILED_SHADOW_OBJECT_" $msg] { delete $o return "" } global errorInfo error "class $..." (procedure "new" line 3) invoked from within "new Agent/Broadcastbase" (procedure "create_nodes" line 13) invoked from within "create_nodes" (file "broadcast.tcl" line 133) anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34/tcl/ex$ i could not understand where to save the broadcast.tcl file ??i save that file in the path anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34/tcl/ex$,,.... please help me. |
anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34$ make depend
make: *** No rule to make target `tcp/linux/tcp_naivereno.cc', needed by `depend'. Stop. anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34$ make g++ -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I. -I/home/anand/project/ns-allinone-2.34/tclcl-1.19 -I/home/anand/project/ns-allinone-2.34/otcl -I/home/anand/project/ns-allinone-2.34/include -I/home/anand/project/ns-allinone-2.34/include -I/home/anand/project/ns-allinone-2.34/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./diffserv -I./satellite -I./wpan -o tools/random.o tools/random.cc g++ -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I. -I/home/anand/project/ns-allinone-2.34/tclcl-1.19 -I/home/anand/project/ns-allinone-2.34/otcl -I/home/anand/project/ns-allinone-2.34/include -I/home/anand/project/ns-allinone-2.34/include -I/home/anand/project/ns-allinone-2.34/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./diffserv -I./satellite -I./wpan -o tools/rng.o tools/rng.cc g++ -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I. -I/home/anand/project/ns-allinone-2.34/tclcl-1.19 -I/home/anand/project/ns-allinone-2.34/otcl -I/home/anand/project/ns-allinone-2.34/include -I/home/anand/project/ns-allinone-2.34/include -I/home/anand/project/ns-allinone-2.34/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./diffserv -I./satellite -I./wpan -o tools/ranvar.o tools/ranvar.cc tools/ranvar.cc: In member function ‘virtual double GammaRandomVariable::value()’: tools/ranvar.cc:219:70: error: cannot call constructor ‘GammaRandomVariable::GammaRandomVariable’ directly [-fpermissive] tools/ranvar.cc:219:70: error: for a function-style cast, remove the redundant ‘::GammaRandomVariable’ [-fpermissive] make: *** [tools/ranvar.o] Error 1 anand@ubuntu:~/project/ns-allinone-2.34/ns-2.34$ these are my last lines...can you tell me what is wrong with it.?? |
← #3 .
`broadcast.tclŽ : Please read post #2 → → → fastbroadcast → http://www.linuxquestions.org/questi...-4175444102/#9 ... and unpack "fastbroadcast-ns229.patch.tar.gz" to know the file structure. ( ns-2.34 will have the same file structure.) HOWTO fastbroadcast, ns-2.34 : Start from scratch in a new folder in /home/name/ with a new unpacked ns-allinone-2.34.tar.gz. I.e. the failed result, ref. post #3, cannot be reused. Build example, Ubuntu : $ sudo apt-get install \ g++ g++-4.4 autoconf automake patch libtool libxmu-dev xgraph $ cd ns-allinone-2.34/ $ patch -p0 < otcl_ns234_gcc-4.4.patch https://drive.google.com/file/d/0B7S...ew?usp=sharing $ patch -p0 < fastbroadcast_ns234.patch https://drive.google.com/file/d/0B7S...ew?usp=sharing $ export CC=gcc-4.4 CXX=g++-4.4 && ./install $ cd ns-2.34/ $ sudo make install - |
I put the broadcast.tcl file in the fastbroadcast folder and then use the command: ns broadcast.tcl to run the tcl file but i am getting some error message like below:
anand@ubuntu:~/final/ns-allinone-2.34/ns-2.34/fastbroadcast$ ns broadcast.tcl noises car 5 src node 399 num_nodes is set 400 INITIALIZE THE LIST xListHead invalid command name "Agent/Broadcastbase" while executing "Agent/Broadcastbase create _o30 " invoked from within "catch "$className create $o $args" msg" invoked from within "if [catch "$className create $o $args" msg] { if [string match "__FAILED_SHADOW_OBJECT_" $msg] { delete $o return "" } global errorInfo error "class $..." (procedure "new" line 3) invoked from within "new Agent/Broadcastbase" (procedure "create_nodes" line 13) invoked from within "create_nodes" (file "broadcast.tcl" line 133) anand@ubuntu:~/final/ns-allinone-2.34/ns-2.34/fastbroadcast$ also want to know that whether i have to modify the broadcast.tcl file to generate the num file and run the simulator. |
← #6 .
Quote:
Did you add any ns2 *PATH text to .bashrc ? Please delete. 'ns' is hard coded to know the location of it's libraries. »invalid command name "Agent/Broadcastbase"« can also be a failed build. Quote:
if you follow the build rules in post #5. - |
sir,
what does the 'wrong executable ns' means? should i have to install in ns again in a new folder?. i did not change anything in .bashrc file. |
← #4 .
Quote:
'g++' is not to be used. Must be 'g++-4.4'. #8 : Please do : $ which ns - |
so where i have to change for 'g++-4.4' instead of 'g++'??
and my output is here for the comand '$ which ns' anand@ubuntu:~/final/ns-allinone-2.34/ns-2.34$ which ns /usr/local/bin/ns anand@ubuntu:~/final/ns-allinone-2.34/ns-2.34$ |
← #10 .
Quote:
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install |
but yess i have follwed your steps.and the command also.
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install but although i get that message again and again. |
# 12.
Please check ns-2.34/Makefile Line 36 - 37 should look like : CC = gcc-4.4 CPP = g++-4.4 - |
install in ns 2.35
is it possible to use this package in ns2.35?
|
Fastbroadcast, ns-2.35
Re #14, @banishedboy_s2.
Fastbroadcast, ns-2.35 : tar xvf ns-allinone-2.35_gcc482.tar.gz https://drive.google.com/file/d/0B7S...ew?usp=sharing patch -p0 < fastbroadcast_ns235.patch https://drive.google.com/file/d/0B7S...ew?usp=sharing ./install cd ns-2.35/ sudo make install cd fastbroadcast/ ../ns broadcast.tcl - |
All times are GMT -5. The time now is 03:04 PM. |