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/

Reply via email to