LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ns2 error while compiling (https://www.linuxquestions.org/questions/linux-software-2/ns2-error-while-compiling-861588/)

tootz 02-09-2011 05:41 AM

ns2 error while compiling
 
hi, i encountered this problem when compling the tcl code, i am not sure where went wrong, did i miss any library or component? pls advice, i have been solving this for quite long..

num_nodes is set 20
INITIALIZE THE LIST xListHead
invalid command name "Agent/UDP/PDP"
while executing
"Agent/UDP/PDP create _o30 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/UDP/PDP"
("for" body line 4)
invoked from within
"for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;#disable random motion
set p($i) [new Agent/UD..."
(file "simple_example.tcl" line 73)

bwise 02-09-2011 06:58 AM

well obviously the problem is in

set p($i) [new Agent/UDP/PDP]

As you can see in
http://www.isi.edu/nsnam/ns/doc/node102.html

There is no such agent unless you integrated it yourself in ns. In which case we would need more information and the problem is not in the code you are providing rather than the process u followed to integrate it :)

tootz 02-09-2011 10:00 AM

how do i identify the problem? cause i dont know where the problem lies! how to troubleshoot, i need help!

knudfl 02-09-2011 10:46 AM

Quote:

There is no such agent unless you integrated it yourself in ns2.
In which case we would need more information ..
Please read http://www.linuxquestions.org/linux/...Ask_a_Question
> > > http://linuxsilo.net/docs/smart-questions_en.html

Basic information to answer an ns2 question :
1) Your Linux OS : Version of Ubuntu ? Like Ubuntu 10.10 Maverick.
2) Version, ns-allinone-2.xx ( ns-allinone-2.33 ? )
2a) And did you add any patching to ns2 ?
3) Which command is done ? ( ns <file-name>.tcl ? )
4) Please provide a link to the tcl file in question.
4a) Or attach your code as name.tcl.txt, by using the "paper clip" tool
in the 'Advanced Editor' : "Post Reply".

..

tootz 02-09-2011 11:29 AM

1) Your Linux OS : Ubuntu 10.04 LTS
2) Version, ns-allinone-2.34
2a) And did you add any patching to ns2 ? nope
3) Which command is done ? ns simple_example.tcl

knudfl 02-09-2011 01:42 PM

OK, then please attach simple_example.tcl.txt : As a text file ( Hence .txt )
I.e. Make a copy of simple_example.tcl, and rename to simple_example.tcl.txt :
Else you cannot attach it as text.

( Rather difficult to run 'ns part2.png' , I think.)

Where did you get this tcl script ? A link, please.

..

tootz 02-09-2011 09:04 PM

do u have a mail so that i can email u or any msn tool or something?

bwise 02-10-2011 03:13 AM

Quote:

Originally Posted by tootz (Post 4253653)
do u have a mail so that i can email u or any msn tool or something?

Attach it here as instructed so more people can take a look and possibly help you.
So, did you integrate Agent/UDP/PDP yourself or not ?

If yes you are probably not linking the right files in your makefile or not modifying correctly what is needed, you might want to take a look at :
http://elmurod.net/wps/?p=157

If not then can you tell us where you came up with Agent/UDP/PDP ?

tootz 02-10-2011 11:09 AM

i have seen the website and i have a c++ DSDV code.

i have make a folder in ns-2.34, however do i require to modify all of this below?

* $NS_ROOT/Makefile
* $NS_ROOT/queue/priqueue.cc
* $NS_ROOT/common/packet.h
* $NS_ROOT/trace/cmu-trace.h
* $NS_ROOT/trace/cmu-trace.cc
* $NS_ROOT/tcl/lib/ns-packet.tcl
* $NS_ROOT/tcl/lib/ns-lib.tcl
* $NS_ROOT/tcl/lib/ns-agent.tcl
* $NS_ROOT/tcl/lib/ns-mobilenode.tcl

if yes, how do i do abt doing it?
my file name is DSDV.h

could you kindly guide me?


All times are GMT -5. The time now is 11:52 AM.