Moving helper components to the plugins/ folder. Disabling compilation of these components
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
index fe098ad..9538a1f 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
@@ -65,6 +65,16 @@
virtual boost::any accept( Visitor &v, boost::any param ) = 0;
};
+// Necessary until Buffer::Iterator gets PeekU8 call
+inline
+uint8_t
+BufferIteratorPeekU8 (Buffer::Iterator &i)
+{
+ uint8_t ret = i.ReadU8 ();
+ i.Prev ();
+ return ret;
+}
+
}
}
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc
index 0fdea06..68fc794 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc
@@ -41,7 +41,7 @@
return; // hack #1. Do not process nesting block for <Content>
// parse attributes until first nested block reached
- while (!start.IsEnd () && start.PeekU8 ()!=CCN_CLOSE)
+ while (!start.IsEnd () && BufferIteratorPeekU8 (start)!=CCN_CLOSE)
{
Ptr<Block> block = Block::ParseBlock (start);
if (DynamicCast<BaseAttr> (block)!=0)
@@ -54,7 +54,7 @@
}
// parse the rest of nested blocks
- while (!start.IsEnd () && start.PeekU8 ()!=CCN_CLOSE)
+ while (!start.IsEnd () && BufferIteratorPeekU8 (start)!=CCN_CLOSE)
{
// hack #2. Stop processing nested blocks if last block was <Content>
if (m_dtag == CCN_DTAG_ContentObject && // we are in <ContentObject>
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc
index 5862ad4..723c57e 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc
@@ -37,7 +37,7 @@
throw CcnbDecodingException ();
// parse attributes until first nested block reached
- while (!start.IsEnd () && start.PeekU8 ()!=CCN_CLOSE)
+ while (!start.IsEnd () && BufferIteratorPeekU8 (start)!=CCN_CLOSE)
{
Ptr<Block> block = Block::ParseBlock (start);
if (DynamicCast<BaseAttr> (block)!=0)
@@ -50,7 +50,7 @@
}
// parse the rest of nested blocks
- while (!start.IsEnd () && start.PeekU8 ()!=CCN_CLOSE)
+ while (!start.IsEnd () && BufferIteratorPeekU8 (start)!=CCN_CLOSE)
{
Ptr<Block> block = Block::ParseBlock (start);
m_nestedTags.push_back (block);
diff --git a/model/ccnx-bestroute-strategy.cc b/model/ccnx-bestroute-strategy.cc
index 1e13726..e2b973e 100644
--- a/model/ccnx-bestroute-strategy.cc
+++ b/model/ccnx-bestroute-strategy.cc
@@ -23,7 +23,6 @@
#include "ccnx-interest-header.h"
#include "ccnx-pit.h"
#include "ccnx-pit-entry.h"
-#include "ns3/weights-path-stretch-tag.h"
#include "ns3/assert.h"
#include "ns3/log.h"
diff --git a/model/ccnx-flooding-strategy.cc b/model/ccnx-flooding-strategy.cc
index 278f847..290497e 100644
--- a/model/ccnx-flooding-strategy.cc
+++ b/model/ccnx-flooding-strategy.cc
@@ -22,7 +22,6 @@
#include "ccnx-interest-header.h"
#include "ccnx-pit.h"
#include "ccnx-pit-entry.h"
-#include "ns3/weights-path-stretch-tag.h"
#include "ns3/assert.h"
#include "ns3/log.h"
diff --git a/model/ccnx-local-face.cc b/model/ccnx-local-face.cc
index de01212..8f78dff 100644
--- a/model/ccnx-local-face.cc
+++ b/model/ccnx-local-face.cc
@@ -33,7 +33,6 @@
#include "ccnx-interest-header.h"
#include "ccnx-content-object-header.h"
-#include "ns3/weights-path-stretch-tag.h"
NS_LOG_COMPONENT_DEFINE ("CcnxLocalFace");
diff --git a/plugins/README b/plugins/README
new file mode 100644
index 0000000..b8eb740
--- /dev/null
+++ b/plugins/README
@@ -0,0 +1,13 @@
+This folder contains several extensions that can be used in simulation scenarios.
+
+tracers/
+ an extensive set of tracers that can be used in NDN scenarios
+ * Some tracers require patching of NDN module code (patch provided)
+
+topology/
+ extension of topology reader
+ * requires patching of topology module (patch provided)
+
+mobility/
+ several custom mobility models and position allocator.
+ * necessary for topology extensions
diff --git a/utils/highway-position-allocator.cc b/plugins/mobility/highway-position-allocator.cc
similarity index 100%
rename from utils/highway-position-allocator.cc
rename to plugins/mobility/highway-position-allocator.cc
diff --git a/utils/highway-position-allocator.h b/plugins/mobility/highway-position-allocator.h
similarity index 100%
rename from utils/highway-position-allocator.h
rename to plugins/mobility/highway-position-allocator.h
diff --git a/utils/spring-mobility-helper.cc b/plugins/mobility/spring-mobility-helper.cc
similarity index 100%
rename from utils/spring-mobility-helper.cc
rename to plugins/mobility/spring-mobility-helper.cc
diff --git a/utils/spring-mobility-helper.h b/plugins/mobility/spring-mobility-helper.h
similarity index 100%
rename from utils/spring-mobility-helper.h
rename to plugins/mobility/spring-mobility-helper.h
diff --git a/utils/spring-mobility-model.cc b/plugins/mobility/spring-mobility-model.cc
similarity index 100%
rename from utils/spring-mobility-model.cc
rename to plugins/mobility/spring-mobility-model.cc
diff --git a/utils/spring-mobility-model.h b/plugins/mobility/spring-mobility-model.h
similarity index 100%
rename from utils/spring-mobility-model.h
rename to plugins/mobility/spring-mobility-model.h
diff --git a/utils/annotated-topology-reader.cc b/plugins/topology/annotated-topology-reader.cc
similarity index 100%
rename from utils/annotated-topology-reader.cc
rename to plugins/topology/annotated-topology-reader.cc
diff --git a/utils/annotated-topology-reader.h b/plugins/topology/annotated-topology-reader.h
similarity index 100%
rename from utils/annotated-topology-reader.h
rename to plugins/topology/annotated-topology-reader.h
diff --git a/utils/rocketfuel-weights-reader.cc b/plugins/topology/rocketfuel-weights-reader.cc
similarity index 100%
rename from utils/rocketfuel-weights-reader.cc
rename to plugins/topology/rocketfuel-weights-reader.cc
diff --git a/utils/rocketfuel-weights-reader.h b/plugins/topology/rocketfuel-weights-reader.h
similarity index 100%
rename from utils/rocketfuel-weights-reader.h
rename to plugins/topology/rocketfuel-weights-reader.h
diff --git a/helper/tracers/ccnx-aggregate-app-tracer.cc b/plugins/tracers/ccnx-aggregate-app-tracer.cc
similarity index 100%
rename from helper/tracers/ccnx-aggregate-app-tracer.cc
rename to plugins/tracers/ccnx-aggregate-app-tracer.cc
diff --git a/helper/tracers/ccnx-aggregate-app-tracer.h b/plugins/tracers/ccnx-aggregate-app-tracer.h
similarity index 100%
rename from helper/tracers/ccnx-aggregate-app-tracer.h
rename to plugins/tracers/ccnx-aggregate-app-tracer.h
diff --git a/helper/tracers/ccnx-aggregate-l3-tracer.cc b/plugins/tracers/ccnx-aggregate-l3-tracer.cc
similarity index 100%
rename from helper/tracers/ccnx-aggregate-l3-tracer.cc
rename to plugins/tracers/ccnx-aggregate-l3-tracer.cc
diff --git a/helper/tracers/ccnx-aggregate-l3-tracer.h b/plugins/tracers/ccnx-aggregate-l3-tracer.h
similarity index 100%
rename from helper/tracers/ccnx-aggregate-l3-tracer.h
rename to plugins/tracers/ccnx-aggregate-l3-tracer.h
diff --git a/helper/tracers/ccnx-app-tracer.cc b/plugins/tracers/ccnx-app-tracer.cc
similarity index 100%
rename from helper/tracers/ccnx-app-tracer.cc
rename to plugins/tracers/ccnx-app-tracer.cc
diff --git a/helper/tracers/ccnx-app-tracer.h b/plugins/tracers/ccnx-app-tracer.h
similarity index 100%
rename from helper/tracers/ccnx-app-tracer.h
rename to plugins/tracers/ccnx-app-tracer.h
diff --git a/helper/tracers/ccnx-consumer-window-tracer.cc b/plugins/tracers/ccnx-consumer-window-tracer.cc
similarity index 100%
rename from helper/tracers/ccnx-consumer-window-tracer.cc
rename to plugins/tracers/ccnx-consumer-window-tracer.cc
diff --git a/helper/tracers/ccnx-consumer-window-tracer.h b/plugins/tracers/ccnx-consumer-window-tracer.h
similarity index 100%
rename from helper/tracers/ccnx-consumer-window-tracer.h
rename to plugins/tracers/ccnx-consumer-window-tracer.h
diff --git a/helper/tracers/ccnx-l3-tracer.cc b/plugins/tracers/ccnx-l3-tracer.cc
similarity index 100%
rename from helper/tracers/ccnx-l3-tracer.cc
rename to plugins/tracers/ccnx-l3-tracer.cc
diff --git a/helper/tracers/ccnx-l3-tracer.h b/plugins/tracers/ccnx-l3-tracer.h
similarity index 100%
rename from helper/tracers/ccnx-l3-tracer.h
rename to plugins/tracers/ccnx-l3-tracer.h
diff --git a/helper/tracers/ccnx-path-weight-tracer.cc b/plugins/tracers/ccnx-path-weight-tracer.cc
similarity index 100%
rename from helper/tracers/ccnx-path-weight-tracer.cc
rename to plugins/tracers/ccnx-path-weight-tracer.cc
diff --git a/helper/tracers/ccnx-path-weight-tracer.h b/plugins/tracers/ccnx-path-weight-tracer.h
similarity index 100%
rename from helper/tracers/ccnx-path-weight-tracer.h
rename to plugins/tracers/ccnx-path-weight-tracer.h
diff --git a/helper/tracers/ccnx-rate-l3-tracer.cc b/plugins/tracers/ccnx-rate-l3-tracer.cc
similarity index 100%
rename from helper/tracers/ccnx-rate-l3-tracer.cc
rename to plugins/tracers/ccnx-rate-l3-tracer.cc
diff --git a/helper/tracers/ccnx-rate-l3-tracer.h b/plugins/tracers/ccnx-rate-l3-tracer.h
similarity index 100%
rename from helper/tracers/ccnx-rate-l3-tracer.h
rename to plugins/tracers/ccnx-rate-l3-tracer.h
diff --git a/helper/tracers/ccnx-seqs-app-tracer.cc b/plugins/tracers/ccnx-seqs-app-tracer.cc
similarity index 100%
rename from helper/tracers/ccnx-seqs-app-tracer.cc
rename to plugins/tracers/ccnx-seqs-app-tracer.cc
diff --git a/helper/tracers/ccnx-seqs-app-tracer.h b/plugins/tracers/ccnx-seqs-app-tracer.h
similarity index 100%
rename from helper/tracers/ccnx-seqs-app-tracer.h
rename to plugins/tracers/ccnx-seqs-app-tracer.h
diff --git a/helper/ccnx-trace-helper.cc b/plugins/tracers/ccnx-trace-helper.cc
similarity index 94%
rename from helper/ccnx-trace-helper.cc
rename to plugins/tracers/ccnx-trace-helper.cc
index a153862..5e98c6f 100644
--- a/helper/ccnx-trace-helper.cc
+++ b/plugins/tracers/ccnx-trace-helper.cc
@@ -167,8 +167,8 @@
app != apps.End ();
app++, appId++)
{
- NS_LOG_DEBUG ("App: " << lexical_cast<string> (appId) << ", typeId: " << (*app)->GetInstanceTypeId ().GetName ());
- if ((*app)->GetInstanceTypeId ().GetName () == appName)
+ NS_LOG_DEBUG ("App: " << lexical_cast<string> (appId) << ", typeId: " << (*app).second->GetInstanceTypeId ().GetName ());
+ if ((*app).second->GetInstanceTypeId ().GetName () == appName)
{
m_apps.push_back (Create<CcnxAggregateAppTracer> (appName,
*node,
@@ -264,8 +264,8 @@
app != apps.End ();
app++, appId++)
{
- NS_LOG_DEBUG ("App: " << lexical_cast<string> (appId) << ", typeId: " << (*app)->GetInstanceTypeId ().GetName ());
- if ((*app)->GetInstanceTypeId ().GetName () == appName)
+ NS_LOG_DEBUG ("App: " << lexical_cast<string> (appId) << ", typeId: " << (*app).second->GetInstanceTypeId ().GetName ());
+ if ((*app).second->GetInstanceTypeId ().GetName () == appName)
{
Ptr<CcnxSeqsAppTracer> trace = Create<CcnxSeqsAppTracer> (boost::ref(*m_appSeqsTrace),
appName,
@@ -305,9 +305,9 @@
app != apps.End ();
app++, appId++)
{
- NS_LOG_DEBUG ("App: " << lexical_cast<string> (appId) << ", typeId: " << (*app)->GetInstanceTypeId ().GetName ());
- if ((*app)->GetInstanceTypeId ().GetName () == "ns3::PacketSink" ||
- (*app)->GetInstanceTypeId ().GetName () == "ns3::BulkSendApplication")
+ NS_LOG_DEBUG ("App: " << lexical_cast<string> (appId) << ", typeId: " << (*app).second->GetInstanceTypeId ().GetName ());
+ if ((*app).second->GetInstanceTypeId ().GetName () == "ns3::PacketSink" ||
+ (*app).second->GetInstanceTypeId ().GetName () == "ns3::BulkSendApplication")
{
Ptr<Ipv4SeqsAppTracer> trace = Create<Ipv4SeqsAppTracer> (boost::ref(*m_ipv4AppSeqsTrace),
*node,
@@ -345,7 +345,7 @@
app != apps.End ();
app++, appId++)
{
- if ((*app)->GetInstanceTypeId ().GetName () == "ns3::CcnxConsumerWindow")
+ if ((*app).second->GetInstanceTypeId ().GetName () == "ns3::CcnxConsumerWindow")
{
Ptr<CcnxConsumerWindowTracer> trace = Create<CcnxConsumerWindowTracer> (boost::ref(*m_windowsTrace),
*node,
diff --git a/helper/tracers/ipv4-app-tracer.cc b/plugins/tracers/ipv4-app-tracer.cc
similarity index 100%
rename from helper/tracers/ipv4-app-tracer.cc
rename to plugins/tracers/ipv4-app-tracer.cc
diff --git a/helper/tracers/ipv4-app-tracer.h b/plugins/tracers/ipv4-app-tracer.h
similarity index 100%
rename from helper/tracers/ipv4-app-tracer.h
rename to plugins/tracers/ipv4-app-tracer.h
diff --git a/helper/tracers/ipv4-l3-tracer.cc b/plugins/tracers/ipv4-l3-tracer.cc
similarity index 100%
rename from helper/tracers/ipv4-l3-tracer.cc
rename to plugins/tracers/ipv4-l3-tracer.cc
diff --git a/helper/tracers/ipv4-l3-tracer.h b/plugins/tracers/ipv4-l3-tracer.h
similarity index 100%
rename from helper/tracers/ipv4-l3-tracer.h
rename to plugins/tracers/ipv4-l3-tracer.h
diff --git a/helper/tracers/ipv4-rate-l3-tracer.cc b/plugins/tracers/ipv4-rate-l3-tracer.cc
similarity index 100%
rename from helper/tracers/ipv4-rate-l3-tracer.cc
rename to plugins/tracers/ipv4-rate-l3-tracer.cc
diff --git a/helper/tracers/ipv4-rate-l3-tracer.h b/plugins/tracers/ipv4-rate-l3-tracer.h
similarity index 100%
rename from helper/tracers/ipv4-rate-l3-tracer.h
rename to plugins/tracers/ipv4-rate-l3-tracer.h
diff --git a/helper/tracers/ipv4-seqs-app-tracer.cc b/plugins/tracers/ipv4-seqs-app-tracer.cc
similarity index 100%
rename from helper/tracers/ipv4-seqs-app-tracer.cc
rename to plugins/tracers/ipv4-seqs-app-tracer.cc
diff --git a/helper/tracers/ipv4-seqs-app-tracer.h b/plugins/tracers/ipv4-seqs-app-tracer.h
similarity index 100%
rename from helper/tracers/ipv4-seqs-app-tracer.h
rename to plugins/tracers/ipv4-seqs-app-tracer.h
diff --git a/utils/weights-path-stretch-tag.cc b/plugins/tracers/weights-path-stretch-tag.cc
similarity index 100%
rename from utils/weights-path-stretch-tag.cc
rename to plugins/tracers/weights-path-stretch-tag.cc
diff --git a/utils/weights-path-stretch-tag.h b/plugins/tracers/weights-path-stretch-tag.h
similarity index 100%
rename from utils/weights-path-stretch-tag.h
rename to plugins/tracers/weights-path-stretch-tag.h
diff --git a/wscript b/wscript
index 9203c61..00eec0e 100644
--- a/wscript
+++ b/wscript
@@ -57,13 +57,13 @@
"helper/ccnx-stack-helper.h",
"helper/ccnx-app-helper.h",
"helper/ccnx-header-helper.h",
- "helper/ccnx-trace-helper.h",
- "helper/tracers/ipv4-app-tracer.h",
- "helper/tracers/ipv4-l3-tracer.h",
- "helper/tracers/ccnx-app-tracer.h",
- "helper/tracers/ccnx-l3-tracer.h",
- "helper/tracers/ccnx-consumer-window-tracer.h",
- "helper/tracers/ccnx-path-weight-tracer.h",
+ # "helper/ccnx-trace-helper.h",
+ # "helper/tracers/ipv4-app-tracer.h",
+ # "helper/tracers/ipv4-l3-tracer.h",
+ # "helper/tracers/ccnx-app-tracer.h",
+ # "helper/tracers/ccnx-l3-tracer.h",
+ # "helper/tracers/ccnx-consumer-window-tracer.h",
+ # "helper/tracers/ccnx-path-weight-tracer.h",
"helper/ccnx-face-container.h",
"helper/ccnx-global-routing-helper.h",
@@ -82,11 +82,11 @@
"model/ccnx-name-components-hash-helper.h",
"utils/batches.h",
- "utils/weights-path-stretch-tag.h",
- "utils/spring-mobility-model.h",
- "utils/spring-mobility-helper.h",
- "utils/rocketfuel-weights-reader.h",
- "utils/annotated-topology-reader.h",
+ # "utils/weights-path-stretch-tag.h",
+ # "utils/spring-mobility-model.h",
+ # "utils/spring-mobility-helper.h",
+ # "utils/rocketfuel-weights-reader.h",
+ # "utils/annotated-topology-reader.h",
]
tests.source = bld.path.ant_glob('test/*.cc');