Re: [ns] Altering Packet Data

2010-11-25 Thread avinash chaurasia
strcpy(((PacketData*)(data-userdata())-data(), readbuf); here readbuf is char array contains ur data to be set. Hopefully this will help you. On Mon, Nov 22, 2010 at 12:44 PM, Dhara Buch dharab...@yahoo.com wrote: Hello, I want to change the data field of Packet p. I get it through

Re: [ns] Altering Packet Data

2010-11-21 Thread Dhara Buch
Hello, I want to change the data field of Packet p. I get it through userdata(), as follows. But after updating, how to set it back? PacketData* data = (PacketData*)p-userdata(); Thank you, Dhara Buch