Patching DYMO-UM in NS-2.34

Step-1: Extract the ns-allinone-2.34 in home directory.

Step-2: Download dymoum-0.3.tgz and dymoum_ns-2.34_v0.3.patch from

http://masimum.dif.um.es/?Software:DYMOUM

Step-3: Extract “dymoum-0.3.tgz” in ns-2.34 directory and make a symbolic link (symlink) there-

cd ns-allinone-2.34/ns-2.34/
tar zxvf dymoum-0.3.tgz
ln -s ./dymoum-0.3 ./dymoum    


Step-4: Edit “dymoum_ns-2.34_v0.3.patch”.  In gedit (a Text editor in Ubuntu), go to line no 58, delete the word Makefile.
Before deletion-


+# DYMO_UM
+$(NS):    $(DYMO_UM_DIR)/$(DYMO_UM_LIB) $(OBJ) common/tclAppInit.o Makefile
+    $(LINK) $(LDFLAGS) $(LDOUT)$@ \
+          common/tclAppInit.o $(OBJ) $(LIB) 


After deletion-


+# DYMO_UM
+$(NS):    $(DYMO_UM_DIR)/$(DYMO_UM_LIB) $(OBJ) common/tclAppInit.o
+    $(LINK) $(LDFLAGS) $(LDOUT)$@ \
+          common/tclAppInit.o $(OBJ) $(LIB)


Step-5: Now patch ns-2 with modified “dymoum_ns-2.34_v0.3.patch”. Use the following command-

patch -p1 < dymoum/dymoum_ns-2.34_v0.3.patch


Step - 6:  Then generate now object files by typing

./configure
make

                       

29 comments:

  1. unable to patch using patch command. please help

    ReplyDelete
    Replies
    1. Hi,

      Can you give me the details of error, once try to execute patch command?

      Delete
  2. Hi,
    I am getting the following error.
    etrx@ubuntu:~/ns-allinone-2.34/ns-2.34$ patch -p1 < dymoum/dymoum_ns-2.34_v0.3.patch
    patching file Makefile.in
    Hunk #3 succeeded at 395 (offset 1 line).
    Hunk #4 succeeded at 568 (offset 1 line).
    patching file trace/cmu-trace.cc
    Hunk #1 FAILED at 53.
    Hunk #2 succeeded at 1520 with fuzz 2 (offset 567 lines).
    Hunk #3 FAILED at 1642.
    2 out of 3 hunks FAILED -- saving rejects to file trace/cmu-trace.cc.rej
    patching file trace/cmu-trace.h
    Hunk #1 FAILED at 160.
    1 out of 1 hunk FAILED -- saving rejects to file trace/cmu-trace.h.rej
    patching file tcl/lib/ns-agent.tcl
    Hunk #1 FAILED at 192.
    1 out of 1 hunk FAILED -- saving rejects to file tcl/lib/ns-agent.tcl.rej
    patching file tcl/lib/ns-default.tcl
    Hunk #1 succeeded at 1459 (offset 8 lines).
    patching file tcl/lib/ns-lib.tcl
    Hunk #2 succeeded at 859 (offset 3 lines).
    Hunk #3 succeeded at 876 (offset 11 lines).
    patching file tcl/lib/ns-mobilenode.tcl
    patching file tcl/lib/ns-packet.tcl
    Hunk #1 FAILED at 169.
    1 out of 1 hunk FAILED -- saving rejects to file tcl/lib/ns-packet.tcl.rej
    patching file common/packet.h
    Hunk #1 FAILED at 182.
    Hunk #2 FAILED at 248.
    Hunk #3 FAILED at 383.
    3 out of 3 hunks FAILED -- saving rejects to file common/packet.h.rej
    patching file queue/priqueue.cc
    Hunk #1 FAILED at 92.
    1 out of 1 hunk FAILED -- saving rejects to file queue/priqueue.cc.rej

    ReplyDelete
  3. Replies
    1. Hi,

      Did you follow the changes specified in the beginning, then only you can try to apply the patch.

      Otherwise you can do one more thing to apply the changes, that is manual way of doing the changes.

      Delete
    2. Hi
      Yes I have done the changes..still error persists...

      Delete
  4. Hi
    Please help. I need it for my project. I have done all changes that are mentioned by you, still error persists..

    ReplyDelete
    Replies
    1. Hi,

      So apply the patch manually. Download the patch file and in that file you file changes to be incorporated to implement DYMO.

      You will fine following syntax:

      +++ ns-2.34/trace/cmu-trace.cc 2009-07-29 11:01:22.000000000 +0200
      @@ -53,6 +53,9 @@
      #include //AODV
      // AOMDV patch
      #include
      +#ifdef DYMO_UM
      +#include
      +#endif /* DYMO_UM */
      #include
      #include
      #include

      It says file location and line where you need to paste the lines (denoted as + in the beginning of the line.

      Delete
    2. Hi
      Changes done. I am getting following errors after make command.
      trace/cmu-trace.cc:1245:1: error: redefinition of ‘void CMUTrace::format_dymoum(Packet*, int)’
      trace/cmu-trace.cc:962:1: error: ‘void CMUTrace::format_dymoum(Packet*, int)’ previously defined here
      trace/cmu-trace.cc:1528:1: error: redefinition of ‘void CMUTrace::format_dymoum(Packet*, int)’
      trace/cmu-trace.cc:962:1: error: ‘void CMUTrace::format_dymoum(Packet*, int)’ previously defined here
      trace/cmu-trace.cc:1811:1: error: redefinition of ‘void CMUTrace::format_dymoum(Packet*, int)’
      trace/cmu-trace.cc:962:1: error: ‘void CMUTrace::format_dymoum(Packet*, int)’ previously defined here
      trace/cmu-trace.cc:2094:1: error: redefinition of ‘void CMUTrace::format_dymoum(Packet*, int)’
      trace/cmu-trace.cc:962:1: error: ‘void CMUTrace::format_dymoum(Packet*, int)’ previously defined here
      make: *** [trace/cmu-trace.o] Error 1

      Delete
    3. Hi,

      The error is due to duplicate entries.

      Delete
    4. Hi
      DO I have to delete duplicate entries from cmu-trace.cc? NS2 got de-installed with the errors shown above. I had to reload it.

      Delete
    5. Hi
      A quick query..is the patching issue because I already patched OLSR? what modifications do i need to do..please help..

      Delete
    6. Hi,

      Ya, It might be due to the patch. As you patch new protocol there will be miss match in line of files and patch file.

      Delete
    7. Hi

      I am working on a similar project for simulation of DYMO in ns2.34.
      Whenever i try run the PATCH command it shows an error PATCH command not found. Please Help

      Delete
  5. I am getting the following error now..

    acer@ubuntu:~/ns-allinone-2.34/ns-2.34$ make
    Makefile:79: *** commands commence before first target. Stop.

    ReplyDelete
  6. I am able to patch DYMO in one terminal. Trying exactly the same method on another does not work.

    Please help.

    ReplyDelete
    Replies
    1. Hi,

      Then it is due to the platform you are getting errors. Check the essentials before trying to install dymo.

      Delete
  7. getting following errors:
    common/tclAppInit.o: In function `Tcl_AppInit':
    tclAppInit.cc:(.text+0xdf): undefined reference to `et_ns_ptypes'
    collect2: ld returned 1 exit status
    make: *** [ns] Error 1

    ReplyDelete
  8. now while running the simulation
    glibc detected: ns double linked list error
    please help...

    ReplyDelete
  9. Hello sir,
    Thanx alot for starting this blog
    Sir I have installed DYMOUM patch in ns 2.34. It is running also.
    But one column in trace format is showing undefined thats why routing packets and NRL is zero. Please help sir what is wrong.

    r -t 96.704596976 -Hs 17 -Hd 17 -Ni 17 -Nx 475.76 -Ny 378.25 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 13a -Md 11 -Ms 13 -Mt 800 -Is 19.255 -Id 17.255 -It undefined -Il 48 -If 0 -Ii 13296 -Iv 1 -P DYMOUM(RE) -Pm 0 -Ph 0 -Pl 28 -Pc 10 -Pi 0 -Pa 0 -Pt 17 -Ps 14 -Pn 1 [-Pg 0 -Pp 0 -Ph 0 -Pn 19 -Ps 2]

    ReplyDelete
  10. I have tried to install dymoum patch n logged in as root and wen executing command :
    patch -p1 < /home/anum/NetworkSimulator/ns-allinone-2.34/ns-2.34 /dymoum/dymoum_ns-2.34_v0.3.patch

    error comes : patch** read error : Is a directory

    help required

    ReplyDelete
    Replies
    1. Hi,

      You have to use the command within the directory then only it will patch.

      Delete
  11. Mr. Rama do you have another routing protocol pacth for ns 2.34?

    ReplyDelete
  12. Yes, like geographic base routing protocol in ns like GPRS or other

    ReplyDelete
  13. Hi,

    I am unable to use the patch command. It gives an error
    "bash: patch: command not found..."

    Then i tried following your instructions in the above posts. I came across the below syntax in the patch file but i am not clear what i have to do here. Plz help

    +++ ns-2.34/trace/cmu-trace.cc 2009-07-29 11:01:22.000000000 +0200
    @@ -53,6 +53,9 @@
    #include //AODV
    // AOMDV patch
    #include
    +#ifdef DYMO_UM
    +#include
    +#endif /* DYMO_UM */
    #include
    #include
    #include

    ReplyDelete
  14. Sir,
    Thank you so much for giving suggestion for downloading maodv and odmrp protocol files. I successfully downloaded these files. I got error as "No rule to make target maodv.o needed by ns2" when I gave the command "make".Please help me.

    ReplyDelete
  15. Dear sir,
    Im doing my project in content delivery networks in ns2... i need a patch file for load balancing in cdn.. can u please help me by giving the patch file and the steps to use it...?

    ReplyDelete