4

I am trying to modify aodv protocol to implement a flooding attack prevention scheme in MANET in NS-3 for my first assignment from an already published paper. The method is to prevent a malicious node from forwarding excessive RREQ packets by its neighbors. The neighbors of the intruder node record its behavior and check its trust by a trust function. Once the fixed threshold for the RREQ limit is reached, nodes deny any RREQ from the malicious node.

I am just in an initial stage of learning NS-3 as in how to edit a protocol and make the changes into effect. It is my first experience with a simulator tool like NS-3. I am really not able to find a helpful resource material to learn the basics of NS-3.

Initially while learning to run a .cc file from my newly created folder in ns-3/ns-allinone-3.19/ns-3.19/src I tried the following:

  • copied the aodv folder in the location ns-3/ns-allinone-3.19/ns-3.19/src and renamed the folder as test.

  • Then I renamed the aodv.cc file in ns-3/ns-allinone-3.19/ns-3.19/src/test/examples to aodv1.cc.

-Next I replaced for all occurrences of aodv.cc with aodv1.cc in wscript file.

-Next I tried to run aodv1.cc using the command ./waf --run aodv1.cc; I get the following:

 Waf: Entering directory `.../ns-3/ns-allinone-3.19/ns-3.19/build'
 Could not find a task generator for the name 'ns3-test'

Can anyone please help with the basic steps to be followed to modify a protocol in NS-3 especially related to what are the changes to be made in other file in NS-3 while renaming and editing a file say aodv.cc. I am really messing up even with learning these basics of NS-3.


Screenshot:

....:~/ns-3/ns-allinone-3.19/ns-3.19$ ./waf distclean
'distclean' finished successfully (0.198s)
....:~/ns-3/ns-allinone-3.19/ns-3.19$ ./waf configure 
Setting top to                           : ..../ns-3/ns-allinone-3.19/ns-3.19 
Setting out to                           : ..../ns-3/ns-allinone-3.19/ns-3.19/build 
Checking for 'gcc' (c compiler)          : /usr/bin/gcc 
Checking for cc version                  : 4.7.3 
Checking for 'g++' (c++ compiler)        : /usr/bin/g++ 
Checking for compilation flag -Wl,--soname=foo... support : ok 
Checking for program python                               : /usr/bin/python 
Checking for python version                               : (2, 7, 4, 'final', 0) 
Checking for library python2.7 in LIBDIR                  : yes 
Checking for program /usr/bin/python-config,python2.7-config,python-config-2.7,python2.7m-config : /usr/bin/python-config 
Checking for header Python.h                                                                     : yes 
Checking for compilation flag -fvisibility=hidden... support                                     : ok 
Checking for compilation flag -Wno-array-bounds... support                                       : ok 
Checking for pybindgen location                                                                  : ../pybindgen-0.16.0.834 (guessed) 
Python module pybindgen                                                                          : ok 
Checking for pybindgen version                                                                   : 0.16.0.834 
Checking for types uint64_t and unsigned long equivalence                                        : yes 
Checking for types uint64_t and unsigned long long equivalence                                   : no 
Checking for the apidefs that can be used for Python bindings                                    : gcc-LP64 
Checking for internal GCC cxxabi                                                                 : complete 
Python module pygccxml                                                                           : not found 
Checking boost includes                                                                          : 1_49 
Checking boost libs                                                                              : ok 
Checking for boost linkage                                                                       : ok 
Checking for click location                                                                      : not found 
Checking for program pkg-config                                                                  : /usr/bin/pkg-config 
Checking for 'gtk+-2.0' >= 2.12                                                                  : yes 
Checking for 'libxml-2.0' >= 2.7                                                                 : yes 
Checking for type uint128_t                                                                      : not found 
Checking for type __uint128_t                                                                    : yes 
Checking high precision time implementation                                                      : 128-bit integer 
Checking for header stdint.h                                                                     : yes 
Checking for header inttypes.h                                                                   : yes 
Checking for header sys/inttypes.h                                                               : not found 
Checking for header sys/types.h                                                                  : yes 
Checking for header sys/stat.h                                                                   : yes 
Checking for header dirent.h                                                                     : yes 
Checking for header stdlib.h                                                                     : yes 
Checking for header signal.h                                                                     : yes 
Checking for header pthread.h                                                                    : yes 
Checking for header stdint.h                                                                     : yes 
Checking for header inttypes.h                                                                   : yes 
Checking for header sys/inttypes.h                                                               : not found 
Checking for library rt                                                                          : yes 
Checking for header netpacket/packet.h                                                           : yes 
Checking for header sys/ioctl.h                                                                  : yes 
Checking for header net/if.h                                                                     : yes 
Checking for header net/ethernet.h                                                               : yes 
Checking for header linux/if_tun.h                                                               : yes 
Checking for header netpacket/packet.h                                                           : yes 
Checking for NSC location                                                                        : not found 
Checking for OpenFlow location                                                                   : ../openflow (guessed) 
Checking for library dl                                                                          : yes 
Checking for library xml2                                                                        : yes 
Checking for library openflow                                                                    : yes 
Checking for 'sqlite3'                                                                           : yes 
Checking for header linux/if_tun.h                                                               : yes 
Python module gtk                                                                                : ok 
Python module goocanvas                                                                          : not found 
Python module pygraphviz                                                                         : not found 
Checking for program sudo                                                                        : /usr/bin/sudo 
Checking for program valgrind                                                                    : /usr/bin/valgrind 
Checking for 'gsl'                                                                               : yes 
Checking for compilation flag -Wno-error=deprecated-d... support                                 : ok 
Checking for compilation flag -Wno-error=deprecated-d... support                                 : ok 
Checking for compilation flag -fstrict-aliasing... support                                       : ok 
Checking for compilation flag -fstrict-aliasing... support                                       : ok 
Checking for compilation flag -Wstrict-aliasing... support                                       : ok 
Checking for compilation flag -Wstrict-aliasing... support                                       : ok 
Checking for program doxygen                                                                     : /usr/bin/doxygen 
---- Summary of optional NS-3 features:
Python Bindings               : enabled
Python API Scanning Support   : not enabled (Missing 'pygccxml' Python module)
BRITE Integration             : not enabled (BRITE not enabled (see option --with-brite))
NS-3 Click Integration        : not enabled (nsclick not enabled (see option --with-nsclick))
GtkConfigStore                : enabled
XmlIo                         : enabled
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
File descriptor NetDevice     : enabled
Tap FdNetDevice               : enabled
Emulation FdNetDevice         : enabled
PlanetLab FdNetDevice         : not enabled (PlanetLab operating system not detected (see option --force-planetlab))
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
MPI Support                   : not enabled (option --enable-mpi not selected)
NS-3 OpenFlow Integration     : enabled
SQlite stats data output      : enabled
Tap Bridge                    : enabled
PyViz visualizer              : not enabled (Missing python modules: goocanvas, pygraphviz)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build tests                   : not enabled (defaults to disabled)
Build examples                : not enabled (defaults to disabled)
GNU Scientific Library (GSL)  : enabled
'configure' finished successfully (10.951s)
...:~/ns-3/ns-allinone-3.19/ns-3.19$ ./waf
Waf: Entering directory `..../ns-3/ns-allinone-3.19/ns-3.19/build'
Could not find a task generator for the name 'ns3-test'
....:~/ns-3/ns-allinone-3.19/ns-3.19$ 

Browse other questions tagged or ask your own question.