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

Re: [ns] nodeid of packet



You mean you want to count the number packets received at a particular
destination node? If so, all the information needed can be found in the
trace file. You just need to parse it a little bit...;)

-chen xuan


 On Mon, 18 Jun 2001, Nandkishore Muralidharan wrote:

> Hi all,
> I want to count the number of packets that originate from a particular
> node or a set of nodes in a WAN that I have created. I would like to do
> this at the TCPSink as I am running TCP based simulations. The pointer
> to a packet does not contain this information as far as I know.
>
> I have tried adding a variable to the Packet class in packet.h and tried
> to assign the nodeid from the arriving packet at various places (ip.cc,
> mac.cc, channel.cc ...) but am not able to do so.
>
> When I try printing the variable in the ns script it always prints the
> default value that I have given in ns-default.tcl
>
> How can I find the node from which a particular packet has originated
> ???
>
> Thanks ,
>
> Nandkishore.
>
>

-- 
Xuan Chen
USC/ISI