Final updates and documentation fixes
diff --git a/docs/source/examples.rst b/docs/source/examples.rst
index 6132b4e..5ea290e 100644
--- a/docs/source/examples.rst
+++ b/docs/source/examples.rst
@@ -18,10 +18,10 @@
| | 10ms | | 10ms | |
+----------+ +--------+ +----------+
-Consumer is simulated using :ndnsim:`NdnConsumerCbr` reference application and generates Interests towards the producer
+Consumer is simulated using :ndnsim:`ConsumerCbr` reference application and generates Interests towards the producer
with frequency of 10 Interests per second (see :doc:`applications`).
-Producer is simulated using :ndnsim:`NdnProducer` class, which is used to satisfy all incoming Interests with virtual payload data (1024 bytes).
+Producer is simulated using :ndnsim:`Producer` class, which is used to satisfy all incoming Interests with virtual payload data (1024 bytes).
FIB on every node is populated using default routes (see :doc:`helpers`).
@@ -55,21 +55,21 @@
p2p.Install (nodes.Get (1), nodes.Get (2));
// Install CCNx stack on all nodes
- NdnStackHelper ccnxHelper;
+ ndn::StackHelper ccnxHelper;
ccnxHelper.SetDefaultRoutes (true);
ccnxHelper.InstallAll ();
// Installing applications
// Consumer
- NdnAppHelper consumerHelper ("ns3::NdnConsumerCbr");
+ ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
// Consumer will request /prefix/0, /prefix/1, ...
consumerHelper.SetPrefix ("/prefix");
consumerHelper.SetAttribute ("Frequency", StringValue ("10")); // 10 interests a second
consumerHelper.Install (nodes.Get (0)); // first node
// Producer
- NdnAppHelper producerHelper ("ns3::NdnProducer");
+ ndn::AppHelper producerHelper ("ns3::ndn::Producer");
// Producer will reply to all requests starting with /prefix
producerHelper.SetPrefix ("/prefix");
producerHelper.SetAttribute ("PayloadSize", StringValue("1024"));
@@ -86,7 +86,7 @@
If this code is placed into ``scratch/ndn-simple.cc`` and NS-3 is compiled in debug mode, you can run and see progress of the
simulation using the following command (in optimized mode nothing will be printed out)::
- NS_LOG=NdnConsumer:NdnProducer ./waf --run=ndn-simple
+ NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-simple
9-node grid example
@@ -115,12 +115,12 @@
\-/ \-/ \--------/
-FIB is populated using :ndnsim:`NdnGlobalRoutingHelper` (see :doc:`helpers`).
+FIB is populated using :ndnsim:`GlobalRoutingHelper` (see :doc:`helpers`).
-Consumer is simulated using :ndnsim:`NdnConsumerCbr` reference application and generates Interests towards the producer
+Consumer is simulated using :ndnsim:`ConsumerCbr` reference application and generates Interests towards the producer
with frequency of 10 Interests per second (see :doc:`applications`).
-Producer is simulated using :ndnsim:`NdnProducer` class, which is used to satisfy all incoming Interests with virtual payload data (1024 bytes).
+Producer is simulated using :ndnsim:`Producer` class, which is used to satisfy all incoming Interests with virtual payload data (1024 bytes).
The following code represents all that is necessary to run such a
@@ -150,11 +150,11 @@
grid.BoundingBox(100,100,200,200);
// Install CCNx stack on all nodes
- NdnStackHelper ccnxHelper;
+ ndn::StackHelper ccnxHelper;
ccnxHelper.InstallAll ();
// Installing global routing interface on all nodes
- NdnGlobalRoutingHelper ccnxGlobalRoutingHelper;
+ ndn::GlobalRoutingHelper ccnxGlobalRoutingHelper;
ccnxGlobalRoutingHelper.InstallAll ();
// Getting containers for the consumer/producer
@@ -165,17 +165,17 @@
// Install CCNx applications
std::string prefix = "/prefix";
- NdnAppHelper consumerHelper ("ns3::NdnConsumerCbr");
+ ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
consumerHelper.SetPrefix (prefix);
consumerHelper.SetAttribute ("Frequency", StringValue ("10")); // 10 interests a second
consumerHelper.Install (consumerNodes);
- NdnAppHelper producerHelper ("ns3::NdnProducer");
+ ndn::AppHelper producerHelper ("ns3::ndn::Producer");
producerHelper.SetPrefix (prefix);
producerHelper.SetAttribute ("PayloadSize", StringValue("1024"));
producerHelper.Install (producer);
- // Add /prefix origins to NdnGlobalRouter
+ // Add /prefix origins to ndn::GlobalRouter
ccnxGlobalRoutingHelper.AddOrigins (prefix, producer);
// Calculate and install FIBs
@@ -193,5 +193,5 @@
If this code is placed into ``scratch/ndn-grid.cc`` and NS-3 is compiled in debug mode, you can run and see progress of the
simulation using the following command (in optimized mode nothing will be printed out)::
- NS_LOG=NdnConsumer:NdnProducer ./waf --run=ndn-grid
+ NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-grid
diff --git a/docs/source/helpers.rst b/docs/source/helpers.rst
index 107459a..b73a1ef 100644
--- a/docs/source/helpers.rst
+++ b/docs/source/helpers.rst
@@ -4,14 +4,14 @@
Helpers are very important components of ndnSIM, especially for writing simulation scenarios.
The following summarizes helpers and their basic usage.
-NdnStackHelper
+StackHelper
---------------
-:ndnsim:`NdnStackHelper` is used to install ndnSIM network stack on requested nodes, as well to provide a simple way configure several important parameters of NDN simulation.
+:ndnsim:`StackHelper` is used to install ndnSIM network stack on requested nodes, as well to provide a simple way configure several important parameters of NDN simulation.
Example::
- NdnStackHelper ndnHelper;
+ ndn::StackHelper ndnHelper;
NodeContainer nodes;
...
ndnHelper.Install (nodes);
@@ -19,7 +19,7 @@
Forwarding strategy
+++++++++++++++++++
-Forwarding strategy parameter **must** be set before installing stack on a node.
+A desired :ndnsim:`forwarding strategy <ForwardingStrategy>` parameter need to be set before installing stack on a node.
Currently, there are 2 implemented forwarding strategies that can be used in simulations:
@@ -30,7 +30,7 @@
.. code-block:: c++
- ndnHelper.SetForwardingStrategy ("ns3::ndnSIM::Flooding");
+ ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding");
...
ndnHelper.Install (nodes);
@@ -44,7 +44,7 @@
.. code-block:: c++
- ndnHelper.SetForwardingStrategy ("ns3::ndnSIM::SmartFlooding");
+ ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::SmartFlooding");
...
ndnHelper.Install (nodes);
@@ -56,7 +56,7 @@
.. code-block:: c++
- ndnHelper.SetForwardingStrategy ("ns3::ndnSIM::BestRoute");
+ ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute");
...
ndnHelper.Install (nodes);
@@ -68,7 +68,7 @@
In simple topologies, like in :doc:`examples <examples>`, or when
simulating broadcast environment, it is possible to set up *default*
-FIB entries using :ndnsim:`NdnStackHelper::SetDefaultRoutes` call.
+FIB entries using :ndnsim:`StackHelper::SetDefaultRoutes` call.
More specifically, every installed NDN stack will have a FIB entry to ``/`` prefix, containing all available faces.
The following should be done before installing stack on a node:
@@ -83,7 +83,7 @@
Manually routes
+++++++++++++++
-Routes can be configured manually using :ndnsim:`NdnStackHelper::AddRoute` static methods of :ndnsim:`NdnStackHelper`.
+Routes can be configured manually using :ndnsim:`StackHelper::AddRoute` static methods of :ndnsim:`StackHelper`.
These routes **should** be created **after** installing NDN stack on a node:
@@ -93,9 +93,9 @@
...
Ptr<Node> node = ... // FIB entry will be added to FIB on this node
std::string prefix = ... // some prefix
- Ptr<NdnFace> face = ... // NDN face that belongs to the node and through which prefix is accessible
+ Ptr<ndn::Face> face = ... // NDN face that belongs to the node and through which prefix is accessible
int32_t metric = ... // some routing metric
- NdnStackHelper::AddRoute (node, prefix, face, metric);
+ ndn::StackHelper::AddRoute (node, prefix, face, metric);
.. Enable optional interest limiting
@@ -103,23 +103,23 @@
.. EnableLimits
-NdnGlobalRoutingHelper
+GlobalRoutingHelper
-----------------------
-To simplify FIB management in large topologies, ndnSIM contains a global routing controller (:ndnsim:`helper <NdnGlobalRoutingHelper>` and :ndnsim:`special interface <NdnGlobalRouter>`), similar in spirit to ``Ipv4GlobalRoutingHelper``.
+To simplify FIB management in large topologies, ndnSIM contains a global routing controller (:ndnsim:`helper <GlobalRoutingHelper>` and :ndnsim:`special interface <GlobalRouter>`), similar in spirit to ``Ipv4GlobalRoutingHelper``.
There are several necessary steps, in order to take advantage of the global routing controller:
-* install :ndnsim:`special interfaces <NdnGlobalRouter>` on nodes
+* install :ndnsim:`special interfaces <GlobalRouter>` on nodes
.. code-block:: c++
NodeContainer nodes;
...
- NdnGlobalRoutingHelper ndnGlobalRoutingHelper;
+ ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
ndnGlobalRoutingHelper.Install (nodes);
-* specify which node exports which prefix using :ndnsim:`NdnGlobalRoutingHelper::AddOrigins`
+* specify which node exports which prefix using :ndnsim:`GlobalRoutingHelper::AddOrigins`
.. code-block:: c++
@@ -128,35 +128,35 @@
...
ndnGlobalRoutingHelper.AddOrigins (prefix, producer);
-* calculate and install FIBs on every node using :ndnsim:`NdnGlobalRoutingHelper::CalculateRoutes`
+* calculate and install FIBs on every node using :ndnsim:`GlobalRoutingHelper::CalculateRoutes`
.. code-block:: c++
cdnGlobalRoutingHelper.CalculateRoutes ();
-NdnAppHelper
+AppHelper
---------------
-:ndnsim:`NdnAppHelper` simplifies task of creating, configuring, and installing ndnSIM applications.
+:ndnsim:`AppHelper` simplifies task of creating, configuring, and installing ndnSIM applications.
-The basic usage of the :ndnsim:`NdnAppHelper`:
+The basic usage of the :ndnsim:`AppHelper`:
* Create helper for specific applications class:
.. code-block:: c++
// Create helper for the consumer generating Interests with constant rate
- NdnAppHelper consumerHelper ("ns3::NdnConsumerCbr");
+ ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
-* Assign prefix on which application operates (either generating Interests using this name or satisfying Interests for this name) using :ndnsim:`NdnAppHelper::SetPrefix`:
+* Assign prefix on which application operates (either generating Interests using this name or satisfying Interests for this name) using :ndnsim:`AppHelper::SetPrefix`:
.. code-block:: c++
consumerHelper.SetPrefix (prefix);
-* Assign application-specific attributes using :ndnsim:`NdnAppHelper::SetAttribute`:
+* Assign application-specific attributes using :ndnsim:`AppHelper::SetAttribute`:
.. code-block:: c++
diff --git a/docs/source/intro.rst b/docs/source/intro.rst
index 68b6dd7..6c60c99 100644
--- a/docs/source/intro.rst
+++ b/docs/source/intro.rst
@@ -17,7 +17,7 @@
.. This flexibility allows ndnSIM to simulate scenarios of various homogeneous and heterogeneous networks (e.g., NDN-only, NDN-over-IP, etc.).
-The simulator is implemented in a modular fashion, using separate C++ classes to model behavior of each network-layer entity in NDN: :ndnsim:`pending Interest table (PIT) <NdnPit>`, :ndnsim:`forwarding information base (FIB) <NdnFib>`, :ndnsim:`content store <NdnContentStore>`, :ndnsim:`network <NdnNetDeviceFace>` and :ndnsim:`application <NdnAppFace>` interfaces, :ndnsim:`Interest forwarding strategies <NdnForwardingStrategy>`, etc.
+The simulator is implemented in a modular fashion, using separate C++ classes to model behavior of each network-layer entity in NDN: :ndnsim:`pending Interest table (PIT) <Pit>`, :ndnsim:`forwarding information base (FIB) <Fib>`, :ndnsim:`content store <ContentStore>`, :ndnsim:`network <NetDeviceFace>` and :ndnsim:`application <AppFace>` interfaces, :ndnsim:`Interest forwarding strategies <ForwardingStrategy>`, etc.
This modular structure allows any component to be easily modified or replaced with no or minimal impact on other components.
In addition, the simulator provides an extensive collection of interfaces and helpers to perform detailed tracing behavior of every component, as well as NDN traffic flow.
@@ -33,8 +33,8 @@
.................|......................................|......................
. v v .
. +------------------+ +----------------------+ .
- . | "NdnFace" | | "NdnFace" | .
- . | "(NdnAppFace)" | | "(NdnNetDeviceFace)" | .
+ . | "Face" | | "Face" | .
+ . | "(AppFace)" | | "(NetDeviceFace)" | .
. +------------------+ +----------------------+ .
. ^ ^ .
. | | .
@@ -42,7 +42,7 @@
. XXXXXXXXXXXXXXXXXXXXXXXXXXXXX .
. XX XX .
. XX Core NDN protocol XX .
- . XX "(NdnL3Protocol)" XX
+ . XX "(L3Protocol)" XX
. XX XX .
. XXXXXXXXXXXXXXXXXXXXXXXXXXXXX .
. ^ ^ ^ ^ .
@@ -51,9 +51,8 @@
. | | | | .
. v v v v .
. +-------------------+ +-------+ +-------+ +-------------+ .
- . | "NdnContentStore" | | PIT | | FIB | | "Pluggable" | .
- . +-------------------+ +-------+ +-------+ | "Forwarding"| .
- . | "Strategy" | .
+ . | "ContentStore" | | PIT | | FIB | | "Forwarding"| .
+ . +-------------------+ +-------+ +-------+ | "Strategy" | .
. +-------------+ .
. .
...............................................................................
@@ -69,7 +68,7 @@
Portability
------------
-ndnSIM has been successfully compiled and used under Ubuntu Linux 12.04 (stock gcc, boost 1.48), Mac OS 10.6/10.7/10.8 (gcc-4.2 apple/llvm, macports gcc 4.6, boost 1.49 or 1.50).
+ndnSIM has been successfully compiled and used under Ubuntu Linux 12.04 (stock gcc, boost 1.48), Mac OS 10.8 (gcc-4.2 apple/llvm, macports gcc 4.7, boost 1.49 or 1.50).
Requirements
-------------
@@ -180,18 +179,18 @@
+-----------------+---------------------------------------------------------------------+
| Folder | Description |
+=================+=====================================================================+
-| ``model/`` | implementation of NDN base: :ndnsim:`NdnL3Protocol`, faces |
-| | (:ndnsim:`NdnFace`, :ndnsim:`NdnNetDeviceFace`, forwarding |
-| | :ndnsim:`NdnAppFace`), |
-| | strategies (:ndnsim:`NdnForwardingStrategy`, |
+| ``model/`` | implementation of NDN base: :ndnsim:`L3Protocol`, faces |
+| | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`, forwarding |
+| | :ndnsim:`AppFace`), |
+| | strategies (:ndnsim:`ForwardingStrategy`, |
| | :ndnsim:`Flooding`, :ndnsim:`SmartFlooding`, :ndnsim:`BestRoute`), |
| | etc. |
+-----------------+---------------------------------------------------------------------+
| ``apps/`` | applications (in NS-3 sense) that can be installed on the nodes. |
-| | Right now we have one producer (:ndnsim:`NdnProducer`) and a |
-| | collection of consumer (:ndnsim:`NdnConsumerCbr`, |
-| | :ndnsim:`NdnConsumerWindow`, |
-| | :ndnsim:`NdnConsumerBatches`). See doxygen documentation or |
+| | Right now we have one producer (:ndnsim:`Producer`) and a |
+| | collection of consumer (:ndnsim:`ConsumerCbr`, |
+| | :ndnsim:`ConsumerWindow`, |
+| | :ndnsim:`ConsumerBatches`). See doxygen documentation or |
| | source code for details |
+-----------------+---------------------------------------------------------------------+
| ``helper/`` | a number of :doc:`useful helpers <helpers>` |
@@ -207,9 +206,9 @@
Logging
-----------------
-Almost every component in ndnSIM exports logging interface, so it is possible in debug compilation of simulator to track many details. For example, by enabling logging of :ndnsim:`NdnFace` and :ndnsim:`NdnConsumer` will show everything what happens on :ndnsim:`NdnFace` and :ndnsim:`NdnConsumer` classes::
+Almost every component in ndnSIM exports logging interface, so it is possible in debug compilation of simulator to track many details. For example, by enabling logging of :ndnsim:`Face` and :ndnsim:`Consumer` will show everything what happens on :ndnsim:`Face` and :ndnsim:`Consumer` classes::
- NS_LOG=NdnFace:NdnConsumer ./waf --run=ndn-simple
+ NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple
Refer to the source code and NS-3 documentation to see what logging interfaces are available and about details how enable one or more logging interfaces.
diff --git a/examples/ndn-grid.cc b/examples/ndn-grid.cc
index a37d245..35e1df7 100644
--- a/examples/ndn-grid.cc
+++ b/examples/ndn-grid.cc
@@ -81,7 +81,8 @@
// Install NDN stack on all nodes
NS_LOG_INFO ("Installing Ndn stack on all nodes");
ndn::StackHelper ndnHelper;
- ndnHelper.SetContentStore ("ns3::ndn::cs::Lru", "Size", "10");
+ ndnHelper.SetContentStore ("ns3::ndn::cs::Lru", "MaxSize", "10");
+ // ndnHelper.SetContentStore ("ns3::ndn::cs::Random", "MaxSize", "10");
ndnHelper.InstallAll ();
ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
diff --git a/model/ndn-l3-protocol.cc b/model/ndn-l3-protocol.cc
index 315ad63..a32c7fa 100644
--- a/model/ndn-l3-protocol.cc
+++ b/model/ndn-l3-protocol.cc
@@ -59,6 +59,7 @@
{
static TypeId tid = TypeId ("ns3::ndn::L3Protocol")
.SetGroupName ("ndn")
+ .SetParent<Object> ()
.AddConstructor<L3Protocol> ()
.AddAttribute ("FaceList", "List of faces associated with ndn stack",
ObjectVectorValue (),