HOWTO extract the IP src/dst address from a packet: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{TOC}} | {{TOC}} | ||
A common question we hear is, "what is the appropriate way to extract the ip | |||
to | src/dst address from a packet"? Here is the official answer ... | ||
== HOWTO | == HOWTO extract the IP src/dst address from a packet == | ||
What is the appropriate way to extract the ip src/dst address from a packet? | |||
// 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. | |||
[[User:Craigdo|Craigdo]] 19:55, 5 August 2008 (EDT) |
Latest revision as of 23:55, 5 August 2008
Main Page - Roadmap - Summer Projects - Project Ideas - Developer FAQ - Tools - Related Projects
HOWTOs - Installation - Troubleshooting - User FAQ - Samples - Models - Education - Contributed Code - Papers
A common question we hear is, "what is the appropriate way to extract the ip src/dst address from a packet"? Here is the official answer ...
HOWTO extract the IP src/dst address from a packet
What is the appropriate way to extract the ip src/dst address from a packet?
// 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.
Craigdo 19:55, 5 August 2008 (EDT)