Solving compilation problems, adding more comments. Modified ccnx-test example
diff --git a/examples/ccnx-test.cc b/examples/ccnx-test.cc
index 626a2f5..0d32793 100644
--- a/examples/ccnx-test.cc
+++ b/examples/ccnx-test.cc
@@ -2,9 +2,7 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
-#include "ns3/applications-module.h"
#include "ns3/NDNabstraction-module.h"
using namespace ns3;
@@ -15,18 +13,23 @@
main (int argc, char *argv[])
{
LogComponentEnable ("CcnxTest", LOG_ALL);
+ LogComponentEnable ("CcnxStackHelper", LOG_ALL);
- Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
- Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s"));
+ // Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
+ // Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s"));
+
+ Config::SetDefault ("ns3::PointToPointNetDevice::DataRate", StringValue ("10Mbps"));
+ Config::SetDefault ("ns3::PointToPointChannel::Delay", StringValue ("1ms"));
CommandLine cmd;
cmd.Parse (argc, argv);
// Here, we will explicitly create seven nodes.
NodeContainer c;
- c.Create (2);
+ c.Create (3);
- NodeContainer n = NodeContainer (c.Get (0), c.Get (2));
+ NodeContainer n1 = NodeContainer (c.Get (0), c.Get (1));
+ NodeContainer n2 = NodeContainer (c.Get (1), c.Get (2));
// Ipv4StaticRoutingHelper staticRouting;
@@ -35,16 +38,16 @@
NS_LOG_INFO ("Create channels.");
PointToPointHelper p2p;
- p2p.SetDeviceAttribute ("DataRate", StringValue ("10Mbps"));
- p2p.SetChannelAttribute ("Delay", StringValue ("1ms"));
- NetDeviceContainer nd = p2p.Install (n);
+ // NetDeviceContainer nd =
+ p2p.Install (n1);
+ p2p.Install (n2);
NS_LOG_INFO ("Installing NDN stack");
CcnxStackHelper ccnx;
+ Ptr<CcnxFaceContainer> cf = ccnx.Install (c);
// ? set up forwarding
- // ccnx.Install (c);
//Add static routing
// InternetStackHelper internet;
diff --git a/helper/ccnx-face-container.cc b/helper/ccnx-face-container.cc
index 956614d..ce595bb 100644
--- a/helper/ccnx-face-container.cc
+++ b/helper/ccnx-face-container.cc
@@ -19,8 +19,7 @@
*/
#include "ccnx-face-container.h"
-// #include "ns3/node-list.h"
-// #include "ns3/names.h"
+
#include <algorithm>
#include "ns3/ccnx-face.h"
@@ -47,6 +46,12 @@
void
+CcnxFaceContainer::AddAll (Ptr<CcnxFaceContainer> other)
+{
+ AddAll (*other);
+}
+
+void
CcnxFaceContainer::AddAll (const CcnxFaceContainer &other)
{
m_faces.insert (m_faces.end (),
diff --git a/helper/ccnx-face-container.h b/helper/ccnx-face-container.h
index 4426449..ecb29d9 100644
--- a/helper/ccnx-face-container.h
+++ b/helper/ccnx-face-container.h
@@ -23,20 +23,24 @@
#include <stdint.h>
#include <vector>
-#include "ns3/ccnx.h"
+
+#include "ns3/ptr.h"
+#include "ns3/simple-ref-count.h"
namespace ns3 {
+class CcnxFace;
+
/**
- * \ingroup ccnx
+ * \ingroup ccnx-helpers
* \brief A pool for CCNx faces
*
* Provides tools to perform basic manipulation on faces, such as
* setting metrics and states on faces
*
- * \see Ccnx
+ * \see CcnxStackHelper
*/
-class CcnxFaceContainer
+class CcnxFaceContainer : public SimpleRefCount<CcnxFaceContainer>
{
private:
typedef std::vector<Ptr<CcnxFace> > FaceContainer;
@@ -67,6 +71,13 @@
/**
* \brief Add all entries from other container
*
+ * \param other smart pointer to a container
+ */
+ void AddAll (Ptr<CcnxFaceContainer> other);
+
+ /**
+ * \brief Add all entries from other container
+ *
* \param other container
*/
void AddAll (const CcnxFaceContainer &other);
diff --git a/helper/ccnx-forwarding-helper.h b/helper/ccnx-forwarding-helper.h
index a7d0bf8..8ac041e 100644
--- a/helper/ccnx-forwarding-helper.h
+++ b/helper/ccnx-forwarding-helper.h
@@ -30,13 +30,11 @@
class Node;
/**
+ * \ingroup ccnx-helpers
+ *
* \brief a factory to create ns3::CcnxForwardingStrategy objects
*
- * For each new forwarding protocol created as a subclass of
- * ns3::CcnxForwardingStrategy, you need to create a subclass of
- * ns3::CcnxForwardingHelper which can be used by
- * ns3::InternetStackHelper::SetForwardingHelper and
- * ns3::InternetStackHelper::Install.
+ * \todo Document this class
*/
class CcnxForwardingHelper
{
@@ -53,7 +51,7 @@
* This method is mainly for internal use by the other helpers;
* clients are expected to free the dynamic memory allocated by this method
*/
- virtual CcnxForwardingHelper* Copy (void) const = 0;
+ virtual CcnxForwardingHelper* Copy () const = 0;
/**
* \param node the node within which the new forwarding protocol will run
diff --git a/helper/ccnx-header-helper.h b/helper/ccnx-header-helper.h
index 35aeab8..72d030c 100644
--- a/helper/ccnx-header-helper.h
+++ b/helper/ccnx-header-helper.h
@@ -30,7 +30,9 @@
class Packet;
/**
- * Class implementing functionality to detect CCNx packet type and
+ * \ingroup ccnx-helpers
+ *
+ * \brief Class implementing functionality to detect CCNx packet type and
* create the corresponding object
*
* CCNx doesn't really have a header, so we need this class to
@@ -68,6 +70,15 @@
CreateCorrectCcnxHeader (Ptr<const Packet> packet);
};
+ /**
+ * \ingroup ccnx
+ * \defgroup ccnx-exceptions Exceptions
+ */
+ /**
+ * \ingroup ccnx-exceptions
+ * \brief Exception thrown if CCNx stack receives unrecognized
+ * message type
+ */
class CcnxUnknownHeaderException {};
} // namespace ns3
diff --git a/helper/ccnx-stack-helper.cc b/helper/ccnx-stack-helper.cc
index 50839a3..d59827e 100644
--- a/helper/ccnx-stack-helper.cc
+++ b/helper/ccnx-stack-helper.cc
@@ -1,4 +1,4 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2011 UCLA
*
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Author:
+ * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
*/
/**
@@ -67,7 +67,10 @@
#include "ns3/node.h"
#include "ns3/core-config.h"
#include "ns3/ccnx-forwarding-strategy.h"
+#include "ns3/ccnx-net-device-face.h"
+#include "ns3/ccnx-l3-protocol.h"
+#include "ccnx-face-container.h"
#include "ccnx-stack-helper.h"
#include "ccnx-forwarding-helper.h"
@@ -175,19 +178,21 @@
m_ccnxEnabled = enable;
}
-void
+Ptr<CcnxFaceContainer>
CcnxStackHelper::Install (NodeContainer c) const
{
+ Ptr<CcnxFaceContainer> faces = Create<CcnxFaceContainer> ();
for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
{
- Install (*i);
+ faces->AddAll (Install (*i));
}
+ return faces;
}
-void
+Ptr<CcnxFaceContainer>
CcnxStackHelper::InstallAll (void) const
{
- Install (NodeContainer::GetGlobal ());
+ return Install (NodeContainer::GetGlobal ());
}
void
@@ -199,10 +204,11 @@
node->AggregateObject (protocol);
}
-void
+Ptr<CcnxFaceContainer>
CcnxStackHelper::Install (Ptr<Node> node) const
{
- NS_ASSERT_MSG (m_forwarding, "CcnxForwarding should be set prior calling Install() method");
+ // NS_ASSERT_MSG (m_forwarding, "SetForwardingHelper() should be set prior calling Install() method");
+ Ptr<CcnxFaceContainer> faces = Create<CcnxFaceContainer> ();
if (m_ccnxEnabled)
{
@@ -210,22 +216,32 @@
{
NS_FATAL_ERROR ("CcnxStackHelper::Install (): Installing "
"a CcnxStack to a node with an existing Ccnx object");
- return;
+ return 0;
}
CreateAndAggregateObjectFromTypeId (node, "ns3::CcnxL3Protocol");
// Set forwarding
Ptr<Ccnx> ccnx = node->GetObject<Ccnx> ();
- Ptr<CcnxForwardingStrategy> ccnxForwarding = m_forwarding->Create (node);
- ccnx->SetForwardingStrategy (ccnxForwarding);
+ for (uint32_t index=0; index < node->GetNDevices (); index++)
+ {
+ Ptr<CcnxNetDeviceFace> face = Create<CcnxNetDeviceFace> (node->GetDevice (index));
+ uint32_t __attribute__ ((unused)) face_id = ccnx->AddFace (face);
+ NS_LOG_LOGIC ("Node " << node->GetId () << ": added CcxnNetDeviceFace as face #" << face_id);
+
+ faces->Add (face);
+ }
+ // Ptr<CcnxForwardingStrategy> ccnxForwarding = m_forwarding->Create (node);
+ // ccnx->SetForwardingStrategy (ccnxForwarding);
}
+
+ return faces;
}
-void
+Ptr<CcnxFaceContainer>
CcnxStackHelper::Install (std::string nodeName) const
{
Ptr<Node> node = Names::Find<Node> (nodeName);
- Install (node);
+ return Install (node);
}
static void
diff --git a/helper/ccnx-stack-helper.h b/helper/ccnx-stack-helper.h
index 3d0b3a4..7308241 100644
--- a/helper/ccnx-stack-helper.h
+++ b/helper/ccnx-stack-helper.h
@@ -21,12 +21,9 @@
#ifndef CCNX_STACK_HELPER_H
#define CCNX_STACK_HELPER_H
-#include "ns3/node-container.h"
-#include "ns3/net-device-container.h"
#include "ns3/packet.h"
#include "ns3/ptr.h"
#include "ns3/object-factory.h"
-#include "ns3/ccnx-l3-protocol.h"
#include "ccnx-trace-helper.h"
@@ -34,8 +31,14 @@
class Node;
class CcnxForwardingHelper;
+class CcnxFaceContainer;
/**
+ * \ingroup ccnx
+ * \defgroup ccnx-helpers Helpers
+ */
+/**
+ * \ingroup ccnx-helpers
* \brief Adding CCNx functionality to existing Nodes.
*
* This helper enables pcap and ascii tracing of events in the ccnx stack
@@ -55,25 +58,27 @@
{
public:
/**
- * Create a new CcnxStackHelper which <empty> forwarding by default.
+ * \brief Create a new CcnxStackHelper which <empty> forwarding by default.
*
* \todo set non-empty default forwarding
*/
CcnxStackHelper ();
/**
- * Destroy the CcnxStackHelper
+ * \brief Destroy the CcnxStackHelper
*/
virtual ~CcnxStackHelper ();
CcnxStackHelper (const CcnxStackHelper &);
CcnxStackHelper &operator = (const CcnxStackHelper &o);
/**
- * Return helper internal state to that of a newly constructed one
+ * \brief Return helper internal state to that of a newly constructed one
*/
void Reset ();
/**
+ * Set forwarding strategy helper
+ *
* \param forwarding a new forwarding helper
*
* Set the forwarding helper to use during Install. The forwarding helper is
@@ -81,50 +86,68 @@
* ns3::CcnxFrProtocol per node. This forwarding object is then associated to
* a single ns3::Ccnx object through its ns3::Ccnx::SetforwardingProtocol.
*/
- void SetForwardingHelper (const CcnxForwardingHelper &forwarding);
+ void
+ SetForwardingHelper (const CcnxForwardingHelper &forwarding);
/**
- * Install CCNx stack on the node
+ * \brief Install CCNx stack on the node
*
* This method will assert if called on a node that already has Ccnx object
* installed on it
*
* \param nodeName The name of the node on which to install the stack.
+ *
+ * \returns list of installed faces in the form of a smart pointer
+ * to CcnxFaceContainer object
*/
- void Install (std::string nodeName) const;
+ Ptr<CcnxFaceContainer>
+ Install (std::string nodeName) const;
/**
- * Install CCNx stack on the node
+ * \brief Install CCNx stack on the node
*
* This method will assert if called on a node that already has Ccnx object
* installed on it
*
* \param node The node on which to install the stack.
+ *
+ * \returns list of installed faces in the form of a smart pointer
+ * to CcnxFaceContainer object
*/
- void Install (Ptr<Node> node) const;
+ Ptr<CcnxFaceContainer>
+ Install (Ptr<Node> node) const;
/**
- * Install CCNx stack on each node in the input container
+ * \brief Install CCNx stack on each node in the input container
*
* The program will assert if this method is called on a container with a node
* that already has an ccnx object aggregated to it.
*
* \param c NodeContainer that holds the set of nodes on which to install the
* new stacks.
+ *
+ * \returns list of installed faces in the form of a smart pointer
+ * to CcnxFaceContainer object
*/
- void Install (NodeContainer c) const;
+ Ptr<CcnxFaceContainer>
+ Install (NodeContainer c) const;
/**
- * Install CCNx stack on all nodes in the simulation
+ * \brief Install CCNx stack on all nodes in the simulation
+ *
+ * \returns list of installed faces in the form of a smart pointer
+ * to CcnxFaceContainer object
*/
- void
+ Ptr<CcnxFaceContainer>
InstallAll () const;
/**
* \brief Enable/disable ccnx stack install.
+ *
* \param enable enable state
*/
- void SetCcnxStackInstall (bool enable);
+ void
+ SetCcnxStackInstall (bool enable);
private:
/**
diff --git a/helper/ccnx-trace-helper.h b/helper/ccnx-trace-helper.h
index a0390e7..49ad8e0 100644
--- a/helper/ccnx-trace-helper.h
+++ b/helper/ccnx-trace-helper.h
@@ -14,6 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Authors: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
*/
#ifndef CCNX_TRACE_HELPER_H
@@ -27,6 +29,8 @@
namespace ns3 {
/**
+ * \ingroup ccnx-helpers
+ *
* @brief Base class providing common user-level pcap operations for helpers
* representing Ccnx protocols .
*/
@@ -119,6 +123,8 @@
};
/**
+ * \ingroup ccnx-helpers
+ *
* @brief Base class providing common user-level ascii trace operations for
* helpers representing Ccnx protocols .
*/
diff --git a/model/ccnx-face.h b/model/ccnx-face.h
index 787bfa0..4370ab9 100644
--- a/model/ccnx-face.h
+++ b/model/ccnx-face.h
@@ -31,9 +31,10 @@
class Packet;
class Node;
+
/**
* \ingroup ccnx
- * \defgroup ccnx-face
+ * \defgroup ccnx-face Faces
*/
/**
* \ingroup ccnx-face
@@ -54,7 +55,7 @@
* \param face Face from which packet has been received
* \param packet Received packet
*/
- typedef Callback<void,const Ptr<CcnxFace>&,const Ptr<Packet>& > ProtocolHandler;
+ typedef Callback<void,const Ptr<CcnxFace>&,const Ptr<const Packet>& > ProtocolHandler;
/**
* \brief Interface ID
diff --git a/model/ccnx-l3-protocol.cc b/model/ccnx-l3-protocol.cc
index 07bf848..ff3f926 100644
--- a/model/ccnx-l3-protocol.cc
+++ b/model/ccnx-l3-protocol.cc
@@ -155,7 +155,7 @@
m_faces.push_back (face);
m_faceCounter ++;
- return m_faceCounter;
+ return face->GetId ();
}
Ptr<CcnxFace>
@@ -177,7 +177,7 @@
// Callback from lower layer
void
-CcnxL3Protocol::Receive (const Ptr<CcnxFace> &face, const Ptr<Packet> &p)
+CcnxL3Protocol::Receive (const Ptr<CcnxFace> &face, const Ptr<const Packet> &p)
{
NS_LOG_LOGIC ("Packet from face " << &face << " received on node " << m_node->GetId ());
diff --git a/model/ccnx-l3-protocol.h b/model/ccnx-l3-protocol.h
index 4743bdd..145051f 100644
--- a/model/ccnx-l3-protocol.h
+++ b/model/ccnx-l3-protocol.h
@@ -105,7 +105,7 @@
Ptr<CcnxForwardingStrategy> GetForwardingStrategy () const;
virtual void Send (const Ptr<CcnxFace> &face, const Ptr<Packet> &packet);
- virtual void Receive (const Ptr<CcnxFace> &device, const Ptr<Packet> &p);
+ virtual void Receive (const Ptr<CcnxFace> &face, const Ptr<const Packet> &p);
virtual uint32_t AddFace (const Ptr<CcnxFace> &face);
virtual uint32_t GetNFaces () const;
@@ -113,7 +113,7 @@
protected:
/**
- * Actual processing of incoming CCNx packets. Also processing packets coming from local apps
+ * \brief Actual processing of incoming CCNx interests
*
* Processing Interest packets
*/
@@ -124,7 +124,7 @@
/**
- * Actual processing of incoming CCNx packets. Also processing packets coming from local apps
+ * \brief Actual processing of incoming CCNx content objects
*
* Processing ContentObject packets
*/
@@ -153,12 +153,12 @@
ReceiveAndProcess (Ptr<CcnxFace> face, Ptr<Header> header, Ptr<Packet> p);
private:
- uint32_t m_faceCounter; ///< counter of faces. Increased every time a new face is added to the stack
+ uint32_t m_faceCounter; ///< \brief counter of faces. Increased every time a new face is added to the stack
typedef std::vector<Ptr<CcnxFace> > CcnxFaceList;
- CcnxFaceList m_faces;
+ CcnxFaceList m_faces; ///< \brief list of faces that belongs to ccnx stack on this node
- Ptr<Node> m_node;
- Ptr<CcnxForwardingStrategy> m_forwardingStrategy;
+ Ptr<Node> m_node; ///< \brief node on which ccnx stack is installed
+ Ptr<CcnxForwardingStrategy> m_forwardingStrategy; ///< \brief smart pointer to the selected forwarding strategy
// TracedCallback<Ptr<const Packet>, Ptr<const CcnxFace> > m_sendOutgoingTrace;
// TracedCallback<Ptr<const Packet>, Ptr<const CcnxFace> > m_unicastForwardTrace;
diff --git a/model/ccnx-net-device-face.cc b/model/ccnx-net-device-face.cc
index 37a3555..b5816a4 100644
--- a/model/ccnx-net-device-face.cc
+++ b/model/ccnx-net-device-face.cc
@@ -44,14 +44,14 @@
}
/**
- * By default, Ccnx face are created in the "down" state
- * with no IP addresses. Before becoming useable, the user must
- * invoke SetUp on them once an Ccnx address and mask have been set.
+ * By default, Ccnx face are created in the "down" state. Before
+ * becoming useable, the user must invoke SetUp on the face
*/
-CcnxNetDeviceFace::CcnxNetDeviceFace ()
- : m_netDevice (0)
+CcnxNetDeviceFace::CcnxNetDeviceFace (const Ptr<NetDevice> &netDevice)
{
NS_LOG_FUNCTION (this);
+
+ m_netDevice = netDevice;
}
CcnxNetDeviceFace::~CcnxNetDeviceFace ()
@@ -77,12 +77,6 @@
Object::DoDispose ();
}
-void
-CcnxNetDeviceFace::SetNetDevice (Ptr<NetDevice> netDevice)
-{
- m_netDevice = netDevice;
-}
-
Ptr<NetDevice>
CcnxNetDeviceFace::GetNetDevice () const
{
@@ -127,7 +121,7 @@
const Address &to,
NetDevice::PacketType packetType)
{
- // bla bla bla
+ m_protocolHandler (Ptr<CcnxFace>(this), p);
}
diff --git a/model/ccnx-net-device-face.h b/model/ccnx-net-device-face.h
index 397d6c1..baf6a48 100644
--- a/model/ccnx-net-device-face.h
+++ b/model/ccnx-net-device-face.h
@@ -36,6 +36,10 @@
* component responsible for actual delivery of data packet to and
* from CCNx stack
*
+ * CcnxNetDevice face is permanently associated with one NetDevice
+ * object and this object cannot be changed for the lifetime of the
+ * face
+ *
* \see CcnxLocalFace, CcnxNetDeviceFace, CcnxIpv4Face, CcnxUdpFace
*/
class CcnxNetDeviceFace : public CcnxFace
@@ -49,9 +53,12 @@
static TypeId GetTypeId (void);
/**
- * \brief Default constructor
+ * \brief Constructor
+ *
+ * \param netDevice a smart pointer to NetDevice object to which
+ * this face will be associate
*/
- CcnxNetDeviceFace ();
+ CcnxNetDeviceFace (const Ptr<NetDevice> &netDevice);
virtual ~CcnxNetDeviceFace();
////////////////////////////////////////////////////////////////////
@@ -64,13 +71,6 @@
////////////////////////////////////////////////////////////////////
/**
- * \brief Associate NetDevice object with face
- *
- * \param node smart pointer to a NetDevice object
- */
- void SetNetDevice (Ptr<NetDevice> node);
-
- /**
* \brief Get NetDevice associated with the face
*
* \returns smart pointer to NetDevice associated with the face
@@ -84,7 +84,7 @@
CcnxNetDeviceFace (const CcnxNetDeviceFace &); ///< \brief Disabled copy constructor
CcnxNetDeviceFace& operator= (const CcnxNetDeviceFace &); ///< \brief Disabled copy operator
- // callback
+ /// \brief callback from lower layers
void ReceiveFromNetDevice (Ptr<NetDevice> device,
Ptr<const Packet> p,
uint16_t protocol,
diff --git a/model/ccnx.h b/model/ccnx.h
index 1cbe428..412fd2e 100644
--- a/model/ccnx.h
+++ b/model/ccnx.h
@@ -90,7 +90,7 @@
* \param p the packet
*/
virtual void
- Receive (const Ptr<CcnxFace> &device, const Ptr<Packet> &p) = 0;
+ Receive (const Ptr<CcnxFace> &face, const Ptr<const Packet> &p) = 0;
/**
* \brief Register a new forwarding strategy to be used by this Ccnx
diff --git a/wscript b/wscript
index 0142dc2..64a7336 100644
--- a/wscript
+++ b/wscript
@@ -10,7 +10,7 @@
def configure(conf):
conf.check_tool('boost')
- conf.env['BOOST'] = conf.check_boost(lib = '', # need only base
+ conf.env['BOOST'] = conf.check_boost(lib = 'iostreams',
min_version='1.40.0' )
if not conf.env['BOOST']:
conf.report_optional_feature("ndn-abstract", "NDN abstraction", False,
@@ -22,13 +22,16 @@
def build(bld):
- module = bld.create_ns3_module ('NDNabstraction', ['applications', 'core', 'network', 'point-to-point','topology-read','visualizer'])
+ module = bld.create_ns3_module ('NDNabstraction', ['core', 'network', 'point-to-point',
+ 'topology-read'])
+ module.uselib = 'BOOST BOOST_IOSTREAMS'
tests = bld.create_ns3_module_test_library('NDNabstraction')
headers = bld.new_task_gen('ns3header')
headers.module = 'NDNabstraction'
if not bld.env['ENABLE_NDN_ABSTRACT']:
+ conf.env['MODULES_NOT_BUILT'].append('NDNabstraction')
return
module.find_sources_in_dirs (['model', 'apps', 'helper'],[],['.cc']);
@@ -36,28 +39,24 @@
headers.find_sources_in_dirs( ['model', 'apps', 'helper'], [], ['.h'] );
- for path in ["examples"]:
- anode = bld.path.find_dir (path)
- if not anode or not anode.is_child_of(bld.srcnode):
- raise Utils.WscriptError("Unable to use '%s' - either because \
- it's not a relative path"", or it's not child of \
- '%s'."%(name,bld.srcnode))
- bld.rescan(anode)
- for filename in bld.cache_dir_contents[anode.id]:
- if filename.startswith('.') or not filename.endswith(".cc"):
- continue
- name = filename[:-len(".cc")]
- obj = bld.create_ns3_program(name, ['NDNabstraction'])
- obj.path = obj.path.find_dir (path)
- obj.source = filename
- obj.target = name
- obj.name = obj.target
-
- if bld.env['ENABLE_OPENSSL']:
- module.uselib = 'OPENSSL'
-
- if bld.env['ENABLE_EXAMPLES']:
- bld.add_subdirs('examples')
+ if True or bld.env['ENABLE_EXAMPLES']:
+ for path in ["examples"]:
+ anode = bld.path.find_dir (path)
+ if not anode or not anode.is_child_of(bld.srcnode):
+ raise Utils.WscriptError("Unable to use '%s' - either because \
+ it's not a relative path"", or it's not child of \
+ '%s'."%(name,bld.srcnode))
+ bld.rescan(anode)
+ for filename in bld.cache_dir_contents[anode.id]:
+ if filename.startswith('.') or not filename.endswith(".cc"):
+ continue
+ name = filename[:-len(".cc")]
+ obj = bld.create_ns3_program(name, ['NDNabstraction'])
+ obj.path = obj.path.find_dir (path)
+ obj.source = filename
+ obj.target = name
+ obj.name = obj.target
+ obj.uselib = 'BOOST BOOST_IOSTREAMS'
bld.ns3_python_bindings()