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

Re[2]: target_->recv(p)?



Hello,

When I first got ns, I was confused by its documents. Though the
"Tutorial" by Marc Greis is very instructive, it is hard for me to
find out the relationship between objects in ns and real networks. I
think the problem of Bing Chen is a such kind problem. Now I know
something about ns (listed below), but I think it is not
comprehensive. So I think there should be a document recording the
basic conception of the developer of ns, such as why creat a class
named "Agent" and what is the corresponding object in the real
networks. (I think the "http://web.mit.edu/kerberos/www/dialogue.html"
of Kerberos is a good example.) I do not know if there had been such a
document but I think it will be helpful.

FPJ> 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.

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

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

FPJ> 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
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++
>>

FPJ> I hope it helps.


FPJ>         Flavio.


FPJ> --

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




Best regards,
 Huang                            mailto:[email protected]