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

RE: [ns] Packet Caching





--
Free Dmitry Sklyarov ! 
http://www.freesklyarov.org

> -----Original Message-----
> From:	aashishp [SMTP:[email protected]]
> Sent:	Tuesday, November 27, 2001 4:17 AM
> To:	[email protected]
> Subject:	[ns] Packet Caching
> 
> Hello,
> 
> I am trying to cache packets in intermediate nodes at the link layer.
> However, I am having problems storing the packets in some structure.
> Basically,
> 
> I create a new copy using the Packet::copy() method.
> I was storing these copies in a stl map class. However, moment I store
> this copy, the original packet from which I made this copy is not
> forwarded using the sendUp(Packet *) method of the link layer.If i don't
> store then the packet is forwarded. Why should the copy affect the
> behavior of the original packet?
> 
> I tried to use an array of Packet* statically allocated. This is giving me
> segmentation faults. Will dynamically creating an array affect the
> way
> Packet class is handled in ns.
> 
> i.e. if I do
> Packet *list = new Packet[num]
> 
> I ask this because packets are already allocated and kept in ns. I will be
> allocating more by this call
> 
> Thanks
> 
> Aashish Patil
> 
> 
	Please send some more of your code, otherwise we can't help.

	Bye
	Alex