HOWTOs
Jump to navigation
Jump to search
Main Page - Roadmap - Summer Projects - Project Ideas - Developer FAQ - Tools - Related Projects
HOWTOs - Installation - Troubleshooting - User FAQ - Samples - Models - Education - Contributed Code - Papers
How to do various interesting things with ns-3
Developers' Pages =
Extracting IP src/dst header
Q. What is the appropriate way to extract the ip src/dst address from a packet?
A.
// copy packet to avoid modifying the original packet Ptr<Packet> copy = p->Copy (); Ipv4Header iph; copy->RemoveHeader (iph); // copy will disappear when you are done with it.
l