LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   adding a new protocol (https://www.linuxquestions.org/questions/linux-software-2/adding-a-new-protocol-865778/)

tootz 03-01-2011 12:34 PM

adding a new protocol
 
I have created a SDL protocol and i would like to add in the protocol to my linux machine, but this error came out.

i followed http://www.isi.edu/nsnam/ns/tutorial/

PHP Code:

SD_APP.oIn function `PDPAgent::command(int, char const* const*)':
SD_APP.cc:(.text+0x584): undefined reference to 
`DataBus'
SD_APP.cc:(.text+0x777): undefined reference to `DataBus'
collect2ld returned 1 exit status
make
: *** [nsError 1 

could someone advice?

zWaR 03-01-2011 12:58 PM

It's been a while since I've been working with ns, but I'd guess there is a declaration of DataBus in one of the .h files missing ... Check also the Tcl file if it's ok.

jmajor 03-01-2011 06:38 PM

I haven't used ns ever, however, looking at the errors I suspect that in that tutorial in section VII you missed the step where you add your object file, where you implement the DataBus object, to the Makefile.

tootz 03-02-2011 08:06 AM

is there any steps on how to resolve this?
this is quite urgent
thanks

knudfl 03-02-2011 03:36 PM

http://www.isi.edu/nsnam/ns/tutorial/ is the front page.
You will have to specify the chapter, like e.g. VIII or XI.
And / or : right click on the index = left column, and
"Copy Link Location" for the chapter, and show it, like : examples
http://www.isi.edu/nsnam/ns/tutorial...pt2.html#first
http://www.isi.edu/nsnam/ns/tutorial...pt4.html#first


And please attach your code(s), or upload it to a pastebin site,
+ provide a link to the file location.

..

tootz 03-03-2011 05:54 AM

3 Attachment(s)
http://www.isi.edu/nsnam/ns/tutorial/nsnew.html i tried to add the SDL protocol using this

i have attached my files in here, kindly advice thanks

knudfl 03-03-2011 08:36 AM

Simple data link (SDL) protocol
http://www.google.com/webhp#hl=en&su...e96c95c947f3f0


http://www.isi.edu/nsnam/ns/tutorial/nsnew.html , chapter VII.2. :
QUOTE : .. "But first of all, some other files have to be edited
before ns can be recompiled."

..

tootz 03-03-2011 09:03 AM

okie... wad is the files that is needed to be edited? could you advice?
i have added the steps in http://www.isi.edu/nsnam/ns/tutorial/nsnew.html but i cant compile
thanks =)

jmajor 03-07-2011 07:55 PM

In your SD_APP_HDR.h you declare DataBus as external (defined by another cpp module). Do you know which library or cpp file defines this global variable? When you find that, add it to the things to be linked by the make file.

knudfl 03-08-2011 02:54 AM

VII.2 , please read the line coming right after this text :
Quote:

But first of all, some other files have to be edited
before ns can be recompiled
→ That is 'VII.3. Necessary changes'
http://www.isi.edu/nsnam/ns/tutorial/nsnew.html#third


All times are GMT -5. The time now is 10:06 AM.