LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-08-2012, 06:43 PM   #1
savankiran
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Rep: Reputation: Disabled
adding new protocol to ns2


i have followed the steps given in the Marc Greis tutorial to the last word and put the renamed ping files into a directory named ns-allinone-2.35/ns2-2.35/eammh/

i've made the necessary changes in files like packet.h etc...
my files are eammh.cc and eammh.h
after doing make clean,make depend,make
the eammh.o file is being created successfully.
but even then i get the following error whenever i try to include Agent/Eammh in a tcl file.

error:

invalid command name "Agent/Eammh"
while executing
"Agent/Eammh instproc recv {from rtt} {
$self instvar node_
puts "node [$node_ id] received ping answer from \
$from with round-trip-ti..."
(file "eammh.tcl" line 32)

what is the problem?

--
$@V@N
 
Old 04-16-2012, 09:23 AM   #2
savankiran
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
corrected

my ns2 source files seemed to be corrupted for some reason...when i tried the same thing on my friend's system, it executed.
 
Old 03-16-2017, 10:33 AM   #3
mevaa
LQ Newbie
 
Registered: Mar 2017
Posts: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by savankiran View Post
i have followed the steps given in the Marc Greis tutorial to the last word and put the renamed ping files into a directory named ns-allinone-2.35/ns2-2.35/eammh/

i've made the necessary changes in files like packet.h etc...
my files are eammh.cc and eammh.h
after doing make clean,make depend,make
the eammh.o file is being created successfully.
but even then i get the following error whenever i try to include Agent/Eammh in a tcl file.

error:

invalid command name "Agent/Eammh"
while executing
"Agent/Eammh instproc recv {from rtt} {
$self instvar node_
puts "node [$node_ id] received ping answer from \
$from with round-trip-ti..."
(file "eammh.tcl" line 32)

what is the problem?

--
$@V@N
I have exactly the same problem. Where is the missing part?
 
Old 03-22-2017, 02:39 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,396

Rep: Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611Reputation: 3611
Usually the protocol is also to be listed in ns-allinone-2.35/ns-2.35/tcl/lib/files.tcl .

E.g. ns-default.tcl, ns-agent.tcl, ns-lib.tcl, ns-mobilenode.tcl, ns-packet.tcl
 
1 members found this post helpful.
  


Reply

Tags
ns2


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
make error in ns2.29 when adding new protocol assassin91 Linux - Newbie 25 04-24-2012 12:17 AM
error in adding new protocol in ns2.34 for fedora 14 jothi8 LinuxQuestions.org Member Success Stories 0 03-06-2012 12:33 AM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 02:44 AM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 04:39 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:24 PM.

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
Open Source Consulting | Domain Registration