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

[ns] Reg how to determine the address!!



Hi Ns-group,

 I have the following topology,

  node0-----node1-----node2-----node3

Now when I run the simulation on this topology, a trace file is generated,
in which the nodes are identified as 0, 1, 2 or 3

I tried to find out how exactly the trace file is able to cast the address
of the nodes to these numbers.....but in vain....

I did find out a few things in the proces....

Now let us assume we are using a udp agent. so when the udpagent sends
message, it invokes the classifier::recv(p,h) , which invokes
classifier::find(p), .... in this find function there is a call to
classify (p).... this classify calls mshift which uses shift_ and mask_
variables and gets the integer value , which is used in the slot_ to
determine the next downstream object the packet should be sent to....

Address::print_nodeaddr this basically obtains the casted value for the
node address to put to the trace file.... 

How are these shift_ and mask_ values set.....

Can some please explain to me how the node addresses can be obtained and
how this whole casting takes place.

I need an answer asap,
I greatly appreciate your help,

Thanks,
Archana