Difference between revisions of "HOWTOs"

From Nsnam
Jump to: navigation, search
Line 3: Line 3:
 
* [[HOWTO get ns-3 running on Mac OS X (10.5.2 Intel)]]
 
* [[HOWTO get ns-3 running on Mac OS X (10.5.2 Intel)]]
 
* [[HOWTO use VMware to set up virtual networks (Windows)]]
 
* [[HOWTO use VMware to set up virtual networks (Windows)]]
 +
* [[HOWTO extract the IP src/dst address from a packet]]
  
 
== Developers' Pages ==
 
== Developers' Pages ==

Revision as of 23:34, 5 August 2008

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - 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