doc/tutorial/getting-started.texi
author Mitch Watrous <watrous@u.washington.edu>
Fri, 15 Oct 2010 16:31:32 -0700
changeset 6624 a071889af159
parent 6489 ad7efe876e91
permissions -rw-r--r--
Remove regression tests from waf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     1
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     2
@c ========================================================================
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     3
@c Begin document body here
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     4
@c ========================================================================
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     5
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     6
@c ========================================================================
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     7
@c PART:  Getting Started
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     8
@c ========================================================================
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     9
@c The below chapters are under the major heading "Getting Started"
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    10
@c This is similar to the Latex \part command
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    11
@c
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    12
@c ========================================================================
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    13
@c Getting Started
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    14
@c ========================================================================
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    15
@node Getting Started
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    16
@chapter Getting Started
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    17
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    18
@menu
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    19
* Downloading ns-3::
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    20
* Building ns-3::
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    21
* Testing ns-3::
3341
7130a81b683c nits on Sections 1-4
Tom Henderson <tomh@tomh.org>
parents: 3332
diff changeset
    22
* Running a Script::
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    23
@end menu
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    24
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    25
@c ========================================================================
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    26
@c Downloading ns-3
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    27
@c ========================================================================
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    28
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    29
@node Downloading ns-3
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    30
@section Downloading ns-3
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    31
6267
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    32
@cindex Prerequisites
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    33
@cindex Dependencies
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    34
The @command{ns-3} system as a whole is a fairly complex system and has a
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    35
number of dependencies on other components.  Along with the systems you will
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    36
most likely deal with every day (the GNU toolchain, Mercurial, you programmer
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    37
editor) you will need to ensure that a number of additional libraries are
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    38
present on your system before proceeding.  @command{ns-3} provides a wiki
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    39
for your reading pleasure that includes pages with many useful hints and tips.
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    40
One such page is the ``Installation'' page,
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    41
@uref{http://www.nsnam.org/wiki/index.php/Installation}.
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    42
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    43
The ``Prerequisites'' section of this wiki page explains which packages are 
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    44
required to support common @command{ns-3} options, and also provides the 
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    45
commands used to install them for common Linux variants.  Cygwin users will
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    46
have to use the Cygwin installer (if you are a Cygwin user, you used it to
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    47
install Cygwin). 
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    48
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    49
You may want to take this opportunity to explore the @command{ns-3} wiki 
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    50
a bit since there really is a wealth of information there. 
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    51
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    52
@cindex Linux
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    53
@cindex Cygwin
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    54
@cindex GNU
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    55
@cindex toolchain
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3347
diff changeset
    56
@cindex Mercurial
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3347
diff changeset
    57
@cindex Waf
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    58
From this point forward, we are going to assume that the reader is working in
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    59
Linux or a Linux emulation environment (Linux, Cygwin, etc.) and has the GNU
6267
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    60
toolchain installed and verified along with the prerequisites mentioned 
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    61
above.  We are also going to assume that you have Mercurial and Waf installed
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    62
and running on the target system as described in the ``Getting Started'' section 
87a6cccfb2b5 Mention wiki page with prerequisites in tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 6189
diff changeset
    63
of the  @command{ns-3} web site: 
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3347
diff changeset
    64
@uref{http://www.nsnam.org/getting_started.html}.
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    65
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    66
@cindex tarball
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
    67
The @command{ns-3} code is available in Mercurial repositories on the server
4533
f4d74e20ad78 tuturial fixes
Andrey Hippo<ahippo@yandex.ru>
parents: 4304
diff changeset
    68
@uref{http://code.nsnam.org}.  You can also download a tarball release at
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3354
diff changeset
    69
@uref{http://www.nsnam.org/releases/}, or you can work with repositories
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    70
using Mercurial.  We recommend using Mercurial unless there's a good reason
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    71
not to.  See the end of this section for instructions on how to get a tarball
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    72
release.
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    73
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    74
@cindex repository
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    75
The simplest way to get started using Mercurial repositories is to use the
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    76
@code{ns-3-allinone} environment.  This is a set of scripts that manages the 
4533
f4d74e20ad78 tuturial fixes
Andrey Hippo<ahippo@yandex.ru>
parents: 4304
diff changeset
    77
downloading and building of various subsystems of @command{ns-3} for you.  We 
4293
11a2cda6a096 clean up tutorial up through tweaking section
Craig Dowell <craigdo@ee.washington.edu>
parents: 4292
diff changeset
    78
recommend that you begin your @command{ns-3} adventures in this environment
11a2cda6a096 clean up tutorial up through tweaking section
Craig Dowell <craigdo@ee.washington.edu>
parents: 4292
diff changeset
    79
as it can really simplify your life at this point.
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    80
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    81
@subsection Downloading ns-3 Using Mercurial
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    82
One practice is to create a directory called @code{repos} in one's home 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    83
directory under which one can keep local Mercurial repositories.  
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    84
@emph{Hint:  we will assume you do this later in the tutorial.}  If you adopt
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    85
that approach, you can get a copy of @code{ns-3-allinone} by typing the 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    86
following into your Linux shell (assuming you have installed Mercurial):
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    87
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    88
@verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    89
  cd
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    90
  mkdir repos
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    91
  cd repos
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    92
  hg clone http://code.nsnam.org/ns-3-allinone
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    93
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    94
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    95
As the hg (Mercurial) command executes, you should see something like the 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    96
following displayed,
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    97
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    98
@verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
    99
  destination directory: ns-3-allinone
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   100
  requesting all changes
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   101
  adding changesets
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   102
  adding manifests
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   103
  adding file changes
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   104
  added 31 changesets with 45 changes to 7 files
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   105
  7 files updated, 0 files merged, 0 files removed, 0 files unresolved
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   106
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   107
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   108
After the clone command completes, you should have a directory called 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   109
@code{ns-3-allinone} under your @code{~/repos} directory, the contents of which should 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   110
look something like the following:
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   111
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   112
@verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   113
  build.py*  constants.py  dist.py*  download.py*  README  util.py
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   114
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   115
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   116
Notice that you really just downloaded some Python scripts.  The next step
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   117
will be to use those scripts to download and build the @command{ns-3}
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   118
distribution of your choice.
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   119
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   120
@cindex repository
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   121
If you go to the following link: @uref{http://code.nsnam.org/},
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   122
you will see a number of repositories.  Many are the private repositories of
3347
dde05296726b mispeeling in tutorial command sequence
Craig Dowell <craigdo@ee.washington.edu>
parents: 3346
diff changeset
   123
the @command{ns-3} development team.  The repositories of interest to you will
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   124
be prefixed with ``ns-3''.  Official releases of @command{ns-3} will be 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   125
numbered as @code{ns-3.<release>.<hotfix>}.  For example, a second hotfix to a
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   126
still hypothetical release nine of @command{ns-3} would be numbered as
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   127
@code{ns-3.9.2}.
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   128
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   129
The current development snapshot (unreleased) of @command{ns-3} may be found 
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   130
at @uref{http://code.nsnam.org/ns-3-dev/}.  The 
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   131
developers attempt to keep these repository in consistent, working states but
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   132
they are in a development area with unreleased code present, so you may want 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   133
to consider staying with an official release if you do not need newly-
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   134
introduced features.
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   135
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   136
Since the release numbers are going to be changing, I will stick with 
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   137
the more constant ns-3-dev here in the tutorial, but you can replace the 
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   138
string ``ns-3-dev'' with your choice of release (e.g., ns-3.6) in the 
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   139
text below.  You can find the latest version  of the
4533
f4d74e20ad78 tuturial fixes
Andrey Hippo<ahippo@yandex.ru>
parents: 4304
diff changeset
   140
code either by inspection of the repository list or by going to the 
f4d74e20ad78 tuturial fixes
Andrey Hippo<ahippo@yandex.ru>
parents: 4304
diff changeset
   141
@uref{http://www.nsnam.org/getting_started.html,,``Getting Started''} 
f4d74e20ad78 tuturial fixes
Andrey Hippo<ahippo@yandex.ru>
parents: 4304
diff changeset
   142
web page and looking for the latest release identifier.
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   143
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   144
Go ahead and change into the @code{ns-3-allinone} directory you created when
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   145
you cloned that repository.  We are now going to use the @code{download.py} 
4533
f4d74e20ad78 tuturial fixes
Andrey Hippo<ahippo@yandex.ru>
parents: 4304
diff changeset
   146
script to pull down the various pieces of @command{ns-3} you will be using.
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   147
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   148
Go ahead and type the following into your shell (remember you can substitute
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   149
the name of your chosen release number instead of @code{ns-3-dev} -- like
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   150
@code{"ns-3.6"} if you want to work with a 
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   151
stable release).
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   152
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   153
@verbatim
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   154
  ./download.py -n ns-3-dev
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   155
@end verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   156
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   157
Note that the default for the @code{-n} option is @code{ns-3-dev} and so the
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   158
above is actually redundant.  We provide this example to illustrate how to
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   159
specify alternate repositories.  In order to download @code{ns-3-dev} you 
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   160
can actually use the defaults and simply type,
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   161
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   162
@verbatim
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   163
  ./download.py
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   164
@end verbatim
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   165
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3347
diff changeset
   166
As the hg (Mercurial) command executes, you should see something like the 
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3347
diff changeset
   167
following,
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   168
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   169
@verbatim
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   170
      #
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   171
      # Get NS-3
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   172
      #
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   173
  
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   174
  Cloning ns-3 branch
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   175
   =>  hg clone http://code.nsnam.org/ns-3-dev ns-3-dev
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   176
  requesting all changes
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   177
  adding changesets
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   178
  adding manifests
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   179
  adding file changes
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   180
  added 4634 changesets with 16500 changes to 1762 files
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   181
  870 files updated, 0 files merged, 0 files removed, 0 files unresolved
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   182
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   183
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   184
This is output by the download script as it fetches the actual @code{ns-3}
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   185
code from the repository.
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   186
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   187
The download script is smart enough to know that on some platforms various
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   188
pieces of ns-3 are not supported.  On your platform you may not see some
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   189
of these pieces come down.  However, on most platforms, the process should
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   190
continue with something like,
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   191
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   192
@verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   193
      #
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   194
      # Get PyBindGen
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   195
      #
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   196
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   197
  Required pybindgen version:  0.10.0.640
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   198
  Trying to fetch pybindgen; this will fail if no network connection is available.  Hit Ctrl-C to skip.
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   199
   =>  bzr checkout -rrevno:640 https://launchpad.net/pybindgen pybindgen
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   200
  Fetch was successful.
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   201
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   202
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   203
This was the download script getting the Python bindings generator for you.
6489
ad7efe876e91 minor tutorial update for clarity
Josh Pelkey <jpelkey@gatech.edu>
parents: 6267
diff changeset
   204
Note that you will need bazaar (bzr), a version control system, to download 
ad7efe876e91 minor tutorial update for clarity
Josh Pelkey <jpelkey@gatech.edu>
parents: 6267
diff changeset
   205
PyBindGen. Next you should see (modulo platform variations) something along 
ad7efe876e91 minor tutorial update for clarity
Josh Pelkey <jpelkey@gatech.edu>
parents: 6267
diff changeset
   206
the lines of,
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   207
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   208
@verbatim
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   209
      #
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   210
      # Get NSC
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   211
      #
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   212
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   213
  Required NSC version:  nsc-0.5.0
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   214
  Retrieving nsc from https://secure.wand.net.nz/mercurial/nsc
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   215
   =>  hg clone https://secure.wand.net.nz/mercurial/nsc nsc
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   216
  requesting all changes
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   217
  adding changesets
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   218
  adding manifests
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   219
  adding file changes
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   220
  added 273 changesets with 17565 changes to 15175 files
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   221
  10622 files updated, 0 files merged, 0 files removed, 0 files unresolved
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   222
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   223
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   224
This part of the process is the script downloading the Network Simulation
6489
ad7efe876e91 minor tutorial update for clarity
Josh Pelkey <jpelkey@gatech.edu>
parents: 6267
diff changeset
   225
Cradle for you. Note that NSC is not supported on OSX or Cygwin and works 
ad7efe876e91 minor tutorial update for clarity
Josh Pelkey <jpelkey@gatech.edu>
parents: 6267
diff changeset
   226
best with gcc-3.4 or gcc-4.2 or greater series.
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   227
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   228
After the download.py script completes, you should have several new directories
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   229
under @code{~/repos/ns-3-allinone}:
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   230
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   231
@verbatim
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   232
  build.py*     constants.pyc  download.py*  nsc/        README      util.pyc
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   233
  constants.py  dist.py*       ns-3-dev/     pybindgen/  util.py
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   234
@end verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   235
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   236
Go ahead and change into @code{ns-3-dev} under your @code{~/repos/ns-3-allinone} 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   237
directory.  You should see something like the following there:
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   238
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   239
@verbatim
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   240
  AUTHORS       examples/  RELEASE_NOTES  utils/   wscript
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   241
  bindings/     LICENSE    samples/       VERSION  wutils.py
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   242
  CHANGES.html  ns3/       scratch/       waf*
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   243
  doc/          README     src/           waf.bat*
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   244
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   245
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   246
You are now ready to build the @command{ns-3} distribution.
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   247
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   248
@subsection Downloading ns-3 Using a Tarball
4293
11a2cda6a096 clean up tutorial up through tweaking section
Craig Dowell <craigdo@ee.washington.edu>
parents: 4292
diff changeset
   249
The process for downloading @command{ns-3} via tarball is simpler than the
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   250
Mercurial process since all of the pieces are pre-packaged for you.  You just
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   251
have to pick a release, download it and decompress it.
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   252
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   253
As mentioned above, one practice is to create a directory called @code{repos}
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   254
in one's home directory under which one can keep local Mercurial repositories.
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   255
One could also keep a @code{tarballs} directory.  @emph{Hint:  the tutorial
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   256
will assume you downloaded into a @code{repos} directory, so remember the
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   257
placekeeper.}  If you adopt the @code{tarballs} directory approach, you can 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   258
get a copy of a release by typing the following into your Linux shell 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   259
(substitute the appropriate version numbers, of course):
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   260
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3354
diff changeset
   261
@verbatim
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3354
diff changeset
   262
  cd
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   263
  mkdir tarballs
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   264
  cd tarballs
5404
930965240183 Update tutorial typos
Craig Dowell <craigdo@ee.washington.edu>
parents: 4634
diff changeset
   265
  wget http://www.nsnam.org/releases/ns-allinone-3.6.tar.bz2
930965240183 Update tutorial typos
Craig Dowell <craigdo@ee.washington.edu>
parents: 4634
diff changeset
   266
  tar xjf ns-allinone-3.6.tar.bz2
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   267
@end verbatim 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   268
5404
930965240183 Update tutorial typos
Craig Dowell <craigdo@ee.washington.edu>
parents: 4634
diff changeset
   269
If you change into the directory @code{ns-allinone-3.6} you should see a
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   270
number of files:
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   271
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   272
@verbatim
6624
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   273
build.py*     ns-3.6/     pybindgen-0.12.0.700/  util.py
a071889af159 Remove regression tests from waf
Mitch Watrous <watrous@u.washington.edu>
parents: 6489
diff changeset
   274
constants.py  nsc-0.5.1/  README
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3354
diff changeset
   275
@end verbatim 
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3354
diff changeset
   276
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   277
You are now ready to build the @command{ns-3} distribution.
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   278
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   279
@c ========================================================================
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   280
@c Building ns-3
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   281
@c ========================================================================
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   282
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   283
@node Building ns-3
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   284
@section Building ns-3
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   285
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   286
@subsection Building with build.py
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   287
@cindex building with build.py
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   288
The first time you build the @command{ns-3} project you should build using the
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   289
@command{allinone} environment.  This will get the project configured for you
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   290
in the most commonly useful way.
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   291
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   292
Change into the directory you created in the download section above.  If you
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   293
downloaded using Mercurial you should have a directory called 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   294
@code{ns-3-allinone} under your @code{~/repos} directory.  If you downloaded
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   295
using a tarball you should have a directory called something like 
5404
930965240183 Update tutorial typos
Craig Dowell <craigdo@ee.washington.edu>
parents: 4634
diff changeset
   296
@code{ns-allinone-3.6} under your @code{~/tarballs} directory.  Take a deep
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   297
breath and type the following:
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   298
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   299
@verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   300
  ./build.py
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   301
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   302
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   303
You will see lots of typical compiler output messages displayed as the build
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   304
script builds the various pieces you downloaded.  Eventually you should see the
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   305
following magic words:
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   306
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   307
@verbatim
5404
930965240183 Update tutorial typos
Craig Dowell <craigdo@ee.washington.edu>
parents: 4634
diff changeset
   308
  Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   309
  'build' finished successfully (2m30.586s)
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   310
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   311
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   312
Once the project has built you can say goodbye to your old friends, the 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   313
@code{ns-3-allinone} scripts.  You got what you needed from them and will now 
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   314
interact directly with Waf and we do it in the @code{ns-3-dev} directory,
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   315
not in the @code{ns-3-allinone} directory.  Go ahead and change into the 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   316
@code{ns-3-dev} directory (or the directory for the appropriate release you
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   317
downloaded.
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   318
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   319
@verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   320
  cd ns-3-dev
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   321
@end verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   322
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   323
@subsection Building with Waf
3339
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3332
diff changeset
   324
@cindex building with Waf
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3332
diff changeset
   325
@cindex configuring Waf
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3332
diff changeset
   326
@cindex building debug version with Waf
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3332
diff changeset
   327
@cindex compiling with Waf
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3332
diff changeset
   328
@cindex unit tests with Waf
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   329
We use Waf to configure and build the @command{ns-3} project.  It's not 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   330
strictly required at this point, but it will be valuable to take a slight
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   331
detour and look at how to make changes to the configuration of the project.
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   332
Probably the most useful configuration change you can make will be to 
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   333
build the optimized version of the code.  By default you have configured
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   334
your project to build the debug version.  Let's tell the project to do
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   335
make an optimized build.  To explain to Waf that it should do optimized
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   336
builds you will need to execute the following command,
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   337
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   338
@verbatim
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   339
  ./waf -d optimized configure
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   340
@end verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   341
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   342
This runs Waf out of the local directory (which is provided as a convenience
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   343
for you).  As the build system checks for various dependencies you should see
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   344
output that looks similar to the following,
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   345
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   346
@verbatim
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   347
  Checking for program g++                 : ok /usr/bin/g++
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   348
  Checking for program cpp                 : ok /usr/bin/cpp
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   349
  Checking for program ar                  : ok /usr/bin/ar
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   350
  Checking for program ranlib              : ok /usr/bin/ranlib
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   351
  Checking for g++                         : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   352
  Checking for program pkg-config          : ok /usr/bin/pkg-config
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   353
  Checking for -Wno-error=deprecated-declarations support : yes
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   354
  Checking for -Wl,--soname=foo support                   : yes
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   355
  Checking for header stdlib.h                            : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   356
  Checking for header signal.h                            : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   357
  Checking for header pthread.h                           : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   358
  Checking for high precision time implementation         : 128-bit integer
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   359
  Checking for header stdint.h                            : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   360
  Checking for header inttypes.h                          : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   361
  Checking for header sys/inttypes.h                      : not found
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   362
  Checking for library rt                                 : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   363
  Checking for header netpacket/packet.h                  : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   364
  Checking for pkg-config flags for GSL                   : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   365
  Checking for header linux/if_tun.h                      : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   366
  Checking for pkg-config flags for GTK_CONFIG_STORE      : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   367
  Checking for pkg-config flags for LIBXML2               : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   368
  Checking for library sqlite3                            : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   369
  Checking for NSC location                               : ok ../nsc (guessed)
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   370
  Checking for library dl                                 : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   371
  Checking for NSC supported architecture x86_64          : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   372
  Checking for program python                             : ok /usr/bin/python
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   373
  Checking for Python version >= 2.3                      : ok 2.5.2
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   374
  Checking for library python2.5                          : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   375
  Checking for program python2.5-config                   : ok /usr/bin/python2.5-config
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   376
  Checking for header Python.h                            : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   377
  Checking for -fvisibility=hidden support                : yes
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   378
  Checking for pybindgen location                         : ok ../pybindgen (guessed)
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   379
  Checking for Python module pybindgen                    : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   380
  Checking for pybindgen version                          : ok 0.10.0.640
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   381
  Checking for Python module pygccxml                     : ok
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   382
  Checking for pygccxml version                           : ok 0.9.5
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   383
  Checking for program gccxml                             : ok /usr/local/bin/gccxml
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   384
  Checking for gccxml version                             : ok 0.9.0
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   385
  Checking for program sudo                               : ok /usr/bin/sudo
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   386
  Checking for program hg                                 : ok /usr/bin/hg
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   387
  Checking for program valgrind                           : ok /usr/bin/valgrind
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   388
  ---- Summary of optional NS-3 features:
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   389
  Threading Primitives          : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   390
  Real Time Simulator           : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   391
  Emulated Net Device           : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   392
  GNU Scientific Library (GSL)  : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   393
  Tap Bridge                    : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   394
  GtkConfigStore                : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   395
  XmlIo                         : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   396
  SQlite stats data output      : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   397
  Network Simulation Cradle     : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   398
  Python Bindings               : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   399
  Python API Scanning Support   : enabled
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   400
  Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
5405
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   401
  Build examples and samples    : enabled
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   402
  Static build                  : not enabled (option --enable-static not selected)
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   403
  'configure' finished successfully (2.870s)
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   404
@end verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   405
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   406
Note the last part of the above output.  Some ns-3 options are not enabled by
4533
f4d74e20ad78 tuturial fixes
Andrey Hippo<ahippo@yandex.ru>
parents: 4304
diff changeset
   407
default or require support from the underlying system to work properly.
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   408
For instance, to enable XmlTo, the library libxml-2.0 must be found on the
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   409
system.  If this library were not found, the corresponding @command{ns-3} feature 
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   410
would not be enabled and a message would be displayed.  Note further that there is 
6189
450a3f4d9906 Documentation typos
Andrey Mazo <mazo@iitp.ru>
parents: 6151
diff changeset
   411
a feature to use the program @code{sudo} to set the suid bit of certain programs.
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   412
This is not enabled by default and so this feature is reported as ``not enabled.''
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   413
4295
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   414
Now go ahead and switch back to the debug build.
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   415
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   416
@verbatim
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   417
  ./waf -d debug configure
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   418
@end verbatim
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3354
diff changeset
   419
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   420
The build system is now configured and you can build the debug versions of 
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   421
the @command{ns-3} programs by simply typing,
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   422
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   423
@verbatim
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3347
diff changeset
   424
  ./waf
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   425
@end verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   426
4295
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   427
Some waf commands are meaningful during the build phase and some commands are valid
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   428
in the configuration phase.  For example, if you wanted to use the emulation 
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   429
features of @command{ns-3} you might want to enable setting the suid bit using
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   430
sudo as described above.  This turns out to be a configuration-time command, and so 
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   431
you could reconfigure using the following command
4295
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   432
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   433
@verbatim
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   434
  ./waf -d debug --enable-sudo configure
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   435
@end verbatim
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   436
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   437
If you do this, waf will have run sudo to change the socket creator programs of the
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   438
emulation code to run as root.  There are many other configure- and build-time options
4295
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   439
available in waf.  To explore these options, type:
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   440
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   441
@verbatim
4533
f4d74e20ad78 tuturial fixes
Andrey Hippo<ahippo@yandex.ru>
parents: 4304
diff changeset
   442
  ./waf --help
4295
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   443
@end verbatim
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   444
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   445
We'll use some of the testing-related commands in the next section.
6f7c05fd0f9b fix some tutorial nits
Craig Dowell <craigdo@ee.washington.edu>
parents: 4294
diff changeset
   446
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   447
Okay, sorry, I made you build the @command{ns-3} part of the system twice,
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   448
but now you know how to change the configuration and build optimized code.
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   449
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   450
@c ========================================================================
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   451
@c Testing ns-3
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   452
@c ========================================================================
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   453
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   454
@node Testing ns-3
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   455
@section Testing ns-3
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   456
3339
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3332
diff changeset
   457
@cindex unit tests
3700
fa1c7b813873 freshen tutorial
Tom Henderson <tomh@tomh.org>
parents: 3354
diff changeset
   458
You can run the unit tests of the @command{ns-3} distribution by running the 
5405
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   459
``./test.py -c core'' script,
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   460
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   461
@verbatim
5405
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   462
  ./test.py -c core
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   463
@end verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   464
5405
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   465
These tests are run in parallel by waf. You should eventually
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   466
see a report saying that,
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   467
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   468
@verbatim
5405
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   469
  47 of 47 tests passed (47 passed, 0 failed, 0 crashed, 0 valgrind errors)
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   470
@end verbatim
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   471
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   472
This is the important message.
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   473
5405
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   474
You will also see output from the test runner and the output will actually look something like,
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   475
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   476
@verbatim
5405
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   477
  Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   478
  Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   479
  'build' finished successfully (1.799s)
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   480
  PASS: TestSuite ns3-wifi-interference
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   481
  PASS: TestSuite histogram
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   482
  PASS: TestSuite sample
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   483
  PASS: TestSuite ipv4-address-helper
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   484
  PASS: TestSuite devices-wifi
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   485
  PASS: TestSuite propagation-loss-model
4292
ef09115f80ca tutorial changes for allinone
Craig Dowell <craigdo@ee.washington.edu>
parents: 3733
diff changeset
   486
4634
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   487
  ...
46687cc0acb6 update tutorial for ns-3.5
Craig Dowell <craigdo@ee.washington.edu>
parents: 4534
diff changeset
   488
5405
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   489
  PASS: TestSuite attributes
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   490
  PASS: TestSuite config
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   491
  PASS: TestSuite global-value
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   492
  PASS: TestSuite command-line
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   493
  PASS: TestSuite basic-random-number
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   494
  PASS: TestSuite object
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   495
  PASS: TestSuite random-number-generators
a952a8ac71ee update tutorial paths for new examples directory
Craig Dowell <craigdo@ee.washington.edu>
parents: 5404
diff changeset
   496
  47 of 47 tests passed (47 passed, 0 failed, 0 crashed, 0 valgrind errors)
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   497
@end verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   498
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   499
This command is typically run by @code{users} to quickly verify that an 
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   500
@command{ns-3} distribution has built correctly.  
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   501
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   502
@c ========================================================================
3346
Craig Dowell <craigdo@ee.washington.edu>
parents: 3345 3343
diff changeset
   503
@c Running a Script
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   504
@c ========================================================================
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   505
3341
7130a81b683c nits on Sections 1-4
Tom Henderson <tomh@tomh.org>
parents: 3332
diff changeset
   506
@node Running a Script
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   507
@section Running a Script
3339
ff29f4ba75ed finish up with a wifi example
Craig Dowell <craigdo@ee.washington.edu>
parents: 3332
diff changeset
   508
@cindex running a script with Waf
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   509
We typically run scripts under the control of Waf.  This allows the build 
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   510
system to ensure that the shared library paths are set correctly and that
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   511
the libraries are available at run time.  To run a program, simply use the
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3347
diff changeset
   512
@code{--run} option in Waf.  Let's run the @command{ns-3} equivalent of the
3345
b0af63b9f9a6 editing pass through the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3339
diff changeset
   513
ubiquitous hello world program by typing the following:
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   514
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   515
@verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   516
  ./waf --run hello-simulator
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   517
@end verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   518
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   519
Waf first checks to make sure that the program is built correctly and 
4533
f4d74e20ad78 tuturial fixes
Andrey Hippo<ahippo@yandex.ru>
parents: 4304
diff changeset
   520
executes a build if required.  Waf then executes the program, which 
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   521
produces the following output.
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   522
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   523
@verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   524
  Hello Simulator
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   525
@end verbatim
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   526
3354
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3347
diff changeset
   527
@emph{Congratulations.  You are now an ns-3 user.}
f11e4def3fc4 tweak, tweak the tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents: 3347
diff changeset
   528
6151
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   529
@emph{What do I do if I don't see the output?}
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   530
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   531
If you don't see @code{waf} messages indicating that the build was 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   532
completed successfully, but do not see the ``Hello Simulator'' output, 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   533
chances are that you have switched your build mode to ``optimized'' in 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   534
the ``Building with Waf'' section, but have missed the change back to 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   535
``debug'' mode.  All of the console output used in this tutorial uses a 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   536
special @command{ns-3} logging component that is useful for printing 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   537
user messages to the console.  Output from this component is 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   538
automatically disabled when you compile optimized code -- it is 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   539
``optimized out.''  If you don't see the ``Hello Simulator'' output,
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   540
type the following,
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   541
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   542
@verbatim
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   543
  ./waf -d debug configure
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   544
@end verbatim
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   545
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   546
to tell @code{waf} to build the debug versions of the @command{ns-3} 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   547
programs.  You must still build the actual debug version of the code by
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   548
typing,
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   549
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   550
@verbatim
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   551
  ./waf
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   552
@end verbatim
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   553
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   554
Now, if you run the @code{hello-simulator} program, you should see the 
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   555
expected output.
9f2dea6094da small explanation about (lack of) logging in optimized builds
Craig Dowell <craigdo@ee.washington.edu>
parents: 5405
diff changeset
   556
3332
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   557
If you want to run programs under another tool such as gdb or valgrind,
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   558
see this @uref{http://www.nsnam.org/wiki/index.php/User_FAQ#How_to_run_NS-3_programs_under_another_tool,,wiki entry}.
da67e8efa347 swap in new tutorial
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
   559