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:02:51 -0000


Do "grep -d recurse  -i tora" on top of your NS2 tree,
and clone ALL accoureces of "tora"


> -----Original Message-----
> From: net sim [mailto:[EMAIL PROTECTED]
> Sent: terça-feira, 7 de Março de 2006 16:39
> To: [EMAIL PROTECTED]
> Subject: RE: [ns] Creating an Identical Ad Hoc Routing
>
> Thanks for the reply
> I decided to do a complete clone using "hdr_mytora".
> In trace/cmu-trace,
> ---------------------------------------------------------------------
> CMUTrace::format_mytora(Packet *p, int offset)
> {
>         struct hdr_tora *th = HDR_TORA(p);
>         struct hdr_tora_qry *qh = HDR_TORA_QRY(p);
>         struct hdr_tora_upd *uh = HDR_TORA_UPD(p);
>         struct hdr_tora_clr *ch = HDR_TORA_CLR(p);
> ----------------------------------------------------------------------
> I only managed to compile successfully if using the format above.
> while in my tora/tora-packet.cc, I already changed all to HDR_MYTORA***
> If used MYTORA** , i get a lot of undefined reference errors.
>
>
> When i run the tora.tcl, the simulation ended prematurely. Output tr and
> nam
> generated were 0kb.
> --------------------------------------------------------------------------
> ----------------------
> [EMAIL PROTECTED] dut]# ns tora.tcl
> num_nodes is set 6
> INITIALIZE THE LIST xListHead
> using backward compatible Agent/CBR; use Application/Traffic/CBR instead
> Start of simulation..
> channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
> highestAntennaZ_ = 1.5,  distCST_ = 550.0
> SORTING LISTS ...DONE!
> [EMAIL PROTECTED] dut]# ns mytora.tcl
> num_nodes is set 6
> INITIALIZE THE LIST xListHead
> using backward compatible Agent/CBR; use Application/Traffic/CBR instead
> Start of simulation..
> [EMAIL PROTECTED] dut]#
> --------------------------------------------------------------------------
> ----------------------------
> Both tcl are identical, just the routing proto used is different.
> What steps are missing , or did I do something wrong?
>
>
>
> >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: terça-feira, 7 de Março 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
> >greis’s
> > > >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:[EMAIL PROTECTED]
> On
> > > >Behalf
> > > > > Of net sim
> > > > > Sent: terça-feira, 7 de Março 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/
> >
> >
>
> _________________________________________________________________
> FREE pop-up blocking with the new MSN Toolbar – get it now!
> http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/



_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Reply via email to