LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ns2.34 new protocol creation (https://www.linuxquestions.org/questions/linux-newbie-8/ns2-34-new-protocol-creation-4175501237/)

Mayank2933 04-10-2014 12:01 PM

ns2.34 new protocol creation
 
i had made a new protocol in ns2.35 using http://www.isi.edu/nsnam/ns/tutorial/ tutorial. it was not very straight forward somehow in the end it worked. after that i tried making other new protocols but none worked.i am still trying, make succeeds the .o file gets created but when i try to use this it gives this error

invalid command name "Agent/Npkt"
while executing
"Agent/Npkt create _o158 "
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/Npkt"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(nn) } {incr i} {
set m_($i) [new Agent/Npkt]
$ns_ attach-agent $node_($i) $m_($i)
}"
(file "peg1sanch.tcl" line 103)
i am now trying in ns2.34 but same result pls help

knudfl 04-10-2014 01:18 PM

"" invalid command name "Agent/Npkt" "" :
Could be that an "Npkt" entry is mising in common/packet.h ,
? and tcl/lib/{ns-default.tcl etc.} .

Maybe no Npkt was compiled into a new executable 'ns' ?

Or you are using a wrong 'ns' ?
( If you have more than one 'ns', copy them to some new names,
like ns-orig , ns-new , ns-xyz . And run with $ ns-xyz file.tcl ).

-

Mayank2933 04-10-2014 02:09 PM

to check if i have more than one ns installed i will have to see $PATH .. right??

knudfl 04-10-2014 04:37 PM

# 3 .
Quote:

.. if .. more than one ns installed i will have to see $PATH
Kind of. I'd suggest that you delete any *PATH text added to .bashrc .
( Never required when it's your own computer : You have write access to /usr/local/.)

Default is : cd ns-2.xx/
# make install ( If the name is 'ns'.)
For other ns-name : # cp ns-new-name /usr/local/bin/

Nam : Install nam-1.14-1.el6.i686.rpm , if 32bits
https://drive.google.com/file/d/0B7S...it?usp=sharing
64bits , nam-1.14-2.el6.x86_64.rpm
https://drive.google.com/file/d/0B7S...it?usp=sharing

And Xgraph : cd xgraph-12.2/
# make install

-


All times are GMT -5. The time now is 09:17 AM.