-   Linux - Newbie (
-   -   adding new protocol in ns2.35 (

rc49 09-26-2015 06:39 AM

adding new protocol in ns2.35
my system specifications are
ubuntu 12.04 32bit

i m trying to modify DSR protocol in ns2.35 as follows
copied DSR protocol folder (already present in ns2.35 directory) and paste it as mdsr in same location

add following lines in present in ns2.35 folder


mdsr/dsragent.o mdsr/hdr_sr.o mdsr/mobicache.o mdsr/path.o \
        mdsr/requesttable.o mdsr/routecache.o mdsr/add_sr.o \
        mdsr/mdsr_proto.o mdsr/flowstruct.o mdsr/linkcache.o \
        mdsr/simplecache.o mdsr/sr_forwarder.o \

then i save it and run following commands in ns2.35 location

make clean

it give error

ramneet@PC:~/ns-allinone-2.35/ns-2.35$ make clean
rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
                errors tclsh tcltest lib.exp Tcl
cd dltest ; make clean
make[1]: Entering directory `/home/ramneet/ns-allinone-2.35/ns-2.35/dltest'
rm -f *.o lib.exp ../dltest.marker
rm -f *.so
make[1]: Leaving directory `/home/ramneet/ns-allinone-2.35/ns-2.35/dltest'

somebody please tell me what other changes are required in ns2 files so as to run mdsr in tcl scripts as
set $val(rp) mdsr

i also read other articles but examples shows something like new packet type m not adding new packet still...m just replicating existing protocol yet as MDSR,,please somebody tell me changes required """step by step"""
any response will be appreciated
thanks in advance

knudfl 09-26-2015 07:21 AM


It give error
No errors are shown.

But you are not supposed to run './configure && make clean && make' in ns-2.35.
It's all being taken care of with ./install in the top directory ns-allinone-**.

You will find out if an MDSR entry is missing in common/package.h
... when ./install fails with missing PT_MDSR.
Please check packet.h for DSR : $ grep -n DSR packet.h
.. to know which MDSR entries to add.

And you can check the DSR entries in tcl/lib/{ files.tcl } :
$ cd ns-2.35/tcl/lib/ && grep -n DSR *
... and then may be add similar entries for your MDSR.


All times are GMT -5. The time now is 01:18 PM.