Fisheye State Routing patch file

363 views
Skip to first unread message

Goklas Giovanni

unread,
Nov 2, 2017, 12:51:23 PM11/2/17
to Network Simulator 2 (NS2)
Dear Friends 

My name is Goklas Giovanni Sitompul, I'm a student from Indonesia. I'm doing research on FSR protocol performance on a VANET network using NS2.35. But, I have not managed to find a patch file that can be used for the simulation. Do any of you have the patching file to run FSR simulation in ns2.35? If so, may I ask for the file? Or any other help maybe. I need it ASAP. 

Thanks..

Goklas.

knudfl

unread,
Nov 2, 2017, 2:53:32 PM11/2/17
to Network Simulator 2 (NS2)
Hi.

Google, ns235 fsr
https://www.google.com/webhp?hl=all&gws_rd=ssl#hl=en&q=ns235+fsr

The first hit is ... the patch FSR_ns235.patch
https://www.linuxquestions.org/questions/linux-newbie-8/fsr-protocol-4175610147/
Post #4 in the link is a build example. Simulation examples: post #5, post #7.

Note : I have a text saying "tools_is-compiled-with-g++34" :  ns-2.35/tools/**.
I.e. you may need to install the {Redhat gcc34, g++34} : gcc-3.4.6.

Example gcc-3.4.6, Ubuntu 12.04 ... Ubuntu 17.10 , amd64
gcc34  https://drive.google.com/file/d/0B7S255p3kFXNRTkzQnRSNXZ6UVU/view?usp=sharing
g++34  https://drive.google.com/file/d/0B7S255p3kFXNV3J3bnVoWGNWdG8/view?usp=sharing

--------------------------------

knudfl

unread,
Nov 2, 2017, 3:32:48 PM11/2/17
to Network Simulator 2 (NS2)
Vanet simulation examples, Vanet-examples-10.17.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNYjJhMGxzMnBtYjg/view?usp=sharing

FSR-Zigbee, Mac 802.15.4 :   The **tes**.tcl examples seem to work with FSR →
One FSR example is included →  fsr-Vanet-tes.tcl

----------------------------

Goklas Giovanni

unread,
Nov 5, 2017, 8:42:50 AM11/5/17
to Network Simulator 2 (NS2)
I have followed the instruction from this link:
Post #4

But, when I execute ./install , I got this error:
checking for gcc... gcc41
checking whether the C compiler works... no
configure: error: in `/home/fsr/ns-allinone-2.35/tcl8.5.10/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.5.10 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.

I'm using Ubuntu 12.04

gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Message has been deleted

Goklas Giovanni

unread,
Nov 5, 2017, 8:57:31 AM11/5/17
to Network Simulator 2 (NS2)
I also have installed these:
gcc41-compat-4.1.2-ubuntu1210_i386.deb
g++41-compat-4.1.2_i386.deb

Then, I execute this:
cd ns-allinone-2.35
patch -p0 < FSR_ns235.patch
export CC=gcc41 CXX=g++41 && ./install

And I got this error:
checking for gcc... gcc41
checking whether the C compiler works... no
configure: error: in `/home/fsr/ns-allinone-2.35/tcl8.5.10/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.5.10 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.

On Friday, November 3, 2017 at 2:32:48 AM UTC+7, knudfl wrote:

knudfl

unread,
Nov 5, 2017, 9:14:30 AM11/5/17
to Network Simulator 2 (NS2)
Missing OS information :   Ubuntu 12.04,   Is it 64 or 32bits ?

No new instructions say gcc41, g++41 : See the time stamp.
Please read my above posts : g++34 !

-

Goklas Giovanni

unread,
Nov 5, 2017, 9:35:33 AM11/5/17
to Network Simulator 2 (NS2)
It is 32bits

I already installed gcc-3.4 and g++-3.4
Now my gcc --version is:
gcc (GCC) 3.4.6 (Ubuntu 3.4.6-6ubuntu5)

But when I ./install , I still got this error:
checking for gcc... gcc41
checking whether the C compiler works... no
configure: error: in `/home/fsr/ns-allinone-2.35/tcl8.5.10/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.5.10 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.

knudfl

unread,
Nov 5, 2017, 9:39:16 AM11/5/17
to Network Simulator 2 (NS2)
Ubuntu 12.04 :  No issues with FSR.   All files can be compiled with the default gcc, g++.

12.04.5 :
tar xvf ns-allinone-2.35_gcc5.tar.gz
https
://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
cd ns
-allinone-2.35/
./install
... and the new executable 'ns' is created i ns-2.35/

cd ns-2.35/
cp ns ns235
-fsr
sudo cp ns235
-fsr /usr/local/bin/

Simulation:    $ ns235-fsr <fsr-example>.tcl

----------------------------------------

Goklas Giovanni

unread,
Nov 5, 2017, 9:45:46 AM11/5/17
to Network Simulator 2 (NS2)
But I got that error while doing the ./install

What should I do? I need to do this simulation ASAP.

Goklas Giovanni

unread,
Nov 5, 2017, 10:03:45 AM11/5/17
to Network Simulator 2 (NS2)
I already passed the last error I said to you, now I have the other one:

tools/consbuffer.cc:16:22: fatal error: hash_map.h: No such file or directory
compilation terminated.
make: *** [tools/consbuffer.o] Error 1
Ns make failed!

Any solution, Sir?

On Sunday, November 5, 2017 at 9:39:16 PM UTC+7, knudfl wrote:

knudfl

unread,
Nov 5, 2017, 10:28:20 AM11/5/17
to Network Simulator 2 (NS2)
Note :  My above FSR build example is with a 64bits Ubuntu 12.04.5 .
The 32bits Ubuntu 12.04.5 is a bit more tricky.  Requires g++34 for ns-2.35/tools/

If you installed the 64bits compilers :  Please remove the packages.
Install 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
cd Download/
sudo gdebi compat
-gcc34_3.4.6-ubuntu15_i386.deb
sudo gdebi compat
-g++34_3.4.6-ubuntu10_i386.deb
------------------------

Your errors :  Somewhere in your current ns-allinone-2.35 you have written gcc41.
Please unpack a new ns-allinone-2.35_gcc5.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
.... into a new folder.

The build,  12.04.5 - i386/i686 + FSR
tar xvf ns-allinone-2.35_gcc5.tar.gz
cd ns
-allinone-2.35/
patch
-p0 < FSR_ns235.patch
./install              // Stops with a tools/* error.
cd ns
-2.35/
                       
//  Edit Makefile, line 37 to: CPP = g++34
                       
//       ( g++41 may work too )
make
           
// 'make' stops with a linker error. Edit Makefile:37 to:  CPP = g++
make
cp ns ns235
-fsr
sudo cp ns235
-fsr /usr/local/bin/

------------------

Goklas Giovanni

unread,
Nov 5, 2017, 10:43:25 AM11/5/17
to Network Simulator 2 (NS2)
So I need to install new Ubuntu 12.04.5 64 bits and then do the instructions above?

knudfl

unread,
Nov 5, 2017, 1:11:36 PM11/5/17
to Network Simulator 2 (NS2)
My latest post ( 2 hours ago ) is about the 32bits Ubuntu 12.04.5, which is the OS you have.

I have all versions installed, and made an OK result with both Ubuntu 12.04 versions.

---------------------

Goklas Giovanni

unread,
Nov 5, 2017, 3:06:15 PM11/5/17
to Network Simulator 2 (NS2)
I've followed this steps, but still get the same error:

tools/consbuffer.cc:16:22: fatal error: hash_map.h: No such file or directory
compilation terminated.
make: *** [tools/consbuffer.o] Error 1
Ns make failed!

Any idea what is wrong, Sir?

On Sunday, November 5, 2017 at 10:28:20 PM UTC+7, knudfl wrote:

knudfl

unread,
Nov 5, 2017, 4:14:33 PM11/5/17
to Network Simulator 2 (NS2)
Assume gcc34 and g++34 installed.

compat-g++34_3.4.6-ubuntu10_i386.deb provides usr/include/c++/3.4.6/backward/hash_map.h
... If not found there, please make a temporary copy of the required "backwards" files to /usr/local/include/

Please note that I have no issues at all with using g++34 in Ubuntu 12.04 !

---------------------------------

knudfl

unread,
Nov 5, 2017, 4:34:02 PM11/5/17
to Network Simulator 2 (NS2)

Repeat :   The build,  12.04.5 - 32bit + FSR


tar xvf ns-allinone-2.35_gcc5.tar.gz
cd ns
-allinone-2.35/
patch
-p0 < FSR_ns235.patch
./install              // Stops with a tools/* error.
cd ns
-2.35/
                       
//  Edit Makefile, line 37 to: CPP = g++34
                       
//       ( g++41 may work too )
make
           
// 'make' stops with a linker error. Edit Makefile:37 to:  CPP = g++
make
cp ns ns235
-fsr
sudo cp ns235
-fsr /usr/local/bin/
------------------

Goklas Giovanni

unread,
Nov 5, 2017, 4:38:32 PM11/5/17
to Network Simulator 2 (NS2)
update-alternatives --config gcc
  Selection    Path              Priority   Status
------------------------------------------------------------
 0            /usr/bin/gcc-4.6   20        auto mode
* 1            /usr/bin/gcc-3.4   10        manual mode
 2            /usr/bin/gcc-4.6   20        manual mode

update-alternatives --config gcc
  Selection    Path              Priority   Status
------------------------------------------------------------
  0            /usr/bin/g++-4.6   20        auto mode
* 1            /usr/bin/g++-3.4   10        manual mode
  2            /usr/bin/g++-4.6   20        manual mode

If I choose gcc-3.4 and g++-3.4, I could find the hash_map.h file in the location that you given. But when I do ./intall , I got this error:
checking for gcc... gcc

checking whether the C compiler works... no
configure: error: in `/home/fsr/ns-allinone-2.35/tcl8.5.10/unix':
configure: error: C compiler cannot create executables

When I change the gcc and g++ to 4.6 version, the ./install can't find the hash_map.h file.

Goklas Giovanni

unread,
Nov 5, 2017, 4:54:35 PM11/5/17
to Network Simulator 2 (NS2)
This is the consbuffer.cc file:
/*

 * Eduardo Bezerra Valentin.

 *

 * Implementação de Agente para recepção com adição de atraso fixo.

 *

 */



#include "agent.h"

#include "config.h"

#include "tclcl.h"

#include "packet.h"

#include "rtp.h"

#include "ip.h"  // Adicionado por Laercio em 20/10/2006

#include "adaptive-receiver.h"

#include "IeFactor.H"

#include <hash_map.h>

#include <pthread.h>

#ifndef WIN32

// VC 5.0 doesn't have this

#include <sys/time.h>

#endif

.........

knudfl

unread,
Nov 5, 2017, 5:57:45 PM11/5/17
to Network Simulator 2 (NS2)
No reason at all to use /etc/alternatives/.
Please switch back to "/usr/bin/gcc-4.6"  ... and don't touch it again.

Repeat, repeat :  Please do it this way :

tar xvf ns-allinone-2.35_gcc5.tar.gz
cd ns
-allinone-2.35/
patch
-p0 < FSR_ns235.patch
./install              // Stops with a tools/* error.
cd ns
-2.35/
                       
//  Edit Makefile, line 37 to: CPP = g++34
                       
//       ( g++41 may work too )
make
           
// 'make' stops with a linker error. Edit Makefile:37 to:  CPP = g++
make
cp ns ns235
-fsr
sudo cp ns235
-fsr /usr/local/bin/



knudfl

unread,
Nov 5, 2017, 9:54:12 PM11/5/17
to Network Simulator 2 (NS2)
Instead of building ns-allinone-2.35, you can install /usr/local/bin/ns-FSR-32 :
Download  the Ubuntu package 'fsr-ns_235-ubuntu12_i386.deb'
https://drive.google.com/file/d/0B7S255p3kFXNZWNQSmVGdHgtemc/view?usp=sharing

The package install :
$ cd Downloads/
... and click the package, and the 'Package Installer' will install it.

Simulation :  $ ns-FSR-32 fsr.tcl
etc. etc. examples from FSR-examples-11.17.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNYWlic3RYaHhBQmc/view?usp=sharing

------------------------------------

Goklas Giovanni

unread,
Nov 6, 2017, 2:43:09 AM11/6/17
to Network Simulator 2 (NS2)
What about this error, Sir? The ./install is already completed, but when I do 
cd ns-2.35
ns ns
-fsr

Then I got this error:
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.5.10: /home/fsr/ns-allinone-2.35/{bin,include,lib}
tk8.5.10: /home/fsr/ns-allinone-2.35/{bin,include,lib}
otcl: /home/fsr/ns-allinone-2.35/otcl-1.14
tclcl: /home/fsr/ns-allinone-2.35/tclcl-1.20
ns: /home/fsr/ns-allinone-2.35/ns-2.35/ns
nam: /home/fsr/ns-allinone-2.35/nam-1.15/nam
gt-itm:   /home/fsr/ns-allinone-2.35/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

root@fsr-VirtualBox:/home/fsr/ns-allinone-2.35# cd ns-2.35/

root@fsr-VirtualBox:/home/fsr/ns-allinone-2.35/ns-2.35# ns ns-fsr
The program 'ns' is currently not installed.  You can install it by typing:
apt-get install ns2
root@fsr-VirtualBox:/home/fsr/ns-allinone-2.35/ns-2.35# 

knudfl

unread,
Nov 6, 2017, 4:42:07 AM11/6/17
to Network Simulator 2 (NS2)
This is wrong:
cd ns-2.35
ns ns-fsr

Right is :
cd ns-2.35

cp ns ns235-fsr
sudo cp ns235
-fsr /usr/local/bin/

Then I got this error:
Ns-allinone package has been installed successfully.
   .
   .
..................  That's the normal output.   Please ignore.

------------------------------

Goklas Giovanni

unread,
Nov 7, 2017, 3:31:16 AM11/7/17
to Network Simulator 2 (NS2)
Ok it works. Thankyou so much for your instructions, Sir. But now I got the next error:

root@fsr-VirtualBox:/home/fsr/fsr-examples-11.17# ns235-fsr 10.tclnum_nodes is set 10
INITIALIZE THE LIST xListHead
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
[wpan/p802_15_4phy.cc::PD_DATA_request][5.088567](node 0) Invalid PSDU/MPDU length: type = message, src = 0, dst = -1, uid = 0, mac_uid = 989, size = 135
[wpan/p802_15_4phy.cc::PD_DATA_request][5.111943](node 1) Invalid PSDU/MPDU length: type = message, src = 1, dst = -1, uid = 0, mac_uid = 995, size = 135
[wpan/p802_15_4phy.cc::PD_DATA_request][5.139770](node 7) Invalid PSDU/MPDU length: type = message, src = 7, dst = -1, uid = 0, mac_uid = 1000, size = 135
[wpan/p802_15_4phy.cc::PD_DATA_request][5.180776](node 4) Invalid PSDU/MPDU length: type = message, src = 4, dst = -1, uid = 0, mac_uid = 1009, size = 163
[wpan/p802_15_4phy.cc::PD_DATA_request][10.113284](node 3) Invalid PSDU/MPDU length: type = message, src = 3, dst = -1, uid = 0, mac_uid = 2191, size = 175
[wpan/p802_15_4phy.cc::PD_DATA_request][10.138722](node 5) Invalid PSDU/MPDU length: type = message, src = 5, dst = -1, uid = 0, mac_uid = 2199, size = 175
[wpan/p802_15_4phy.cc::PD_DATA_request][10.159135](node 2) Invalid PSDU/MPDU length: type = message, src = 2, dst = -1, uid = 0, mac_uid = 2205, size = 211
[wpan/p802_15_4phy.cc::PD_DATA_request][10.163068](node 6) Invalid PSDU/MPDU length: type = message, src = 6, dst = -1, uid = 0, mac_uid = 2207, size = 175
[wpan/p802_15_4phy.cc::PD_DATA_request][10.164988](node 9) Invalid PSDU/MPDU length: type = message, src = 9, dst = -1, uid = 0, mac_uid = 2206, size = 175
ns: stop: couldn't execute "nam": no such file or directory
    while executing
"exec nam 10.nam &"
    (procedure "stop" line 7)
    invoked from within
"stop"

How to handle it?

knudfl

unread,
Nov 7, 2017, 5:02:26 AM11/7/17
to Network Simulator 2 (NS2)
The original FSR + 802.15.4 is :  fsr-zigbee.tcl → "Fisheye State Routing".
Please read the files. Some have links / INFO text as a headline.

All other examples : FSR and/or 802.15.4 examples.
Some are FSR suggestions : 10.tcl → Follow the links → Please read the file.
10.tcl line 3 http://www.linuxquestions.org/questions/linux-software-2/invalid-command-name-agent-consbuffer-4175412391/#8

Conclusion : Not all examples are perfect. Not all examples are FSR.
..... But all examples are meant for anybody to improve.

------------------------------------

knudfl

unread,
Nov 7, 2017, 7:27:13 AM11/7/17
to Network Simulator 2 (NS2)
  • Exemplary NS-2 Simulation Script for FSR :  simulation-FSR-example.tcl
Also in  ns-2.35/fsr/example/: {scen-FSR-example, simulation-FSR-example.tcl, tcp-FSR-example}

------------------------------------

knudfl

unread,
Nov 7, 2017, 7:46:06 AM11/7/17
to Network Simulator 2 (NS2)
I made a new patch :  FSR_ns235-g++5.patch
https://drive.google.com/file/d/1DBmdvNWJUYZibxideWgPsgyY0lw0WItC/view?usp=sharing

....  Which means :  No g++ - 3.4.6 has to be used.
(The c++-3.4.6 header hash_map.h and it's associated headers are now included in ns-2.35/tools/.)

-----------------------------------

Goklas Giovanni

unread,
Nov 8, 2017, 12:02:57 PM11/8/17
to Network Simulator 2 (NS2)
Ok sir it works now, thankyou so much.

By the way, I need the awk files for calculating Packet Delivery Ratio, Throughput, Routing Overhead and Average End-to-end Delay. Do you have one, Sir?

knudfl

unread,
Nov 8, 2017, 1:02:37 PM11/8/17
to Network Simulator 2 (NS2)
The "top 25 scripts",  AWK-first.10.17.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNcDJXWDl6QmhDSTA/view?usp=sharing

All scripts, perl and awk :  awk#perl#python__scripts-09.2017.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNdkdRalVpWk56MmM/view?usp=sharing

Analyzing tool, with graph outputs : APP-Tool
https://github.com/WiNG-NITK/APP-Tool
http://mohittahiliani.blogspot.dk/2014/10/automated-post-processing-app-tool-for.html

-------------------------------

Goklas Giovanni

unread,
Nov 8, 2017, 3:09:09 PM11/8/17
to Network Simulator 2 (NS2)
Thankyou so much, Sir. Really appriciate that.
Reply all
Reply to author
Forward
0 new messages