face-management-protocol: Finalizing TLV encoding/decoding for ForwardingEntry
Change-Id: I95a1e73ef2fe4e63563a5ce2419523fc12bee97e
diff --git a/include/ndn-cpp/forwarding-flags.hpp b/include/ndn-cpp/forwarding-flags.hpp
index f8e62c7..a0c81c1 100644
--- a/include/ndn-cpp/forwarding-flags.hpp
+++ b/include/ndn-cpp/forwarding-flags.hpp
@@ -32,7 +32,6 @@
, local_(false)
, tap_(false)
, captureOk_(false)
-
{
}
@@ -197,6 +196,29 @@
captureOk_ = (flags & Tlv::FaceManagement::FORW_CAPTURE_OK) ? true : false;
}
+inline std::ostream&
+operator << (std::ostream &os, const ForwardingFlags &flags)
+{
+ if (flags.getActive())
+ os << "ACTIVE ";
+ if (flags.getChildInherit())
+ os << "CHILE_INHERIT ";
+ if (flags.getAdvertise())
+ os << "ADVERTISE ";
+ if (flags.getLast())
+ os << "LAST ";
+ if (flags.getCapture())
+ os << "CAPTURE ";
+ if (flags.getLocal())
+ os << "LOCAL ";
+ if (flags.getTap())
+ os << "TAP ";
+ if (flags.getCaptureOk())
+ os << "CAPTURE_OK ";
+
+ return os;
+}
+
}
#endif