Kun-chan Lan
I'm having terrible difficulty figuring out which code actually causes a
packet to be sent when a CBR agent is started in a simulation.>From what I can see, the CBR_Traffic::start() method in ns/cbr_traffic.cc
calls the method timeout(), inherited from the class TrafficGenerator in
trafgen.cc, which in turn calls its send(int) method inherited from class
Application. Application::send(int) calls Agent::sendmsg(int), which I
assume is inherited from class Connector, since the signatures of the
other sendmsg methods within Agent do not match a single int argument.However, Connector has no sendmsg(int) method, so I checked NsObject,
which Connector inherits from. But it doesn't have a sendmsg(int) method
either, and neither does TclObject.I don't get it. Is CBR_Traffic::start() not the method invoked when the
following OTcl line is interpreted?$ns at 1.0 "$cbr0 start"
(where cbr0 is an Application/Traffic/CBR agent)
--Pat.
-- _____________________________________________________ Kun-chan Lan Computer Science, University of Southern California 4915 Sawtelle Blvd #2, Culver City, CA 90230 http://www.isi.edu/~kclan (H)310-391-7208 (O)310-448-8260