AODV+ patch in ns2.35

302 views
Skip to first unread message

lijan...@gmail.com

unread,
Nov 24, 2017, 12:03:28 PM11/24/17
to Network Simulator 2 (NS2)
I have an aodv+ patcher for ns2.35 and I have compy in ns-allinone-2.35 director,  but when i try to patch using the command patch p0 <AODV+__ns235.patch  it gives me an error the
 AODV+__ns235.patch no file directory 
what is wrong with the process
thank you
Message has been deleted
Message has been deleted
Message has been deleted

knudfl

unread,
Nov 24, 2017, 12:27:42 PM11/24/17
to Network Simulator 2 (NS2)
@lijan ,  Hi.

The patch must be present inside ns-allinone-2.35/ :
tar xvf ns-allinone-2.35_gcc5.tar.gz
https
://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
cd ns
-allinone-2.35/
patch
-p0 < AODV+__ns235.patch
https
://drive.google.com/file/d/0B7S255p3kFXNRW0xTHpKMDV2bzQ/view?usp=sharing
./install
cd ns
-2.35/
cp ns ns235
-aodv+
sudo cp ns ns235
-aodv+ /usr/local/bin/

.............................. Simulation ...........................
$ ns235-aodv+ wired_wireless_ex.tcl
etc. example https://drive.google.com/file/d/1Nb5lWGgvoxA6vg3hRXDPX7dmC8TZE-Hy/view?usp=sharing

lijan...@gmail.com

unread,
Nov 25, 2017, 4:40:13 AM11/25/17
to Network Simulator 2 (NS2)
 Thank you, sir, you made my day thank you very much

knudfl

unread,
Nov 25, 2017, 5:25:02 AM11/25/17
to Network Simulator 2 (NS2)

Angesom Alemayo

unread,
Dec 1, 2017, 8:04:25 AM12/1/17
to Network Simulator 2 (NS2)
I come back again, in the AODV+ ns-2.35 patch, there is no packet received to the destination, I have no understood why the packet not received in the destination?
thank you

knudfl

unread,
Dec 1, 2017, 12:23:20 PM12/1/17
to Network Simulator 2 (NS2)
@Angesom Alemayo.

Don't know why "no packet received".  Where do you observe "no packet received at destination" ?
See my results ...
https://drive.google.com/file/d/1Nb5lWGgvoxA6vg3hRXDPX7dmC8TZE-Hy/view?usp=sharing

Mehrdad Babaei

unread,
Dec 17, 2017, 3:35:50 AM12/17/17
to Network Simulator 2 (NS2)
hi friend .   I have N-CBRP.tar but i dont khnow how can in install  and use it on ns2 . would you pleas help me?

knudfl

unread,
Dec 17, 2017, 7:40:40 AM12/17/17
to Network Simulator 2 (NS2)
@Mehrdad Babaei ,   Hi.

Please upload  "N-CBRP.tar"  to 'Google Drive', and post a shared link.
....   I.e.  "N-CPRP" is an unknown version.

If you mean "ns-cbrp" ... then please read my post of  `24 Nov 2017´.

Mehrdad Babaei

unread,
Dec 18, 2017, 12:14:21 AM12/18/17
to Network Simulator 2 (NS2)
Hello, thank you for your answer.
I downloaded the file from  http://www.comp.nus.edu.sg/~tayyc/cbrp/
>> http://www.comp.nus.edu.sg/~tayyc/cbrp/cbrp.tar.gz
But I do not know how to set it up.and i dont Know how can I run an example on it.
Is there a newer version for it? If there is how can i use that.
Thank you very much

knudfl

unread,
Dec 18, 2017, 3:38:02 AM12/18/17
to Network Simulator 2 (NS2)
@Mehrdad Babaei.

Sorry, got confused. This is not a CBRP thread, but about AODV+.
Don't know why you are asking a CBRP question here.

»» Know how can I run an example on it. ««
Please share your example :  Attach the file.


CBRP, ns-2.33 :
tar xvf ns-allinone-2.33.tar.gz
cd ns
-allinone-2.33/
patch
-p0 < cbrp-2007_ns233.patch
https
://drive.google.com/file/d/0B7S255p3kFXNbGs3Tmx1bnRIUEk/view?usp=sharing
export CC=gcc34 CXX=g++34 && ./install
cd ns
-2.33/
cp ns ns233
-cbrp
sudo cp ns233
-cbrp /usr/local/bin/

-------------------  Simulation  ---------------------------
$ ns233-cbrp C-CBRP-kartiksd.tcl
... etc. examples cbrp-examples-1.tar.gz https://drive.google.com/file/d/1Igv20iZZY3xWBDPKShyvCpZ9e2Zo5Fhi/view?usp=sharing
  • Compilers gcc34, g++34 : Ubuntu (16.04) - amd64 example →
gcc34 https://drive.google.com/file/d/0B7S255p3kFXNRTkzQnRSNXZ6UVU/view?usp=sharing
g++34 https://drive.google.com/file/d/0B7S255p3kFXNV3J3bnVoWGNWdG8/view?usp=sharing
... Download and install :
cd Downloads/
sudo gdebi compat
-gcc34-3.4.6-ubuntu1204-1_amd64.deb       ( Ubuntu 12.* ... 17.* - 64 )
sudo gdebi compat
-gcc-34-c++_3.4.6-20_amd64.deb            ( All 64bit Ubuntu versions )

Mehrdad Babaei

unread,
Dec 18, 2017, 6:31:23 AM12/18/17
to Network Simulator 2 (NS2)
thank,s  You are right. Your was talk  about َ AODV+ and I entered the wrong . However, you answered, and I thank you very much

Mehrdad Babaei

unread,
Dec 19, 2017, 5:22:56 AM12/19/17
to Network Simulator 2 (NS2)
Hi sir  sorry i came back. about ns-cbrp. as  You already said، when i run "export CC=gcc34 CXX=g++34 && ./install" for install ns2.33 on ubuntu 12.04  i recived this error
root@ubuntu:~/ns-allinone-2.33# export CC=gcc34 CXX=g++34 && ./install
============================================================
* Testing for Darwin (OS X) environment
============================================================
============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Testing for FreeBSD environment
============================================================
FreeBSD not detected
============================================================
* Build XGraph-12.1
============================================================
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
checking if malloc debugging is wanted... no
checking for gcc... gcc34
checking whether the C compiler (gcc34  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make: *** No targets specified and no makefile found.  Stop.
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
Making cweb
gcc -g   -c -o ctangle.o ctangle.c
ctangle.w:75:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
gcc -g -DCWEBINPUTS=\"/usr/local/lib/cweb\" -c common.c
common.w:1409:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
common.w: In function ‘fatal’:
common.w:1176:1: warning: format not a string literal and no format arguments [-Wformat-security]
gcc -g -o ctangle ctangle.o common.o 
gcc -g   -c -o cweave.o cweave.c
cweave.w:79:12: warning: conflicting types for built-in function ‘strlen’ [enabled by default]
cweave.w: In function ‘print_cat’:
cweave.w:1739:1: warning: format not a string literal and no format arguments [-Wformat-security]
gcc -g -o cweave cweave.o common.o
ln: failed to create symbolic link `cweave': File exists
ln: failed to create symbolic link `ctangle': File exists
============================================================
* Build Stanford GraphBase
============================================================
Making sgb
gcc34 -g -I/usr/local/sgb/include  -DDATA_DIRECTORY=\"/usr/local/sgb/data/\" -c gb_io.c
make: gcc34: Command not found
make: *** [gb_io.o] Error 127
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing..
============================================================
* Build zlib
============================================================
Building static library libz.a version 1.2.3 with gcc34.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
  WARNING: snprintf() not found, falling back to sprintf(). zlib
  can build but will be open to possible buffer-overflow security
  vulnerabilities.
Checking for return value of sprintf()... No.
  WARNING: apparently sprintf() does not return a value. zlib
  can build but will be open to possible string-format security
  vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.
gcc34 -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H   -c -o example.o example.c
make: gcc34: Command not found
make: *** [example.o] Error 127
Zlib make failed, but it's optional Continue ...
============================================================
* Build tcl8.4.18
============================================================
configure: WARNING: unrecognized options: --enable-gcc
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc34
checking whether the C compiler works... no
configure: error: in `/root/ns-allinone-2.33/tcl8.4.18/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.4.18 configuration failed! Exiting ...
Tcl is not part of the ns project.  Please see www.Scriptics.com
to see if they have a fix for your platform.
root@ubuntu:~/ns-allinone-2.33# 


knudfl

unread,
Dec 19, 2017, 7:25:27 AM12/19/17
to Network Simulator 2 (NS2)
@Mehrdad Babaei

OK, Ubuntu 12.04 :  Please specify your OS : Is it a 64bits Ubuntu, or a 32bits Ubuntu OS ?
....  This command will show
$ uname -m

Mehrdad Babaei

unread,
Dec 20, 2017, 2:41:31 AM12/20/17
to Network Simulator 2 (NS2)

Hi   i used  Ubuntu 12.04 32bits

knudfl

unread,
Dec 20, 2017, 8:15:54 AM12/20/17
to Network Simulator 2 (NS2)
@Mehrdad Babaei.

Ubuntu 12.04 32bits :   But you installed 64bits compilers  →  No chance for success.

32bits :   compat-gcc34_3.4.6-ubuntu15_i386.deb,  compat-g++34_3.4.6-ubuntu10_i386.deb .
gcc34  https://drive.google.com/file/d/0B7S255p3kFXNTzNKRHBEMHFwNTg/view?usp=sharing
g++34  https://drive.google.com/file/d/0B7S255p3kFXNT0JTTVNDSHpNVGM/view?usp=sharing

Mehrdad Babaei

unread,
Dec 23, 2017, 5:26:44 AM12/23/17
to Network Simulator 2 (NS2)
Hi sir  thank you very very much. with your help cbrp installed succefuly in ns2.33 an ubuntu 12.04

Mehrdad Babaei

unread,
Dec 25, 2017, 12:20:40 AM12/25/17
to Network Simulator 2 (NS2)
Hello dear friend, thank you for helping us install CBRP on UBUNTU 12.04.
Now ,I need a TCL scipt that can display the state of the Gateway, BS, CH nodes in cluster mode.can you help me ? 
thank's lot

knudfl

unread,
Dec 25, 2017, 12:57:42 PM12/25/17
to Network Simulator 2 (NS2)

Atinkut Molla

unread,
Jun 6, 2019, 1:48:05 PM6/6/19
to Network Simulator 2 (NS2)
hi gays how was every thing ? i want to AODV+ ns2 code modified ad hoc on demand distance vector 


On Friday, November 24, 2017 at 8:03:28 PM UTC+3, lijan...@gmail.com wrote:

nancy

unread,
Aug 22, 2020, 9:43:55 AM8/22/20
to Network Simulator 2 (NS2)
HELLO SIR,
I am trying to add patch but it shows error, i am invoice in adding the patch so please see the error and provide help that how to us patch properly.
~/ns-allinone-2.35/ns-2.35$ patch -p0 <AODV+__ns235.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur ns-2.35-orig/aodv/aodv.cc ns-2.35/aodv/aodv.cc
|--- ns-2.35-orig/aodv/aodv.cc    2010-04-30 19:10:36.000000000 +0200
|+++ ns-2.35/aodv/aodv.cc    2009-01-20 15:25:08.000000000 +0100
--------------------------
File to patch: https://drive.google.com/file/d/0B7S255p3kFXNRW0xTHpKMDV2bzQ/view?usp=sharing
https://drive.google.com/file/d/0B7S255p3kFXNRW0xTHpKMDV2bzQ/view?usp=sharing: No such file or directory
Skip this patch? [y] Y
Skipping patch.
7 out of 7 hunks ignored
can't find file to patch at input line 3341
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur ns-2.35-orig/aodv/aodv.h ns-2.35/aodv/aodv.h
|--- ns-2.35-orig/aodv/aodv.h    2005-08-02 21:48:51.000000000 +0200
|+++ ns-2.35/aodv/aodv.h    2015-05-24 11:58:50.918294458 +0200
--------------------------
File to patch:


Sir please help me.

knudfl

unread,
Aug 22, 2020, 10:03:59 AM8/22/20
to Network Simulator 2 (NS2)
@ycna ,   Hi.

»» diff -Naur ns-2.35-orig/aodv/aodv.h ns-2.35/aodv/aodv.h «« means the patch was created in ns-allinone-2.35/.
I.e. the patch command is looking for a "ns-2.35 folder", when using option -p0 .

You are supposed to do :
cd ns-allinone-2.35/
patch -p0 < AODV+__ns235.patch


nancy

unread,
Aug 22, 2020, 11:55:53 AM8/22/20
to ns-u...@googlegroups.com
thank you so much sir for correcting me, its really work but

after adding the patch this error generates and i don't understand, how to deal with this.


invalid command name "Agent/rtProto/AODV"
    while executing
"Agent/rtProto/AODV instproc init args {
        $self next $args
}       "
    (file "aodv.tcl" line 19)

--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/64c25fc2-9d3c-49ee-bfec-d90d513a75c0n%40googlegroups.com.

nancy

unread,
Aug 22, 2020, 12:05:46 PM8/22/20
to ns-u...@googlegroups.com
sir,
before adding patch my AODV.tcl run successfully .but after adding when i run same file then it shows these type of error , this whole thing so much complicated for me.
please provide me help.

ERROR:
ns AODV.tcl
num_nodes is set 17
warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

INITIALIZE THE LIST xListHead
warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Agent/AODV::gw_discovery

see tcl-object.tcl in tclcl for info about this warning.


*************************************************
Proactive gateway discovery
*************************************************


No gateway discovery method chosen! Add the following line in your Tcl file:
Agent/AODV set gw_discovery <0 or 1 or 2>

knudfl

unread,
Aug 22, 2020, 2:04:48 PM8/22/20
to Network Simulator 2 (NS2)
@ ycna ,    Hi.

A warning is usually not an error,  is just a message.
In this case with AODV+  you will have to set a value for "gw_discovery".

Your above text says ...
»»  No gateway discovery method chosen! Add the following line in your Tcl file:
Agent/AODV set gw_discovery <0 or 1 or 2>   ««

So please add a line to the simulation, after the section "Define options" (the top group settings)
Agent/AODV set gw_discovery   2
 " 2 " works for me in a random example = A-wired_cum_wireless.tcl  →

nancy

unread,
Aug 22, 2020, 10:59:44 PM8/22/20
to ns-u...@googlegroups.com
Okk sir,
I just want the modify the Aodv so that its become new aodv ,in that manner what I do where to start, in which file I  will hove to change.
Just explain this thing .
Please sir
Please please 🙏  provide me help



nancy

unread,
Aug 23, 2020, 6:53:05 AM8/23/20
to ns-u...@googlegroups.com
Hello sir,
If anyone has the FRAODV patch so plz send me, I really want the patch.
Thanx in advance
Nancy
Reply all
Reply to author
Forward
0 new messages