[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] new packet header/ how make work?



> I follow the example from chapter 7, however it doesn't completely
> describe how to do the Tcl code for the new agent type.  (ie. where should
> my Tcl code go? Is there a standard file naming convention?  Chapter 9.6
> also describes creating a new agent, but I don't see new information
> presented there... I presently have put the 'recv' function Tcl code
> within my simulation Tcl code.  This simulation doesn't even create
> the new kind of packet or the new agent, so I don't understand why the
> code is bombing.

If you want to compile your tcl code into ns, you have to add your file
into tcl/lib/ns-lib.tcl, or one of the files that are sourced in
ns-lib.tcl. 

But it'd be bettre to source your own tcl code in your simulation scripts,
thus you do not need to compile ns every time you change your agent code
in tcl.