Adding one more helper to manually create routes on nodes
diff --git a/helper/ccnx-stack-helper.cc b/helper/ccnx-stack-helper.cc
index 8280c2f..e178d18 100644
--- a/helper/ccnx-stack-helper.cc
+++ b/helper/ccnx-stack-helper.cc
@@ -303,6 +303,18 @@
}
void
+CcnxStackHelper::AddRoute (Ptr<Node> node, std::string prefix, uint32_t faceId, int32_t metric)
+{
+ Ptr<Ccnx> ccnx = node->GetObject<Ccnx> ();
+ NS_ASSERT_MSG (ccnx != 0, "Ccnx stack should be installed on the node");
+
+ Ptr<CcnxFace> face = ccnx->GetFace (faceId);
+ NS_ASSERT_MSG (face != 0, "Face with ID [" << faceId << "] does not exist on node [" << node->GetId () << "]");
+
+ AddRoute (node, prefix, face, metric);
+}
+
+void
CcnxStackHelper::AddRoute (std::string nodeName, std::string prefix, uint32_t faceId, int32_t metric)
{
Ptr<Node> node = Names::Find<Node> (nodeName);
diff --git a/helper/ccnx-stack-helper.h b/helper/ccnx-stack-helper.h
index 764a982..ee0b547 100644
--- a/helper/ccnx-stack-helper.h
+++ b/helper/ccnx-stack-helper.h
@@ -202,6 +202,17 @@
/**
* \brief Add forwarding entry in FIB
*
+ * \param nodeName Node
+ * \param prefix Routing prefix
+ * \param faceId Face index
+ * \param metric Routing metric
+ */
+ static void
+ AddRoute (Ptr<Node> node, std::string prefix, uint32_t faceId, int32_t metric);
+
+ /**
+ * \brief Add forwarding entry in FIB
+ *
* \param node Node
* \param prefix Routing prefix
* \param face Face