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

Re: target_->recv(p)?



Hi,

> Hi, everyone:
> 
> Could anyone help me to distinguish between "target_" and "classifier_"?
> 
> A sending node sends a packet using "sendpkt" and
> "target_->recv(p)" delivers the packet downstream one hop. 
> Does it mean every node connected to the sending node will
> receive the packet. I don't think so, but can not figure it out.

The class Connector connects agents to "nodes", among other
things.  When your agent calls the method Connector::send(packet, handler)
to send a packet, this method delivers it to its node classifier, since
Connector::target_, in this case,  points to it. When the packet is received 
by the method Classifier::recv(), this method calls Classifier::find(packet) 
to determine the next node. 

> 
> Otherwise, may "Classifier::recv(Packet *p, Handler*)" be used
> to determine to which node the packet is sent first?

Classifier::find(), as I said,  determines the next node.

> 
> Thank you very much!
> 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
> Bing Chen   (702)895-1428      [email protected] 
> Dept. of Electrical and Computer Engineering
> University of Nevada, Las Vegas, NV  89154
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 

I hope it helps.


	Flavio.


-- 

------------------------------------------------------------
Flavio Paiva Junqueira - M. Sc.  Student, COPPE/UFRJ/PEE 
Research area: Active and Programmable Networks
E-mail:[email protected]     http://www.gta.ufrj.br/~flavio
------------------------------------------------------------