Saturday, April 7, 2012

[ns] adding new protocol

hi,
I'm trying to add the ping protocol as shown in the tutorial provided by
Marc Greis.
I'm not trying to change anything except for the name as ping already
exists in ns-2.35.
i am doubtful as to how to
1) modify the ns-packet.tcl
2)Makefile

the updates shown in the tutorial are for older versions and ns seems to be
changed a lil from then.

1) in ns-packet.tcl , i just added the protocol name to the protolist
2) in Makefile , i added the link to the object file i.e.,
folder/protocolname.o

i recompiled the sources using make successfully, but when i invoke the
agent from a sample tcl file, i get the foloowing error :

invalid command name "Agent/Eammh"
while executing
"Agent/Eammh create _o59 "
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/Eammh"
invoked from within
"set p0 [new Agent/Eammh]"
(file "eammh.tcl" line 34)

can anyone tell me what am i doing wrong ?? (Mayb with the shadowclass
binding)
appreciate any help.
thank you.
--
$@V@N

No comments:

Post a Comment

Counter

blogger analytics