[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] nodeid of packet
Hmm..the pointer to a packet doth contain this information.
Please refer to the ns manual. Check Chapter 12 "Packet Headers
and Formats" and use the source :-)
On Mon, Jun 18, 2001 at 11:13:58AM -0400, 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.
>
>