HOWTOs: Difference between revisions

From Nsnam
Jump to navigation Jump to search
(ip src/dst addr howto)
 
(74 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{TOC}}
{{TOC}}
== How to do Various Interesting Things with ns-3 ==


[http://gicl.cs.drexel.edu/people/tjkopena/wiki/pmwiki.php?n=NS3.NS3 Joseph Kopena's ns-3 wiki]
=== System-Related Items ===
* [https://sites.google.com/thapar.edu/ramansinghtechpages/step-wise-establishing-connection Using Docker with ns-3 (Raman Singh's TechPages)]
* [[HOWTO make ns-3 interact with the real world]]
* [[HOWTO use VirtualBox to run simulations on Windows machines]]
* [[HOWTO get ns-3 running on Mac OS X (10.5.2 Intel)]]
* [[HOWTO get ns-3 running on Mac OS X (10.6.2 Intel)]]
* [[HOWTO Use Linux Containers to set up virtual networks]]
* [[HOWTO use VMware to set up virtual networks (Windows)]]
* [[HOWTO Use CORE to test ns-3 protocols]]
**[[HOWTO_use CORE to test ns-3 TCP]]
* [[HOWTO use ns-3 scripts to drive real hardware (experimental)]]
* [[HOWTO use ns-3 directly on the ORBIT testbed hardware]]
* [[HOWTO use ns-3 in the ORBIT testbed environment]]
* [[HOWTO use ns-3 directly on the CMU wireless emulator]]
* [[HOWTO use ns-3 with other libraries]]
* [[HOWTO use ns-3 on Windows with Visual Studio 2010]]
* [[HOWTO use ns-3 with BonnMotion mobility generator and analysis tool]]


== Getting started on Mac OS X ==
=== Programming-Related Items ===
* [[HOWTO make and use a new application]]
* [[HOWTO extract the IP src/dst address from a packet]]
* [[HOWTO create a new type of protocol header or trailer]]
* [[HOWTO use null callbacks]]
* [[HOWTO create a new OSI layer 1 + 2 implementation]]
* [[HOWTO create a traffic generator]]
* [[HOWTO determine the path of an attribute or trace source]]
* [[HOWTO use the ConfigStore]]
* [[HOWTO determine all the available Values]]
* [http://www.eg.bucknell.edu/~perrone/2010/08/19/looking-at-ns-3-packet-traces/ HOWTO work with ns-3 packet traces]
* [http://www.eg.bucknell.edu/~perrone/2010/08/27/creating-a-new-module-in-ns-3/ HOWTO create a new module in ns-3]
* [[HOWTO enable a subset of ns-3's modules]]
* [[HOWTO enable/disable examples and tests in ns-3]]
* [[HOWTO resolve circular references in ns-3 memory disposal]]
* [[HOWTO use IP interface indexes]]


(Notes courtesy of Craig Dowell)
==== IDE Integration ====
For a new Mac (OS X 10.5.2 Intel), here are
* [[HOWTO configure Eclipse with ns-3]]
the (quite painless) steps I used to get an ns-3 development environment up
* [[HOWTO configure NetBeans with ns-3]]
and running, clone, compile, and unit and regression test ns-3-dev. 
* [[HOWTO configure QtCreator with ns-3]]


1.  Join Apple Developer Connection (for free ­ internet user);
=== Debugging-Related Items ===
    a.  Go to http://developer.apple.com/products/
* [[HOWTO use NS_LOG to find a problem]]
    b.  Select Join ADC Online Membership
* [[HOWTO use gdb to debug program errors]]
    c.  Log in with Apple ID
* [[HOWTO understand and find cause of terminated with signal errors]]
    d.  Fill out Become an ADC Member form
* [[HOWTO debug smart pointer | HOWTO debug smart pointers and packet pointers]]
    e.  Tell them what kind of code you develop
* [[HOWTO use Valgrind to debug memory problems]]
    f.  You are redirected to Developer Connection | Member Site
* [[HOWTO resolve circular references in ns-3 memory disposal]]
2.  Download XCode for your OS (3.0 for Leopard at writing) Disk Image;
* [[HOWTO build old versions of ns-3 on newer compilers]]
    a.  From Developer Connection | Member Site select Downloads, get
* [[HOWTO use oprofile]] to profile your ns-3 program
        directed to What¹s New
* [[HOWTO use latest gcc release]] to test ns-3 compatibility
    b.  Select Developer Tools from Downloads list
    c.  Scroll down to XCode releases and select a Disk Image
    d.  Be prepared for over 1GB download ~1/2 hour on 6mbps cable
3.  Install the Xcode Tools
    a.  Double-clock on XcodeTools.mpkg
    b.  Perform Standard Install
    c.  Open a terminal
    d.  Type gcc and see something like
        Bash 3.2$ gcc
        i686-apple-darwin9-gcc-4.0.1: no input files
        bash-3.2$
4.  Install Mercurial
    a.  Go to http://www.selenic.com/mercurial/wiki/index.cgi/Download
    b.  Select the Binary Package option
    c.  Select Mac OS X
    d.  Select Mercurial 1.0 for OS X 10.5 (if appropriate)
    e.  Double-click  on package and follow instructions.
    f.  Execute command
        which hg
        in terminal or xterm
    g.  If no hg listed, you may have to add /usr/local/bin to your
        path, e.g. export PATH=$PATH:/usr/local/bin
5.  Clone ns-3-dev
    a.  mkdir repos;cd !$
    b.  hg clone http://code.nsnam.org/ns-3-dev
6.  Build ns-3-dev
    a.  cd ns-3-dev
    b.  ./waf configure ­d debug
    c.  ./waf
7.  Run Unit Tests
    a. ./waf check
8.  Run Regression Tests
    a. ./waf --regression


== Extracting IP src/dst header ==
=== Mercurial- and Git-Related Items ===
* [[HOWTO use Mercurial Queues to manage your ns-3 patches]]
* [[HOWTO use Git instead of Mercurial]]
* [[HOWTO update your code across a large whitespace change]]


Q.  What is the appropriate way to extract the ip src/dst address from a packet?
=== Data Analysis-Related Items ===
* [[HOWTO get ns-3 data into SciPy]]
* [[HOWTO get ns-3 data into ROOT]]
* [[HOWTO get ns-3 data into SciLab]]
* [[HOWTO get ns-3 data into Octave]]
* [[HOWTO get ns-3 to detect steady-state times in your data]]


A. 
=== Code Review-Related Items ===
  // copy packet to avoid modifying the original packet
* [[HOWTO use the coding style tool]]
  Ptr<Packet> copy = p->Copy ();
* [[HOWTO control Rietveld patch generation]]
  Ipv4Header iph;
 
  copy->RemoveHeader (iph);
=== WiFi Model-Related Items ===
  // copy will disappear when you are done with it.
* [[HOWTO add basic rates to 802.11]]
 
----
[[User:Craigdo|Craigdo]] 16:34, 22 April 2010 (UTC)

Latest revision as of 23:52, 15 June 2022

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

System-Related Items

Programming-Related Items

IDE Integration

Debugging-Related Items

Mercurial- and Git-Related Items

Data Analysis-Related Items

Code Review-Related Items

WiFi Model-Related Items


Craigdo 16:34, 22 April 2010 (UTC)