update NSC documentation

This commit is contained in:
Tom Henderson
2014-03-03 06:49:11 -08:00
parent ff3054b592
commit 661b5c9144

View File

@@ -172,24 +172,49 @@ network stacks by hand. Not a single line of code has been changed in the
network protocol implementations of any of the above four stacks. However, a
custom C parser was built to programmatically change source code.
NSC has previously been ported to |ns2| and OMNeT++, and recently
was added to |ns3|. This section describes the |ns3| port of NSC and
how to use it.
NSC has previously been ported to |ns2| and OMNeT++, and was
was added to |ns3| in September 2008 (ns-3.2 release). This section
describes the |ns3| port of NSC and how to use it.
To some extent, NSC has been superseded by the Linux kernel support within
`Direct Code Execution (DCE) <http://www.nsnam.org/docs/dce/manual/singlehtml/index.html>`_. However, NSC is still available through the bake build
system. NSC supports Linux kernels 2.6.18 and 2.6.26, but newer
versions of the kernel have not been ported.
Prerequisites
+++++++++++++
Presently, NSC has been tested and shown to work on these platforms:
Linux i386 and Linux x86-64. NSC does not support powerpc.
Linux i386 and Linux x86-64. NSC does not support powerpc. Use on
FreeBSD or OS X is unsupported (although it may be able to work).
Building NSC requires the packages flex and bison.
Configuring and Downloading
+++++++++++++++++++++++++++
Using the ``build.py`` script in ns-3-allinone directory, NSC will be enabled by
default unless the platform does not support it. To disable it when building
|ns3|, type:
As of ns-3.17 or later, NSC must either be downloaded separately from
its own repository, or downloading when using the bake build system of
|ns3|.
For ns-3.17 or later, when using bake, one must configure NSC as part of
an "allinone" configuration, such as:
.. sourcecode:: bash
$ cd bake
$ python bake.py configure -e ns-allinone-3.19
$ python bake.py download
$ python bake.py build
Instead of a released version, one may use the ns-3 development version
by specifying "ns-3-allinone" to the configure step above.
NSC may also be downloaded and built using
Prior to ns-3.17 release, using the ``build.py`` script in ns-3-allinone
directory, NSC will be enabled by default unless the platform does not
support it. To disable it when building |ns3|, type:
.. sourcecode:: bash
@@ -198,11 +223,42 @@ default unless the platform does not support it. To disable it when building
Building and validating
+++++++++++++++++++++++
Building |ns3| with nsc support is the same as building it without; no
additional arguments are needed for waf. Building nsc may take some time
compared to |ns3|; it is interleaved in the |ns3| building process.
NSC may be built as part of the bake build process; alternatively, one
may build NSC by itself using its build system; e.g.:
Try running the following ns-3 test suite:
.. sourcecode:: bash
$ cd nsc-dev
$ python scons.py
Once NSC has been built either manually or through the bake system, change
into the |ns3| source directory and try running the following configuration:
.. sourcecode:: bash
$ ./waf configure
If NSC has been previously built and found by waf, then you will see:
.. sourcecode:: bash
Network Simulation Cradle : enabled
If NSC has not been found, you will see:
.. sourcecode:: bash
Network Simulation Cradle : not enabled (NSC not found (see option --with-nsc))
In this case, you must pass the relative or absolute path to the NSC libraries
with the "--with-nsc" configure option; e.g.
.. sourcecode:: bash
$ ./waf configure --with-nsc=/path/to/my/nsc/directory
If waf detects NSC, then building |ns3| with NSC is the same as building it
without. Once |ns3| is built, try running the following test suite:
.. sourcecode:: bash
@@ -374,7 +430,7 @@ Limitations
* NSC only works on single-interface nodes; attempting to run it on a
multi-interface node will cause a program error.
* Cygwin and OS X PPC are not supported
* Cygwin and OS X PPC are not supported; OS X Intel is not supported but may work
* The non-Linux stacks of NSC are not supported in |ns3|
* Not all socket API callbacks are supported