-
Notifications
You must be signed in to change notification settings - Fork 6
Getting Started
This section describes how to download and build the CCNx 1.0 module for NS3. The module will be called ccns3Sim inside the NS3 system.
- Complete Walkthrough
- Integrating with an existing NS3 build
- Compiling
- Running examples and unit tests
- Integrating with the Eclipse IDE
Here is a complete walk through of starting with nothing and building the whole ns3 simulator with our code
mkdir ~/ns3
cd ~/ns3
wget https://www.nsnam.org/release/ns-allinone-3.24.1.tar.bz2
tar -xjf ns-allinone-3.24.1.tar.bz2
# This export is not essential, just used to make the example easier
export NSDIR=~/ns3/ns-allinone-3.24.1/ns-3.24.1
cd $NSDIR/src
# It is recommended that you fork the project in to your own workspace so you
# can generate pull requests for modifications.
git clone git@github.com:PARC/ccns3Sim.git
cd $NSDIR
patch -p 2 < $NSDIR/src/ccns3Sim/ns-3.24.1-patch
# Use your preferred configure command here. This one disables things we
# do not need for a simple build and enables examples and tests
./waf configure --enable-examples --enable-tests --disable-python --disable-nsclick --disable-gtk
./waf build
Our code requires ns-3.24.1.
-
You should download the code (or clone the repository) to the ns-3.24/src/ccnx directory.
-
execute this command from the ns-3.24.1 directory:
ns-3.24.1> patch -p 2 < src/ccns3Sim/ns-3.24.1-patch
- Re-configure the system. Enabling the examples and tests is usually a good thing to do during development or when learning the CCNx module code.
ns-3.24> ./waf configure [--enable-examples] [--enable-tests]
We use the same compile procedure as normal NS3:
ns-3.24.1> ./waf clean build
You should be able to follow the normal NS3 method for setting up eclipse. We provide Eclipse run configurations for our unit tests and examples in src/ccns3Sim/eclipse-launch, but they assume your Eclipse project is name 'ns-allinone-3.24.1'. If your eclipse project has a different name you will need to update all those files. You can use File | Import and select 'Run/Debug' launch configurations.
You should also exclude ns-3.24.1/doc from the build. If you happen to "./waf doxygen" it will cause problem in Eclipse as it tries to refresh that very large directory structure.
Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center (PARC). All rights reserved.