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

Q: usage of recv(Packet*)



Hi,

I'd appreciate input on this following -probably simple- question on ns
which I require to understand ns better.

The target_ of the linkdelay object is the ttl checker object. The
linkdelay object passes a
packet to the ttl checker object by the following line (in delay.cc)

s.schedule(target_, p, txt + delay_);     // static links

if I walk through the code in scheduler.cc I reckon that at the
scheduled time, the handle() function at the target_ is called, with the
packet (event) as an argument. At the ttl checker  object, there is no
handle function so the one defined in object.cc is used (ttl checker
inherits from connector, inherits from nsobject). That handle function
does the following:

recv((Packet *)e);    // e being an event, always a packet in this case

Q: where can I find the recv(Packet*) function that is called.

I know that at the classifier object (coming after the ttl checker
object) the function
recv(Packet* p, Handler* h) is called, but how is this done given the
previous?

Regards, Sjoerd Janssen.