Hello,
in my code, I have a Tx/Rx CallBack:
void ipv4_tx(string path, Ptr<Packet const> packet, Ptr<Ipv4> ipv4, unsigned int unusedInt)
triggered by:
Config::Connect("/NodeList/1/$ns3::Ipv4L3Protocol/Tx", MakeCallback(&ipv4_tx));
The trouble is the pointer to the packet is
const, thus I cannot modify it. I need to examine the source IP address in IP header and change it eventually, which I can't do with const.
How can I capture sent/received packet in a way that allows me to modify it?
Thanks for any help, David.