[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] new routing protocol
Dear all,
I am trying to implement a new routing protocol. I first tried
to just "copy" the "DV" routing protocol and rename it to "NEWDV",
but met a strange problem.
What I did was:
1. copy "~ns/rtProtoDV.{h,cc}" to "~ns/rtProtoNEWDV.{h,cc}"
and rename the class names correspondingly.
2. add the new packet type in "~ns/packet.h"
3. add the new entry in "~ns/tcl/lib/ns-packet.tcl"
4. modify the "~ns/tcl/rtglib/route-proto.tcl" file:
copy the codes for DV routing, and paste them in the same file,
then rename "DV" to "NEWDV".
After the above modifications, I did "make depend" and "make".
Nothing seemed to be wrong, and I got the ns executable.
But when I ran a simple test script:
$ns simple.tcl
it began to print a lot of tcl scripts on the screen, which begin with:
ns:
proc warn {msg} {
global warned_
if {![info exists warned_($msg)]} {
puts stderr "warning: $msg"
set warned_($msg) 1
}
}
if {[info commands debug]==" "} {
proc debug args {
warn {Script debugging disabled. Reconfigure with --with-tcldebug, and recompile.}
}
}
.......
Can anyone tell me what the problem is?
I am using ns-allinone-2.1b7a under Red Hat Linux 7.1.
Thanks,
Jerry