Hi everyone,
I am new in using ns2, i read the chapter 5 in the manual about node and
packet forwarding, i have my knowledge and questions about how node works.
if (cl < 0 || cl >= nslot_ || (node = slot_[cl]) == 0) {
Tcl::instance().evalf("%s no-slot %d", name(), cl);
Packet::free(p);
return;
}
Above is part of the code of classifier, in my option, i think each node
has classifier, it could be considered as a table, which has
packet-slot_num-object as a row, when a packet comes in, the node will
use classify method to find the slot_num according to this packet and
then find the object which is the downstream to receive this packet.
There are many different types of classifiers. My questions are:
1. How could this table be created, or who, in which function, create
the table. when the program starts, i think there is no
packet-slot_num-object because no packet is sent in the very beginning,
so there is no information about the packet-slot_num-object, how could
the record of the table increase? i want to know the mechanism
2. the manual says that each node could have many classifiers which do
different task, what does that mean? Could you give me an example?
3. I am sorry that i do not have an intuitive concept about the
classifier, in a node, what properties decide different classifiers? for
example, if each classifier occupies a different port or address or some
other stuff?
Thank you very much for considering my questions.