Adding PIT printout capability
diff --git a/model/ccnx-pit-entry.cc b/model/ccnx-pit-entry.cc
index 0cc6509..80135fd 100644
--- a/model/ccnx-pit-entry.cc
+++ b/model/ccnx-pit-entry.cc
@@ -144,4 +144,35 @@
m_maxRetxCount++;
}
+std::ostream& operator<< (std::ostream& os, const CcnxPitEntry &entry)
+{
+ os << "Prefix: " << *entry.m_prefix << "\n";
+ os << "In: ";
+ bool first = true;
+ BOOST_FOREACH (const CcnxPitEntryIncomingFace &face, entry.m_incoming)
+ {
+ if (!first)
+ os << ",";
+ else
+ first = false;
+
+ os << *face.m_face;
+ }
+
+ os << "\nOut: ";
+ first = true;
+ BOOST_FOREACH (const CcnxPitEntryOutgoingFace &face, entry.m_outgoing)
+ {
+ if (!first)
+ os << ",";
+ else
+ first = false;
+
+ os << *face.m_face;
+ }
+
+ return os;
+}
+
+
}