Hi! Great to hear that from you!

Now I would ask you to document what you have learned, in order to help
other users that also want to clone standard NS2 modules for experiments.

Either send me a no-frills, straight-to-the-point HOW-TO, and I'll post in
my page with proper credit to you
http://inesc-0.tagus.ist.utl.pt/~pmsrve/ns2/ns2_beginners.html#_Toc128325750

or, even better, use the NS2 wiki for publishing this info.

Pedro Vale Estrela


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of net sim
> Sent: quarta-feira, 8 de Março de 2006 15:15
> To: ns-users@ISI.EDU
> Subject: Re: [ns] Creating an Identical Ad Hoc Routing
> 

yeah , i finally get MYTORA to run with TORA
a big thanks to pedro

>From: "Pedro Vale Estrela" <[EMAIL PROTECTED]>
>Reply-To: <[EMAIL PROTECTED]>
>To: "'net sim'" <[EMAIL PROTECTED]>
>CC: <ns-users@ISI.EDU>
>Subject: RE: [ns] Creating an Identical Ad Hoc Routing
>Date: Tue, 7 Mar 2006 18:16:14 -0000
>
>
>First of all, you must know what you are doing in order to get this right;
>Second, either remove the "hdr_tora" definition stuff from mytora.cc, or
>modify them to be hdr_mytora!
>
>
>
> > -----Original Message-----
> > From: net sim [mailto:[EMAIL PROTECTED]
> > Sent: terga-feira, 7 de Margo de 2006 18:07
> > To: [EMAIL PROTECTED]
> > Cc: ns-users@ISI.EDU
> > Subject: RE: [ns] Creating an Identical Ad Hoc Routing
> >
> > Sir,
> > As you can see, I still getting the same error mesage when doing "make"
> > if i use the (MYTORA) hdr_tora same name with (TORA)
> > 
>--------------------------------------------------------------------------
> > ------------------------------
> > mytora/mytora.o:(.bss+0x0): multiple definition of `hdr_tora::offset_'
> > tora/tora.o:(.bss+0x0): first defined here
> > collect2: ld returned 1 exit status
> > make: *** [ns] Error 1
> > 
>--------------------------------------------------------------------------
> > ------------------------------
> > int hdr_tora::offset_;
> > static class MYTORAHeaderClass : public PacketHeaderClass {
> > public:
> >         MYTORAHeaderClass() : PacketHeaderClass("PacketHeader/TORA",
> >                                           TORA_HDR_LEN) {
> >             bind_offset(&hdr_tora::offset_);
> >     }
> > } class_mytoraAgent_hdr;
> >
> > By the way , I also did modify these 2 classes in mytora.c:
> >
> > class MYTORANeighbor;
> > class MYTORADest;
> > class Height;
> >
> > class mytoraAgent : public rtAgent {
> >         friend class MYTORANeighbor;
> >         friend class MYTORADest;
> >
> > Can I still able to talk to the unmodifed TORA?
> >
> >
> > >From: "Pedro Vale Estrela" <[EMAIL PROTECTED]>
> > >Reply-To: <[EMAIL PROTECTED]>
> > >To: "'net sim'" <[EMAIL PROTECTED]>
> > >CC: <ns-users@ISI.EDU>
> > >Subject: RE: [ns] Creating an Identical Ad Hoc Routing
> > >Date: Tue, 7 Mar 2006 17:16:01 -0000
> > >
> > >
> > >Regarding the code cloning:
> > >
> > >youre my_tora cloned agents can either
> > >  - talk only to other my_tora agents;
> > >  - talk to my_tora agents, but also to unmodified tora agents;
> > >
> > >in the first case, you can simply duplicate all references to tora, 
>which
> > >will duplicate the packet header tora into my_tora. Then youre my_tora
> > >agents will communicate using my_tora packets (eg, by using 
>"hdr_mytora"
> > in
> > >the new my_tora agents)
> > >(this is very ueful for trying things while keeping the original 
>protocol
> > >100% intact).
> > >
> > >
> > >
> > >In the first case, you need to use the original tora packets, and you
> > can't
> > >change them because of compatibility with regular tora agents. Thus,
> > while
> > >you should clone the agents into my_tora, make them use the regular 
>tora
> > >packets (eg, by continuing to use "hdr_tora" instead of "hdr_mytora")
> > >
> > >
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: net sim [mailto:[EMAIL PROTECTED]
> > > > Sent: terga-feira, 7 de Margo de 2006 17:04
> > > > To: [EMAIL PROTECTED]
> > > > Cc: ns-users@ISI.EDU
> > > > Subject: RE: [ns] Creating an Identical Ad Hoc Routing
> > > >
> > > > Can you explan more ony this, "use the same hdr_tora, and remove the
> > > > duplicate definition on your
> > > > file"
> > > >
> > > > I am doing a TORA attack evaluation, therefore, i MUST use the same
> > > > hdr_tora.
> > > > And based on the trace file, i need to analyse the attacker 
>behaiour.
> > > >
> > > > set val(adhocRouting)   TORA
> > > > set val(adhocRouting2)  MYTORA
> > > > ................
> > > > $ns_ node-config -adhocRouting $val(adhocRouting2)
> > > > for {set i 2} {$i < 3 } {incr i} {
> > > >         set node_($i) [$ns_ node]
> > > >         $node_($i) random-motion 0
> > > > }
> > > >
> > > > $ns_ node-config -adhocRouting $val(adhocRouting)
> > > > for {set i 3} {$i < $val(nn) } {incr i} {
> > > >         set node_($i) [$ns_ node]
> > > >         $node_($i) random-motion 0
> > > >
> > > >
> > > >
> > > > >From: "Pedro Vale Estrela" <[EMAIL PROTECTED]>
> > > > >Reply-To: <[EMAIL PROTECTED]>
> > > > >To: "'net sim'" <[EMAIL PROTECTED]>
> > > > >CC: <ns-users@ISI.EDU>
> > > > >Subject: RE: [ns] Creating an Identical Ad Hoc Routing
> > > > >Date: Tue, 7 Mar 2006 13:39:25 -0000
> > > > >
> > > > >
> > > > >
> > > > >Either use the same hdr_tora, and remove the duplicate definition 
>on
> > >your
> > > > >file, or duplicate it to be hdr_mytora   for a complete clonage
> > > > >
> > > > >Hint: use seach and replace
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: net sim [mailto:[EMAIL PROTECTED]
> > > > > > Sent: terga-feira, 7 de Margo de 2006 13:10
> > > > > > To: [EMAIL PROTECTED]; ns-users@ISI.EDU
> > > > > > Subject: RE: [ns] Creating an Identical Ad Hoc Routing
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I made some changes and finally my erros jus reduced to few 
>only.
> > > > > >
> > > > > > In mytora/mytora.cc
> > > > > >
> > > > > >
> > > >
> > > 
> >-----------------------------------------------------------------------
> > --
> > > > -
> > > > > > --------------------------------------------
> > > > > > int hdr_tora::offset_;
> > > > > > static class MYTORAHeaderClass : public PacketHeaderClass {
> > > > > > public:
> > > > > >         MYTORAHeaderClass() :
> > PacketHeaderClass("PacketHeader/TORA",
> > > > > > TORA_HDR_LEN) {
> > > > > >             bind_offset(&hdr_tora::offset_);
> > > > > >     }
> > > > > > } class_mytoraAgent_hdr;
> > > > > >
> > > > > > static class mytoraAgentclass : public TclClass {
> > > > > > public:
> > > > > >     mytoraAgentclass() : TclClass("Agent/MYTORA") {}
> > > > > >     TclObject* create(int argc, const char*const* argv) {
> > > > > >             assert(argc == 5);
> > > > > >             return (new mytoraAgent((nsaddr_t) atoi(argv[4])));
> > > > > >     }
> > > > > > } class_mytoraAgent;
> > > > > >
> > > >
> > > 
> >-----------------------------------------------------------------------
> > --
> > > > -
> > > > > > ------------------------
> > > > > > After "make depend" , i get this error in my "make" stage
> > > > > >
> > > > > > mytora/mytora.o:(.bss+0x0): multiple definition of
> > >`hdr_tora::offset_'
> > > > > > tora/tora.o:(.bss+0x0): first defined here
> > > > > > collect2: ld returned 1 exit status
> > > > > > make: *** [ns] Error 1
> > > > > >
> > > > > > I have the same header structure name with the existing TORA
> > header!
> > > > > > I guess i have to change the name of hdr_tora to make it work, 
>but
> > i
> > > > >dono
> > > > > > where to start.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > >From: "Pedro Vale Estrela" <[EMAIL PROTECTED]>
> > > > > > >Reply-To: <[EMAIL PROTECTED]>
> > > > > > >To: "'net sim'" <[EMAIL PROTECTED]>,<ns-users@ISI.EDU>
> > > > > > >Subject: RE: [ns]  Creating an Identical Ad Hoc Routing
> > > > > > >Date: Tue, 7 Mar 2006 12:36:52 -0000
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >http://inesc-
> > > > > > 0.tagus.ist.utl.pt/~pmsrve/ns2/ns2_beginners.html#_Toc128325750
> > > > > > >
> > > > > > >5: The above, but modifying the NS2 simulator yourself.
> > > > > > >When you are doing cutting edge research, that nobody did 
>before,
> > >the
> > > > > > only
> > > > > > >solution is to model your own additions to NS2.
> > > > > > >The first thing you should do is to locate a similar module 
>that
> > >does
> > > > > > >something that you want to do also. perhaps another ad-hoc
> > routing
> > > > > > >protocol,
> > > > > > >another QoS queue discipline, etc etc. Then you should clone 
>the
> > > > code,
> > > > > > and
> > > > > > >change ALL names of variables, TCL bindings (*), C++ classes,
> > >packet
> > > > > > >headers, etc etc, to YOUR component name. When you do this 
>you'll
> > >get
> > > > a
> > > > > > >working component that you can start to SLOWLY modify to make
> > YOUR
> > > > > > >algorithms and operations.
> > > > > > >
> > > > > > >If you do this way, instead of simply start coding from 
>scratch,
> > > > you'll
> > > > > > be
> > > > > > >able to work with a working component, step by step, that you 
>are
> > > > able
> > > > >to
> > > > > > >validate every day. The alternative way, you spend months, or
> > even
> > > > >more,
> > > > > > >before the component worked for the first time.
> > > > > > >
> > > > > > >This tutorial http://masimum.dif.um.es/nsrt-howto/html/ and 
>marc
> > > > >greiss
> > > > > > >tutorials, on the part of the ping agent
> > > > > > >http://www.isi.edu/nsnam/ns/tutorial/nsnew.html#third are very
> > > > helpful
> > > > >to
> > > > > > >know which modifications are needed to integrate a new module 
>in
> > >NS2:
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: [EMAIL PROTECTED] [mailto:ns-users-
> > [EMAIL PROTECTED]
> > > > On
> > > > > > >Behalf
> > > > > > > > Of net sim
> > > > > > > > Sent: terga-feira, 7 de Margo de 2006 6:58
> > > > > > > > To: ns-users@ISI.EDU
> > > > > > > > Subject: [ns] Creating an Identical Ad Hoc Routing
> > > > > > > >
> > > > > > > >
> > > > > > > > Hi,
> > > > > > > > I would to create another identical TORA ad hoc routing
> > protocol
> > > > in
> > > > > > >Ns-2.
> > > > > > > > But i would like it to be renamed as MYTORA.
> > > > > > > > Can i copy all the files in TORA to a new folder call MYTORA
> > and
> > > > > > change
> > > > > > > > tora.c & tora.h to mytora.c & mytora.h , then edit the
> > Makefile
> > > > and
> > > > > > some
> > > > > > > > files inside ns-2.29/tcl/lib. Can list out all the steps
> > >involve?
> > > > I
> > > > >am
> > > > > > >new
> > > > > > > > to NS-2.
> > > > > > > >
> > > > > > > > Or is there any other simple method to achieve it?
> > > > > > > >
> > > > > > > > Please help. Thanks in advance.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > Neil Niu
> > > > > > > >
> > > > > >
> > > > > > >
> > > > > >
> > > > > > 
>_________________________________________________________________
> > > > > > Express yourself instantly with MSN Messenger! Download today -
> > it's
> > > > >FREE!
> > > > > > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> > > > >
> > > > >
> > > >
> > > > _________________________________________________________________
> > > > Express yourself instantly with MSN Messenger! Download today - it's
> > >FREE!
> > > > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> > >
> > >
> >
> > _________________________________________________________________
> > FREE pop-up blocking with the new MSN Toolbar  get it now!
> > http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
>
>

_________________________________________________________________
Dont just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Reply via email to