|
|
| 44 |
|
44 |
|
| 45 |
@cindex tarball |
45 |
@cindex tarball |
| 46 |
The @command{ns-3} code is available in Mercurial repositories on the server |
46 |
The @command{ns-3} code is available in Mercurial repositories on the server |
| 47 |
code.nsnam.org. You can also download a tarball release at |
47 |
@uref{http://code.nsnam.org}. You can also download a tarball release at |
| 48 |
@uref{http://www.nsnam.org/releases/}, or you can work with repositories |
48 |
@uref{http://www.nsnam.org/releases/}, or you can work with repositories |
| 49 |
using Mercurial. We recommend using Mercurial unless there's a good reason |
49 |
using Mercurial. We recommend using Mercurial unless there's a good reason |
| 50 |
not to. See the end of this section for instructions on how to get a tarball |
50 |
not to. See the end of this section for instructions on how to get a tarball |
|
|
| 53 |
@cindex repository |
53 |
@cindex repository |
| 54 |
The simplest way to get started using Mercurial repositories is to use the |
54 |
The simplest way to get started using Mercurial repositories is to use the |
| 55 |
@code{ns-3-allinone} environment. This is a set of scripts that manages the |
55 |
@code{ns-3-allinone} environment. This is a set of scripts that manages the |
| 56 |
downloading and building of various subystems of @command{ns-3} for you. We |
56 |
downloading and building of various subsystems of @command{ns-3} for you. We |
| 57 |
recommend that you begin your @command{ns-3} adventures in this environment |
57 |
recommend that you begin your @command{ns-3} adventures in this environment |
| 58 |
as it can really simplify your life at this point. |
58 |
as it can really simplify your life at this point. |
| 59 |
|
59 |
|
|
|
| 128 |
the more constant ns-3-dev here in the tutorial, but you can replace the |
128 |
the more constant ns-3-dev here in the tutorial, but you can replace the |
| 129 |
string ``ns-3-dev'' with your choice of release (e.g., ns-3.4 and |
129 |
string ``ns-3-dev'' with your choice of release (e.g., ns-3.4 and |
| 130 |
ns-3.4-ref-traces) in the text below. You can find the latest version of the |
130 |
ns-3.4-ref-traces) in the text below. You can find the latest version of the |
| 131 |
code either by inspection of the repository list or by going to the ``Getting |
131 |
code either by inspection of the repository list or by going to the @uref{http://www.nsnam.org/getting_started.html,,``Getting |
| 132 |
Started'' web page and looking for the latest release identifier. |
132 |
Started''} web page and looking for the latest release identifier. |
| 133 |
|
133 |
|
| 134 |
Go ahead and change into the @code{ns-3-allinone} directory you created when |
134 |
Go ahead and change into the @code{ns-3-allinone} directory you created when |
| 135 |
you cloned that repository. We are now going to use the @code{download.py} |
135 |
you cloned that repository. We are now going to use the @code{download.py} |
| 136 |
script to pull down the various pieces of @command{ns-3} you will be using/ |
136 |
script to pull down the various pieces of @command{ns-3} you will be using. |
| 137 |
|
137 |
|
| 138 |
Go ahead and type the following into your shell (remember you can substitute |
138 |
Go ahead and type the following into your shell (remember you can substitute |
| 139 |
the name of your chosen release number instead of @code{ns-3-dev} -- like |
139 |
the name of your chosen release number instead of @code{ns-3-dev} -- like |
|
|
| 257 |
mkdir tarballs |
257 |
mkdir tarballs |
| 258 |
cd tarballs |
258 |
cd tarballs |
| 259 |
wget http://www.nsnam.org/releases/ns-allinone-3.4.tar.bz2 |
259 |
wget http://www.nsnam.org/releases/ns-allinone-3.4.tar.bz2 |
| 260 |
tar xjf ns-3.4.tar.bz2 |
260 |
tar xjf ns-allinone-3.4.tar.bz2 |
| 261 |
@end verbatim |
261 |
@end verbatim |
| 262 |
|
262 |
|
| 263 |
If you change into the directory @code{ns-allinone-3.4} you should see a |
263 |
If you change into the directory @code{ns-allinone-3.4} you should see a |
| 264 |
number of files: |
264 |
number of files: |
| 265 |
|
265 |
|
| 266 |
@verbatim |
266 |
@verbatim |
| 267 |
build.py* ns-3.4-RC2/ nsc-0.5.0/ util.py |
267 |
build.py* ns-3.4/ nsc-0.5.0/ README |
| 268 |
constants.py ns-3.4-RC2-ref-traces/ pybindgen-0.10.0.630/ |
268 |
constants.py ns-3.4-ref-traces/ pybindgen-0.10.0.630/ util.py |
| 269 |
@end verbatim |
269 |
@end verbatim |
| 270 |
|
270 |
|
| 271 |
You are now ready to build the @command{ns-3} distribution. |
271 |
You are now ready to build the @command{ns-3} distribution. |
|
|
| 404 |
@end verbatim |
404 |
@end verbatim |
| 405 |
|
405 |
|
| 406 |
Note the last part of the above output. Some ns-3 options are not enabled by |
406 |
Note the last part of the above output. Some ns-3 options are not enabled by |
| 407 |
default or require support from the underlying system to work properly |
407 |
default or require support from the underlying system to work properly. |
| 408 |
For instance, to enable XmlTo, the library libxml-2.0 must be found on the |
408 |
For instance, to enable XmlTo, the library libxml-2.0 must be found on the |
| 409 |
system. in the example above, this library was not found and the corresponding |
409 |
system. in the example above, this library was not found and the corresponding |
| 410 |
feature was not enabled. There is a feature to use sudo to set the suid bit of |
410 |
feature was not enabled. There is a feature to use sudo to set the suid bit of |
|
|
| 438 |
available in waf. To explore these options, type: |
438 |
available in waf. To explore these options, type: |
| 439 |
|
439 |
|
| 440 |
@verbatim |
440 |
@verbatim |
| 441 |
./waf -- help |
441 |
./waf --help |
| 442 |
@end verbatim |
442 |
@end verbatim |
| 443 |
|
443 |
|
| 444 |
We'll use some of the testing-related commands in the next section. |
444 |
We'll use some of the testing-related commands in the next section. |
|
|
| 488 |
|
488 |
|
| 489 |
@cindex regression tests |
489 |
@cindex regression tests |
| 490 |
You can also run our regression test suite to ensure that your distribution and |
490 |
You can also run our regression test suite to ensure that your distribution and |
| 491 |
tool chain have produced binaries that generate output that is identical to |
491 |
toolchain have produced binaries that generate output that is identical to |
| 492 |
known-good reference output files. You downloaded these reference traces to |
492 |
known-good reference output files. You downloaded these reference traces to |
| 493 |
your machine during the download process above. (Warning: The @code{ns-3.2} |
493 |
your machine during the download process above. (Warning: The @code{ns-3.2} |
| 494 |
and @code{ns-3.3} releases do not use the @code{ns-3-allinone} environment |
494 |
and @code{ns-3.3} releases do not use the @code{ns-3-allinone} environment |
|
|
| 505 |
has gone awry. If the error was discovered in a pcap file, it will be useful |
505 |
has gone awry. If the error was discovered in a pcap file, it will be useful |
| 506 |
to convert the pcap files to text using tcpdump prior to comparison. |
506 |
to convert the pcap files to text using tcpdump prior to comparison. |
| 507 |
|
507 |
|
| 508 |
Some regression tests wmay be SKIPped if the required support |
508 |
Some regression tests may be SKIPped if the required support |
| 509 |
is not present. |
509 |
is not present. |
| 510 |
|
510 |
|
| 511 |
To run the regression tests, you provide Waf with the regression flag. |
511 |
To run the regression tests, you provide Waf with the regression flag. |
|
|
| 568 |
@end verbatim |
568 |
@end verbatim |
| 569 |
|
569 |
|
| 570 |
Waf first checks to make sure that the program is built correctly and |
570 |
Waf first checks to make sure that the program is built correctly and |
| 571 |
executes a build if required. Waf then then executes the program, which |
571 |
executes a build if required. Waf then executes the program, which |
| 572 |
produces the following output. |
572 |
produces the following output. |
| 573 |
|
573 |
|
| 574 |
@verbatim |
574 |
@verbatim |