LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-10-2014, 11:01 AM   #1
Mayank2933
LQ Newbie
 
Registered: Mar 2014
Posts: 6

Rep: Reputation: Disabled
Unhappy 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
 
Old 04-10-2014, 12:18 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
"" 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 ).

-
 
1 members found this post helpful.
Old 04-10-2014, 01:09 PM   #3
Mayank2933
LQ Newbie
 
Registered: Mar 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
to check if i have more than one ns installed i will have to see $PATH .. right??
 
Old 04-10-2014, 03:37 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
# 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

-
 
  


Reply

Tags
ns2 ns234


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding new protocol to ns2 savankiran Programming 3 03-22-2017 01:39 PM
Create a new protocol in ns2.31 Retta Linux - Software 8 02-03-2014 05:40 AM
Leach Protocol for ns2.34 pushpita Linux - Software 36 07-08-2013 04:06 AM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 03:39 AM


All times are GMT -5. The time now is 12:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration