Added support for ForwardingEntry.
diff --git a/Makefile.am b/Makefile.am
index 9608b28..6899e46 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,21 +11,24 @@
 
 lib_LTLIBRARIES = libndn-c.la libndn-cpp.la
 
-bin_PROGRAMS = bin/test-encode-decode-interest bin/test-encode-decode-data bin/test-get-async bin/test-publish-async
+bin_PROGRAMS = bin/test-encode-decode-forwarding-entry bin/test-encode-decode-interest bin/test-encode-decode-data \
+  bin/test-get-async bin/test-publish-async
 
 libndn_c_la_SOURCES = \
   config.h \
   ndn-cpp/c/data.h \
+  ndn-cpp/c/errors.c ndn-cpp/c/errors.h \
+  ndn-cpp/c/forwarding-entry.h \
   ndn-cpp/c/interest.c ndn-cpp/c/interest.h \
   ndn-cpp/c/key.h \
   ndn-cpp/c/name.c ndn-cpp/c/name.h \
   ndn-cpp/c/publisher-public-key-digest.h \
-  ndn-cpp/c/errors.c ndn-cpp/c/errors.h \
   ndn-cpp/c/encoding/binary-xml.h \
   ndn-cpp/c/encoding/binary-xml-data.c ndn-cpp/c/encoding/binary-xml-data.h \
   ndn-cpp/c/encoding/binary-xml-decoder.c ndn-cpp/c/encoding/binary-xml-decoder.h \
   ndn-cpp/c/encoding/binary-xml-element-reader.c ndn-cpp/c/encoding/binary-xml-element-reader.h \
   ndn-cpp/c/encoding/binary-xml-encoder.c ndn-cpp/c/encoding/binary-xml-encoder.h \
+  ndn-cpp/c/encoding/binary-xml-forwarding-entry.c ndn-cpp/c/encoding/binary-xml-forwarding-entry.h \
   ndn-cpp/c/encoding/binary-xml-interest.c ndn-cpp/c/encoding/binary-xml-interest.h \
   ndn-cpp/c/encoding/binary-xml-key.c ndn-cpp/c/encoding/binary-xml-key.h \
   ndn-cpp/c/encoding/binary-xml-name.c ndn-cpp/c/encoding/binary-xml-name.h \
@@ -46,6 +49,7 @@
   ndn-cpp/interest.cpp ndn-cpp/c/interest.h ndn-cpp/interest.hpp \
   ndn-cpp/key.cpp ndn-cpp/c/key.h ndn-cpp/key.hpp \
   ndn-cpp/face.cpp ndn-cpp/face.hpp \
+  ndn-cpp/forwarding-entry.cpp ndn-cpp/c/forwarding-entry.h ndn-cpp/forwarding-entry.hpp \
   ndn-cpp/name.cpp ndn-cpp/c/name.h ndn-cpp/name.hpp \
   ndn-cpp/node.cpp ndn-cpp/node.hpp \
   ndn-cpp/publisher-public-key-digest.hpp \
@@ -62,6 +66,9 @@
   ndn-cpp/c/transport/socket-transport.h ndn-cpp/c/transport/udp-transport.h ndn-cpp/transport/udp-transport.cpp ndn-cpp/transport/udp-transport.hpp \
   ndn-cpp/util/dynamic-uchar-vector.cpp ndn-cpp/util/dynamic-uchar-vector.hpp
 
+bin_test_encode_decode_forwarding_entry_SOURCES = tests/test-encode-decode-forwarding-entry.cpp
+bin_test_encode_decode_forwarding_entry_LDADD = libndn-cpp.la libndn-c.la
+
 bin_test_encode_decode_interest_SOURCES = tests/test-encode-decode-interest.cpp
 bin_test_encode_decode_interest_LDADD = libndn-cpp.la libndn-c.la
 
diff --git a/Makefile.in b/Makefile.in
index c21b539..44e5993 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -87,7 +87,8 @@
 	$(am__configure_deps) $(srcdir)/config.h.in \
 	$(dist_noinst_SCRIPTS) depcomp COPYING INSTALL ar-lib compile \
 	config.guess config.sub install-sh missing ltmain.sh
-bin_PROGRAMS = bin/test-encode-decode-interest$(EXEEXT) \
+bin_PROGRAMS = bin/test-encode-decode-forwarding-entry$(EXEEXT) \
+	bin/test-encode-decode-interest$(EXEEXT) \
 	bin/test-encode-decode-data$(EXEEXT) \
 	bin/test-get-async$(EXEEXT) bin/test-publish-async$(EXEEXT)
 subdir = .
@@ -132,11 +133,12 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libndn_c_la_LIBADD =
 am__dirstamp = $(am__leading_dot)dirstamp
-am_libndn_c_la_OBJECTS = ndn-cpp/c/interest.lo ndn-cpp/c/name.lo \
-	ndn-cpp/c/errors.lo ndn-cpp/c/encoding/binary-xml-data.lo \
+am_libndn_c_la_OBJECTS = ndn-cpp/c/errors.lo ndn-cpp/c/interest.lo \
+	ndn-cpp/c/name.lo ndn-cpp/c/encoding/binary-xml-data.lo \
 	ndn-cpp/c/encoding/binary-xml-decoder.lo \
 	ndn-cpp/c/encoding/binary-xml-element-reader.lo \
 	ndn-cpp/c/encoding/binary-xml-encoder.lo \
+	ndn-cpp/c/encoding/binary-xml-forwarding-entry.lo \
 	ndn-cpp/c/encoding/binary-xml-interest.lo \
 	ndn-cpp/c/encoding/binary-xml-key.lo \
 	ndn-cpp/c/encoding/binary-xml-name.lo \
@@ -153,7 +155,7 @@
 libndn_cpp_la_LIBADD =
 am_libndn_cpp_la_OBJECTS = ndn-cpp/common.lo ndn-cpp/data.lo \
 	ndn-cpp/interest.lo ndn-cpp/key.lo ndn-cpp/face.lo \
-	ndn-cpp/name.lo ndn-cpp/node.lo \
+	ndn-cpp/forwarding-entry.lo ndn-cpp/name.lo ndn-cpp/node.lo \
 	ndn-cpp/encoding/binary-xml-element-reader.lo \
 	ndn-cpp/encoding/binary-xml-wire-format.lo \
 	ndn-cpp/encoding/wire-format.lo ndn-cpp/security/key-chain.lo \
@@ -168,6 +170,12 @@
 bin_test_encode_decode_data_OBJECTS =  \
 	$(am_bin_test_encode_decode_data_OBJECTS)
 bin_test_encode_decode_data_DEPENDENCIES = libndn-cpp.la libndn-c.la
+am_bin_test_encode_decode_forwarding_entry_OBJECTS =  \
+	tests/test-encode-decode-forwarding-entry.$(OBJEXT)
+bin_test_encode_decode_forwarding_entry_OBJECTS =  \
+	$(am_bin_test_encode_decode_forwarding_entry_OBJECTS)
+bin_test_encode_decode_forwarding_entry_DEPENDENCIES = libndn-cpp.la \
+	libndn-c.la
 am_bin_test_encode_decode_interest_OBJECTS =  \
 	tests/test-encode-decode-interest.$(OBJEXT)
 bin_test_encode_decode_interest_OBJECTS =  \
@@ -236,11 +244,13 @@
 am__v_CXXLD_1 = 
 SOURCES = $(libndn_c_la_SOURCES) $(libndn_cpp_la_SOURCES) \
 	$(bin_test_encode_decode_data_SOURCES) \
+	$(bin_test_encode_decode_forwarding_entry_SOURCES) \
 	$(bin_test_encode_decode_interest_SOURCES) \
 	$(bin_test_get_async_SOURCES) \
 	$(bin_test_publish_async_SOURCES)
 DIST_SOURCES = $(libndn_c_la_SOURCES) $(libndn_cpp_la_SOURCES) \
 	$(bin_test_encode_decode_data_SOURCES) \
+	$(bin_test_encode_decode_forwarding_entry_SOURCES) \
 	$(bin_test_encode_decode_interest_SOURCES) \
 	$(bin_test_get_async_SOURCES) \
 	$(bin_test_publish_async_SOURCES)
@@ -463,16 +473,18 @@
 libndn_c_la_SOURCES = \
   config.h \
   ndn-cpp/c/data.h \
+  ndn-cpp/c/errors.c ndn-cpp/c/errors.h \
+  ndn-cpp/c/forwarding-entry.h \
   ndn-cpp/c/interest.c ndn-cpp/c/interest.h \
   ndn-cpp/c/key.h \
   ndn-cpp/c/name.c ndn-cpp/c/name.h \
   ndn-cpp/c/publisher-public-key-digest.h \
-  ndn-cpp/c/errors.c ndn-cpp/c/errors.h \
   ndn-cpp/c/encoding/binary-xml.h \
   ndn-cpp/c/encoding/binary-xml-data.c ndn-cpp/c/encoding/binary-xml-data.h \
   ndn-cpp/c/encoding/binary-xml-decoder.c ndn-cpp/c/encoding/binary-xml-decoder.h \
   ndn-cpp/c/encoding/binary-xml-element-reader.c ndn-cpp/c/encoding/binary-xml-element-reader.h \
   ndn-cpp/c/encoding/binary-xml-encoder.c ndn-cpp/c/encoding/binary-xml-encoder.h \
+  ndn-cpp/c/encoding/binary-xml-forwarding-entry.c ndn-cpp/c/encoding/binary-xml-forwarding-entry.h \
   ndn-cpp/c/encoding/binary-xml-interest.c ndn-cpp/c/encoding/binary-xml-interest.h \
   ndn-cpp/c/encoding/binary-xml-key.c ndn-cpp/c/encoding/binary-xml-key.h \
   ndn-cpp/c/encoding/binary-xml-name.c ndn-cpp/c/encoding/binary-xml-name.h \
@@ -493,6 +505,7 @@
   ndn-cpp/interest.cpp ndn-cpp/c/interest.h ndn-cpp/interest.hpp \
   ndn-cpp/key.cpp ndn-cpp/c/key.h ndn-cpp/key.hpp \
   ndn-cpp/face.cpp ndn-cpp/face.hpp \
+  ndn-cpp/forwarding-entry.cpp ndn-cpp/c/forwarding-entry.h ndn-cpp/forwarding-entry.hpp \
   ndn-cpp/name.cpp ndn-cpp/c/name.h ndn-cpp/name.hpp \
   ndn-cpp/node.cpp ndn-cpp/node.hpp \
   ndn-cpp/publisher-public-key-digest.hpp \
@@ -509,6 +522,8 @@
   ndn-cpp/c/transport/socket-transport.h ndn-cpp/c/transport/udp-transport.h ndn-cpp/transport/udp-transport.cpp ndn-cpp/transport/udp-transport.hpp \
   ndn-cpp/util/dynamic-uchar-vector.cpp ndn-cpp/util/dynamic-uchar-vector.hpp
 
+bin_test_encode_decode_forwarding_entry_SOURCES = tests/test-encode-decode-forwarding-entry.cpp
+bin_test_encode_decode_forwarding_entry_LDADD = libndn-cpp.la libndn-c.la
 bin_test_encode_decode_interest_SOURCES = tests/test-encode-decode-interest.cpp
 bin_test_encode_decode_interest_LDADD = libndn-cpp.la libndn-c.la
 bin_test_encode_decode_data_SOURCES = tests/test-encode-decode-data.cpp
@@ -614,12 +629,12 @@
 ndn-cpp/c/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) ndn-cpp/c/$(DEPDIR)
 	@: > ndn-cpp/c/$(DEPDIR)/$(am__dirstamp)
+ndn-cpp/c/errors.lo: ndn-cpp/c/$(am__dirstamp) \
+	ndn-cpp/c/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/c/interest.lo: ndn-cpp/c/$(am__dirstamp) \
 	ndn-cpp/c/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/c/name.lo: ndn-cpp/c/$(am__dirstamp) \
 	ndn-cpp/c/$(DEPDIR)/$(am__dirstamp)
-ndn-cpp/c/errors.lo: ndn-cpp/c/$(am__dirstamp) \
-	ndn-cpp/c/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/c/encoding/$(am__dirstamp):
 	@$(MKDIR_P) ndn-cpp/c/encoding
 	@: > ndn-cpp/c/encoding/$(am__dirstamp)
@@ -638,6 +653,9 @@
 ndn-cpp/c/encoding/binary-xml-encoder.lo:  \
 	ndn-cpp/c/encoding/$(am__dirstamp) \
 	ndn-cpp/c/encoding/$(DEPDIR)/$(am__dirstamp)
+ndn-cpp/c/encoding/binary-xml-forwarding-entry.lo:  \
+	ndn-cpp/c/encoding/$(am__dirstamp) \
+	ndn-cpp/c/encoding/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/c/encoding/binary-xml-interest.lo:  \
 	ndn-cpp/c/encoding/$(am__dirstamp) \
 	ndn-cpp/c/encoding/$(DEPDIR)/$(am__dirstamp)
@@ -695,6 +713,8 @@
 	ndn-cpp/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/face.lo: ndn-cpp/$(am__dirstamp) \
 	ndn-cpp/$(DEPDIR)/$(am__dirstamp)
+ndn-cpp/forwarding-entry.lo: ndn-cpp/$(am__dirstamp) \
+	ndn-cpp/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/name.lo: ndn-cpp/$(am__dirstamp) \
 	ndn-cpp/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/node.lo: ndn-cpp/$(am__dirstamp) \
@@ -808,6 +828,12 @@
 bin/test-encode-decode-data$(EXEEXT): $(bin_test_encode_decode_data_OBJECTS) $(bin_test_encode_decode_data_DEPENDENCIES) $(EXTRA_bin_test_encode_decode_data_DEPENDENCIES) bin/$(am__dirstamp)
 	@rm -f bin/test-encode-decode-data$(EXEEXT)
 	$(AM_V_CXXLD)$(CXXLINK) $(bin_test_encode_decode_data_OBJECTS) $(bin_test_encode_decode_data_LDADD) $(LIBS)
+tests/test-encode-decode-forwarding-entry.$(OBJEXT):  \
+	tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
+
+bin/test-encode-decode-forwarding-entry$(EXEEXT): $(bin_test_encode_decode_forwarding_entry_OBJECTS) $(bin_test_encode_decode_forwarding_entry_DEPENDENCIES) $(EXTRA_bin_test_encode_decode_forwarding_entry_DEPENDENCIES) bin/$(am__dirstamp)
+	@rm -f bin/test-encode-decode-forwarding-entry$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(bin_test_encode_decode_forwarding_entry_OBJECTS) $(bin_test_encode_decode_forwarding_entry_LDADD) $(LIBS)
 tests/test-encode-decode-interest.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 
@@ -855,6 +881,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/$(DEPDIR)/common.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/$(DEPDIR)/data.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/$(DEPDIR)/face.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/$(DEPDIR)/forwarding-entry.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/$(DEPDIR)/interest.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/$(DEPDIR)/key.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/$(DEPDIR)/name.Plo@am__quote@
@@ -866,6 +893,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-decoder.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-element-reader.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-encoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-forwarding-entry.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-interest.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-key.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-name.Plo@am__quote@
@@ -885,6 +913,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/transport/$(DEPDIR)/udp-transport.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/util/$(DEPDIR)/dynamic-uchar-vector.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test-encode-decode-data.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test-encode-decode-forwarding-entry.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test-encode-decode-interest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test-get-async.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test-publish-async.Po@am__quote@
diff --git a/ndn-cpp/c/encoding/binary-xml-forwarding-entry.c b/ndn-cpp/c/encoding/binary-xml-forwarding-entry.c
new file mode 100644
index 0000000..982ef23
--- /dev/null
+++ b/ndn-cpp/c/encoding/binary-xml-forwarding-entry.c
@@ -0,0 +1,67 @@
+/**
+ * @author: Jeff Thompson
+ * Derived from ForwardingEntry.js by Meki Cheraoui.
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "binary-xml.h"
+#include "binary-xml-forwarding-entry.h"
+
+ndn_Error ndn_encodeBinaryXmlForwardingEntry(struct ndn_ForwardingEntry *forwardingEntry, struct ndn_BinaryXmlEncoder *encoder)
+{
+  ndn_Error error;
+  if ((error = ndn_BinaryXmlEncoder_writeElementStartDTag(encoder, ndn_BinaryXml_DTag_ForwardingEntry)))
+    return error;
+    
+  if ((error = ndn_BinaryXmlEncoder_writeOptionalUDataDTagElement
+      (encoder, ndn_BinaryXml_DTag_Action, forwardingEntry->action, forwardingEntry->actionLength)))
+    return error;
+  if ((error = ndn_encodeBinaryXmlName(&forwardingEntry->prefix, encoder)))
+    return error;
+  // This will skip encoding if there is no publisherPublicKeyDigest.
+  if ((error = ndn_encodeBinaryXmlPublisherPublicKeyDigest(&forwardingEntry->publisherPublicKeyDigest, encoder)))
+    return error;
+  if ((error = ndn_BinaryXmlEncoder_writeOptionalUnsignedDecimalIntDTagElement
+      (encoder, ndn_BinaryXml_DTag_FaceID, forwardingEntry->faceId)))
+    return error;
+  if ((error = ndn_BinaryXmlEncoder_writeOptionalUnsignedDecimalIntDTagElement
+      (encoder, ndn_BinaryXml_DTag_ForwardingFlags, forwardingEntry->forwardingFlags)))
+    return error;
+  if ((error = ndn_BinaryXmlEncoder_writeOptionalUnsignedDecimalIntDTagElement
+      (encoder, ndn_BinaryXml_DTag_FreshnessSeconds, forwardingEntry->freshnessSeconds)))
+    return error;
+  
+  if ((error = ndn_BinaryXmlEncoder_writeElementClose(encoder)))
+    return error;
+  
+  return NDN_ERROR_success;  
+}
+
+ndn_Error ndn_decodeBinaryXmlForwardingEntry(struct ndn_ForwardingEntry *forwardingEntry, struct ndn_BinaryXmlDecoder *decoder)
+{
+  ndn_Error error;
+  if ((error = ndn_BinaryXmlDecoder_readElementStartDTag(decoder, ndn_BinaryXml_DTag_ForwardingEntry)))
+    return error;
+    
+  if ((error = ndn_BinaryXmlDecoder_readOptionalUDataDTagElement
+      (decoder, ndn_BinaryXml_DTag_Action, &forwardingEntry->action, &forwardingEntry->actionLength)))
+    return error;
+  if ((error = ndn_decodeBinaryXmlName(&forwardingEntry->prefix, decoder)))
+    return error;
+  if ((error = ndn_decodeOptionalBinaryXmlPublisherPublicKeyDigest(&forwardingEntry->publisherPublicKeyDigest, decoder)))
+    return error;
+  if ((error = ndn_BinaryXmlDecoder_readOptionalUnsignedIntegerDTagElement
+      (decoder, ndn_BinaryXml_DTag_FaceID, &forwardingEntry->faceId)))
+    return error;
+  if ((error = ndn_BinaryXmlDecoder_readOptionalUnsignedIntegerDTagElement
+      (decoder, ndn_BinaryXml_DTag_ForwardingFlags, &forwardingEntry->forwardingFlags)))
+    return error;
+  if ((error = ndn_BinaryXmlDecoder_readOptionalUnsignedIntegerDTagElement
+      (decoder, ndn_BinaryXml_DTag_FreshnessSeconds, &forwardingEntry->freshnessSeconds)))
+    return error;
+
+  if ((error = ndn_BinaryXmlDecoder_readElementClose(decoder)))
+    return error;
+  
+  return NDN_ERROR_success;
+}
diff --git a/ndn-cpp/c/encoding/binary-xml-forwarding-entry.h b/ndn-cpp/c/encoding/binary-xml-forwarding-entry.h
new file mode 100644
index 0000000..ff5ef5b
--- /dev/null
+++ b/ndn-cpp/c/encoding/binary-xml-forwarding-entry.h
@@ -0,0 +1,38 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_BINARY_XML_FORWARDING_ENTRY_H
+#define	NDN_BINARY_XML_FORWARDING_ENTRY_H
+
+#include "../errors.h"
+#include "../forwarding-entry.h"
+#include "binary-xml-encoder.h"
+#include "binary-xml-decoder.h"
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/**
+ * Encode the ndn_ForwardingEntry struct using Binary XML.
+ * @param forwardingEntry pointer to the ndn_ForwardingEntry struct
+ * @param encoder pointer to the ndn_BinaryXmlEncoder struct
+ * @return 0 for success, else an error code
+ */
+ndn_Error ndn_encodeBinaryXmlForwardingEntry(struct ndn_ForwardingEntry *forwardingEntry, struct ndn_BinaryXmlEncoder *encoder);
+
+/**
+ * Expect the next element to be a Binary XML ForwardingEntry and decode into the ndn_ForwardingEntry struct.
+ * @param forwardingEntry pointer to the ndn_ForwardingEntry struct
+ * @param decoder pointer to the ndn_BinaryXmlDecoder struct
+ * @return 0 for success, else an error code, including if the next element is not KeyLocator.
+ */
+ndn_Error ndn_decodeBinaryXmlForwardingEntry(struct ndn_ForwardingEntry *forwardingEntry, struct ndn_BinaryXmlDecoder *decoder);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif
diff --git a/ndn-cpp/c/forwarding-entry.h b/ndn-cpp/c/forwarding-entry.h
new file mode 100644
index 0000000..be82fee
--- /dev/null
+++ b/ndn-cpp/c/forwarding-entry.h
@@ -0,0 +1,52 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_FORWARDING_ENTRY_H
+#define NDN_FORWARDING_ENTRY_H
+
+#include "name.h"
+#include "publisher-public-key-digest.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * An ndn_ForwardingEntry holds fields for a ForwardingEntry which is used to register a prefix with a hub.
+ */
+struct ndn_ForwardingEntry {
+  unsigned char *action;     /**< pointer to pre-allocated buffer.  0 for none. */
+  unsigned int actionLength; /**< length of action.  0 for none. */
+  struct ndn_Name prefix;
+  struct ndn_PublisherPublicKeyDigest publisherPublicKeyDigest;
+  int faceId;               /**< -1 for none. */
+  int forwardingFlags;      /**< -1 for none. */
+  int freshnessSeconds;     /**< -1 for none. */
+};
+
+/**
+ * Initialize an ndn_ForwardingEntry struct with the pre-allocated prefixNameComponents,
+ * and defaults for all the values.
+ * @param self pointer to the ndn_Interest struct
+ * @param prefixNameComponents the pre-allocated array of ndn_NameComponent
+ * @param maxPrefixNameComponents the number of elements in the allocated prefixNameComponents array
+ */
+static inline void ndn_ForwardingEntry_init
+  (struct ndn_ForwardingEntry *self, struct ndn_NameComponent *prefixNameComponents, unsigned int maxPrefixNameComponents) 
+{
+  self->action = 0;
+  self->actionLength = 0;
+  ndn_Name_init(&self->prefix, prefixNameComponents, maxPrefixNameComponents);
+  ndn_PublisherPublicKeyDigest_init(&self->publisherPublicKeyDigest);
+  self->faceId = -1;
+  self->forwardingFlags = -1;
+  self->freshnessSeconds = -1;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/ndn-cpp/encoding/binary-xml-wire-format.cpp b/ndn-cpp/encoding/binary-xml-wire-format.cpp
index 8cb5643..950d653 100644
--- a/ndn-cpp/encoding/binary-xml-wire-format.cpp
+++ b/ndn-cpp/encoding/binary-xml-wire-format.cpp
@@ -6,8 +6,10 @@
 #include <stdexcept>
 #include "../c/encoding/binary-xml-interest.h"
 #include "../c/encoding/binary-xml-data.h"
+#include "../c/encoding/binary-xml-forwarding-entry.h"
 #include "../interest.hpp"
 #include "../data.hpp"
+#include "../forwarding-entry.hpp"
 #include "binary-xml-encoder.hpp"
 #include "binary-xml-decoder.hpp"
 #include "binary-xml-wire-format.hpp"
@@ -94,4 +96,35 @@
   data.set(dataStruct);
 }
 
+ptr_lib::shared_ptr<vector<unsigned char> > BinaryXmlWireFormat::encodeForwardingEntry(const ForwardingEntry &forwardingEntry) 
+{
+  struct ndn_NameComponent prefixNameComponents[100];
+  struct ndn_ForwardingEntry forwardingEntryStruct;
+  ndn_ForwardingEntry_init
+    (&forwardingEntryStruct, prefixNameComponents, sizeof(prefixNameComponents) / sizeof(prefixNameComponents[0]));
+  forwardingEntry.get(forwardingEntryStruct);
+
+  BinaryXmlEncoder encoder;
+  ndn_Error error;
+  if ((error = ndn_encodeBinaryXmlForwardingEntry(&forwardingEntryStruct, &encoder)))
+    throw std::runtime_error(ndn_getErrorString(error));
+     
+  return encoder.getOutput();
+}
+
+void BinaryXmlWireFormat::decodeForwardingEntry(ForwardingEntry &forwardingEntry, const unsigned char *input, unsigned int inputLength)
+{
+  struct ndn_NameComponent prefixNameComponents[100];
+  struct ndn_ForwardingEntry forwardingEntryStruct;
+  ndn_ForwardingEntry_init
+    (&forwardingEntryStruct, prefixNameComponents, sizeof(prefixNameComponents) / sizeof(prefixNameComponents[0]));
+    
+  BinaryXmlDecoder decoder(input, inputLength);  
+  ndn_Error error;
+  if ((error = ndn_decodeBinaryXmlForwardingEntry(&forwardingEntryStruct, &decoder)))
+    throw std::runtime_error(ndn_getErrorString(error));
+
+  forwardingEntry.set(forwardingEntryStruct);
+}
+
 }
diff --git a/ndn-cpp/encoding/binary-xml-wire-format.hpp b/ndn-cpp/encoding/binary-xml-wire-format.hpp
index 7266957..68be550 100644
--- a/ndn-cpp/encoding/binary-xml-wire-format.hpp
+++ b/ndn-cpp/encoding/binary-xml-wire-format.hpp
@@ -16,7 +16,19 @@
  */
 class BinaryXmlWireFormat : public WireFormat {
 public:
+  /**
+   * Encode interest in binary XML and return the encoding.
+   * @param interest The Interest object to encode.
+   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   */  
   virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeInterest(const Interest &interest);
+    
+  /**
+   * Decode input as an interest in binary XML and set the fields of the interest object.
+   * @param interest The Interest object whose fields are updated.
+   * @param input A pointer to the input buffer to decode.
+   * @param inputLength The number of bytes in input.
+   */
   virtual void decodeInterest(Interest &interest, const unsigned char *input, unsigned int inputLength);
 
   /**
@@ -45,6 +57,21 @@
    */  
   virtual void decodeData
     (Data &data, const unsigned char *input, unsigned int inputLength, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset);
+
+  /**
+   * Encode forwardingEntry in binary XML and return the encoding. 
+   * @param forwardingEntry The ForwardingEntry object to encode.
+   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   */
+  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeForwardingEntry(const ForwardingEntry &forwardingEntry);
+  
+  /**
+   * Decode input as a forwarding entry in binary XML and set the fields of the forwardingEntry object. 
+   * @param forwardingEntry The ForwardingEntry object whose fields are updated.
+   * @param input A pointer to the input buffer to decode.
+   * @param inputLength The number of bytes in input.
+   */
+  virtual void decodeForwardingEntry(ForwardingEntry &forwardingEntry, const unsigned char *input, unsigned int inputLength);
 };
   
 }
diff --git a/ndn-cpp/encoding/wire-format.cpp b/ndn-cpp/encoding/wire-format.cpp
index 703795a..036262d 100644
--- a/ndn-cpp/encoding/wire-format.cpp
+++ b/ndn-cpp/encoding/wire-format.cpp
@@ -46,4 +46,13 @@
   throw logic_error("unimplemented");
 }
 
+ptr_lib::shared_ptr<vector<unsigned char> > WireFormat::encodeForwardingEntry(const ForwardingEntry &forwardingEntry) 
+{
+  throw logic_error("unimplemented");
+}
+void WireFormat::decodeForwardingEntry(ForwardingEntry &forwardingEntry, const unsigned char *input, unsigned int inputLength) 
+{
+  throw logic_error("unimplemented");
+}
+
 }
diff --git a/ndn-cpp/encoding/wire-format.hpp b/ndn-cpp/encoding/wire-format.hpp
index 939c00c..bfd1a1d 100644
--- a/ndn-cpp/encoding/wire-format.hpp
+++ b/ndn-cpp/encoding/wire-format.hpp
@@ -13,10 +13,25 @@
   
 class Interest;
 class Data;
+class ForwardingEntry;
   
 class WireFormat {
 public:
+  /**
+   * Encode interest and return the encoding.  Your derived class should override.
+   * @param interest The Interest object to encode.
+   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   * @throw logic_error for unimplemented if the derived class does not override.
+   */
   virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeInterest(const Interest &interest);
+  
+  /**
+   * Decode input as an interest and set the fields of the interest object.  Your derived class should override.
+   * @param interest The Interest object whose fields are updated.
+   * @param input A pointer to the input buffer to decode.
+   * @param inputLength The number of bytes in input.
+   * @throw logic_error for unimplemented if the derived class does not override.
+   */
   virtual void decodeInterest(Interest &interest, const unsigned char *input, unsigned int inputLength);
 
   /**
@@ -67,6 +82,23 @@
   }
   
   /**
+   * Encode forwardingEntry and return the encoding.  Your derived class should override.
+   * @param forwardingEntry The ForwardingEntry object to encode.
+   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   * @throw logic_error for unimplemented if the derived class does not override.
+   */
+  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeForwardingEntry(const ForwardingEntry &forwardingEntry);
+  
+  /**
+   * Decode input as a forwarding entry and set the fields of the forwardingEntry object.  Your derived class should override.
+   * @param forwardingEntry The ForwardingEntry object whose fields are updated.
+   * @param input A pointer to the input buffer to decode.
+   * @param inputLength The number of bytes in input.
+   * @throw logic_error for unimplemented if the derived class does not override.
+   */
+  virtual void decodeForwardingEntry(ForwardingEntry &forwardingEntry, const unsigned char *input, unsigned int inputLength);
+
+  /**
    * Set the static default WireFormat used by default encoding and decoding methods.
    * @param wireFormat A Pointer to an object of a subclass of WireFormat.  This does not make a copy and
    * the caller must ensure that the object remains allocated.
diff --git a/ndn-cpp/forwarding-entry.cpp b/ndn-cpp/forwarding-entry.cpp
new file mode 100644
index 0000000..0e8c6d7
--- /dev/null
+++ b/ndn-cpp/forwarding-entry.cpp
@@ -0,0 +1,42 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+#include <stdexcept>
+#include "common.hpp"
+#include "forwarding-entry.hpp"
+
+using namespace std;
+
+namespace ndn {
+  
+void ForwardingEntry::set(const struct ndn_ForwardingEntry &forwardingEntryStruct) 
+{
+  if (forwardingEntryStruct.action && forwardingEntryStruct.actionLength > 0)
+    action_ = string(forwardingEntryStruct.action, forwardingEntryStruct.action + forwardingEntryStruct.actionLength);
+  else
+    action_ = "";
+            
+  prefix_.set(forwardingEntryStruct.prefix);
+  publisherPublicKeyDigest_.set(forwardingEntryStruct.publisherPublicKeyDigest);  
+  faceId_ = forwardingEntryStruct.faceId;
+  forwardingFlags_ = forwardingEntryStruct.forwardingFlags;
+  freshnessSeconds_ = forwardingEntryStruct.freshnessSeconds;
+}
+
+void ForwardingEntry::get(struct ndn_ForwardingEntry &forwardingEntryStruct) const 
+{
+  prefix_.get(forwardingEntryStruct.prefix);
+  publisherPublicKeyDigest_.get(forwardingEntryStruct.publisherPublicKeyDigest);
+  forwardingEntryStruct.faceId = faceId_;
+  forwardingEntryStruct.forwardingFlags = forwardingFlags_;
+  forwardingEntryStruct.freshnessSeconds = freshnessSeconds_;
+
+  forwardingEntryStruct.actionLength = action_.size();
+  if (action_.size() > 0)
+    forwardingEntryStruct.action = (unsigned char *)&action_[0];
+  else
+    forwardingEntryStruct.action = 0;
+}
+
+}
diff --git a/ndn-cpp/forwarding-entry.hpp b/ndn-cpp/forwarding-entry.hpp
new file mode 100644
index 0000000..8c652a7
--- /dev/null
+++ b/ndn-cpp/forwarding-entry.hpp
@@ -0,0 +1,104 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_FORWARDING_ENTRY_HPP
+#define	NDN_FORWARDING_ENTRY_HPP
+
+#include <string>
+#include "name.hpp"
+#include "publisher-public-key-digest.hpp"
+#include "c/forwarding-entry.h"
+
+namespace ndn {
+
+/**
+ * An ForwardingEntry holds an action and  Name prefix and other fields for an forwarding entry.
+ */
+class ForwardingEntry {
+public:    
+  ForwardingEntry
+    (const std::string &action, const Name &prefix, const PublisherPublicKeyDigest publisherPublicKeyDigest,
+     int faceId, int forwardingFlags, int freshnessSeconds) 
+  : action_(action), prefix_(prefix), publisherPublicKeyDigest_(publisherPublicKeyDigest), 
+    faceId_(faceId), forwardingFlags_(forwardingFlags), freshnessSeconds_(freshnessSeconds)
+  {
+  }
+
+  ForwardingEntry()
+  : faceId_(-1), forwardingFlags_(-1), freshnessSeconds_(-1)
+  {
+  }
+  
+  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat &wireFormat) const 
+  {
+    return wireFormat.encodeForwardingEntry(*this);
+  }
+  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode() const 
+  {
+    return wireEncode(*WireFormat::getDefaultWireFormat());
+  }
+  void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat &wireFormat) 
+  {
+    wireFormat.decodeForwardingEntry(*this, input, inputLength);
+  }
+  void wireDecode(const unsigned char *input, unsigned int inputLength) 
+  {
+    wireDecode(input, inputLength, *WireFormat::getDefaultWireFormat());
+  }
+  void wireDecode(const std::vector<unsigned char> &input, WireFormat &wireFormat) 
+  {
+    wireDecode(&input[0], input.size(), wireFormat);
+  }
+  void wireDecode(const std::vector<unsigned char> &input) 
+  {
+    wireDecode(&input[0], input.size());
+  }
+  
+  /**
+   * Set the forwardingEntryStruct to point to the components in this forwarding entry, without copying any memory.
+   * WARNING: The resulting pointers in forwardingEntryStruct are invalid after a further use of this object which could reallocate memory.
+   * @param forwardingEntryStruct a C ndn_ForwardingEntry struct where the prefix name components array is already allocated.
+   */
+  void get(struct ndn_ForwardingEntry &forwardingEntryStruct) const;
+
+  const std::string &getAction() const { return action_; }
+  
+  Name &getPrefix() { return prefix_; }
+  const Name &getPrefix() const { return prefix_; }
+  
+  PublisherPublicKeyDigest &getPublisherPublicKeyDigest() { return publisherPublicKeyDigest_; }
+  const PublisherPublicKeyDigest &getPublisherPublicKeyDigest() const { return publisherPublicKeyDigest_; }
+  
+  int getFaceId() const { return faceId_; }
+
+  int getForwardingFlags() const { return forwardingFlags_; }
+
+  int getFreshnessSeconds() const { return freshnessSeconds_; }
+  
+  /**
+   * Clear this forwarding entry, and set the values by copying from forwardingEntryStruct.
+   * @param forwardingEntryStruct a C ndn_ForwardingEntry struct.
+   */
+  void set(const struct ndn_ForwardingEntry &forwardingEntryStruct);
+
+  void setAction(const std::string &value) { action_ = value; }
+  
+  void setFaceId(int value) { faceId_ = value; }
+      
+  void setForwardingFlags(int value) { forwardingFlags_ = value; }
+      
+  void setFreshnessSeconds(int value) { freshnessSeconds_ = value; }
+      
+  std::string action_;   /**< empty for none. */
+  Name prefix_;
+  PublisherPublicKeyDigest publisherPublicKeyDigest_;
+  int faceId_;           /**< -1 for none. */
+  int forwardingFlags_;  /**< -1 for none. */
+  int freshnessSeconds_; /**< -1 for none. */
+};
+
+}
+
+#endif
diff --git a/tests/test-encode-decode-forwarding-entry.cpp b/tests/test-encode-decode-forwarding-entry.cpp
new file mode 100644
index 0000000..89a7a80
--- /dev/null
+++ b/tests/test-encode-decode-forwarding-entry.cpp
@@ -0,0 +1,136 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#include <cstdlib>
+#include <sstream>
+#include <iostream>
+#include "../ndn-cpp/interest.hpp"
+#include "../ndn-cpp/data.hpp"
+#include "../ndn-cpp/forwarding-entry.hpp"
+#include "../ndn-cpp/security/key-chain.hpp"
+
+using namespace std;
+using namespace ndn;
+
+unsigned char Interest1[] = {
+0x01, 0xd2, 0xf2, 0xfa, 0xa5, 0x6e, 0x64, 0x6e, 0x78, 0x00, 0xfa, 0x02, 0x85, 0xe0, 0xa0, 0x1e, 0x09, 0x39, 0x68,
+0xf9, 0x74, 0x0c, 0xe7, 0xf4, 0x36, 0x1b, 0xab, 0xf5, 0xbb, 0x05, 0xa4, 0xe5, 0x5a, 0xac, 0xa5, 0xe5, 0x8f, 0x73,
+0xed, 0xde, 0xb8, 0xe0, 0x13, 0xaa, 0x8f, 0x00, 0xfa, 0xcd, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x72, 0x65, 0x67,
+0x00, 0xfa, 0x29, 0xad, 0x04, 0x82, 0x02, 0xaa, 0x03, 0xb2, 0x08, 0x85, 0x4d, 0xdb, 0xf6, 0x97, 0x79, 0xcd, 0xf4,
+0xef, 0x74, 0xbe, 0x99, 0x47, 0x44, 0x78, 0xc8, 0xbc, 0x3c, 0xa0, 0x87, 0x3e, 0x0f, 0xfa, 0x1f, 0xa6, 0x01, 0x20,
+0xaa, 0x27, 0x6d, 0xb1, 0x22, 0xb8, 0x34, 0x04, 0xe5, 0x95, 0xa8, 0xa3, 0xca, 0xea, 0xf0, 0x96, 0x30, 0x27, 0x66,
+0x58, 0xba, 0x4e, 0x7b, 0xea, 0xad, 0xb4, 0xb9, 0x1a, 0x8c, 0xc5, 0x8e, 0x19, 0xac, 0x4a, 0x42, 0x28, 0x95, 0x07,
+0xed, 0x8d, 0x60, 0x9a, 0xa9, 0xbe, 0xf6, 0x1a, 0x5a, 0x50, 0x7f, 0x34, 0x9c, 0x83, 0xd2, 0x94, 0x4b, 0x8c, 0x16,
+0xfe, 0xcf, 0xd9, 0x0d, 0x4a, 0x40, 0xdd, 0xb8, 0x68, 0x75, 0x92, 0xc0, 0xa5, 0x75, 0x17, 0x56, 0x42, 0x35, 0xb2,
+0xe3, 0x59, 0xdb, 0x54, 0xf5, 0x1a, 0x37, 0xe1, 0xac, 0x39, 0xe5, 0x18, 0xa2, 0x19, 0x6e, 0x3f, 0xfd, 0xa7, 0xeb,
+0x2f, 0xb3, 0x01, 0xf3, 0xc4, 0x04, 0xdd, 0x00, 0x00, 0xf2, 0x00, 0x01, 0xa2, 0x03, 0xe2, 0x02, 0x85, 0xef, 0x7c,
+0x4f, 0x5d, 0x47, 0x43, 0xa8, 0xb8, 0x58, 0x6e, 0xa2, 0xe7, 0x41, 0xb7, 0xfc, 0x39, 0xd1, 0xdc, 0x0d, 0xbe, 0x1b,
+0x19, 0x30, 0xe7, 0x87, 0xcf, 0xd1, 0xd8, 0x33, 0xea, 0x7a, 0x61, 0x00, 0x02, 0xba, 0xb5, 0x04, 0xfc, 0xe9, 0xe2,
+0x53, 0xd7, 0x00, 0x01, 0xe2, 0x01, 0x82, 0x19, 0xfd, 0x30, 0x82, 0x01, 0x9b, 0x30, 0x82, 0x01, 0x04, 0x02, 0x09,
+0x00, 0xb7, 0xd8, 0x5c, 0x90, 0x6b, 0xad, 0x52, 0xee, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
+0x01, 0x01, 0x05, 0x05, 0x00, 0x30, 0x12, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x07, 0x61,
+0x78, 0x65, 0x6c, 0x63, 0x64, 0x76, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x30, 0x34, 0x32, 0x38, 0x32, 0x33, 0x34,
+0x34, 0x33, 0x37, 0x5a, 0x17, 0x0d, 0x31, 0x32, 0x30, 0x35, 0x32, 0x38, 0x32, 0x33, 0x34, 0x34, 0x33, 0x37, 0x5a,
+0x30, 0x12, 0x31, 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x07, 0x61, 0x78, 0x65, 0x6c, 0x63, 0x64,
+0x76, 0x30, 0x81, 0x9f, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00,
+0x03, 0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xe1, 0x7d, 0x30, 0xa7, 0xd8, 0x28, 0xab, 0x1b,
+0x84, 0x0b, 0x17, 0x54, 0x2d, 0xca, 0xf6, 0x20, 0x7a, 0xfd, 0x22, 0x1e, 0x08, 0x6b, 0x2a, 0x60, 0xd1, 0x6c, 0xb7,
+0xf5, 0x44, 0x48, 0xba, 0x9f, 0x3f, 0x08, 0xbc, 0xd0, 0x99, 0xdb, 0x21, 0xdd, 0x16, 0x2a, 0x77, 0x9e, 0x61, 0xaa,
+0x89, 0xee, 0xe5, 0x54, 0xd3, 0xa4, 0x7d, 0xe2, 0x30, 0xbc, 0x7a, 0xc5, 0x90, 0xd5, 0x24, 0x06, 0x7c, 0x38, 0x98,
+0xbb, 0xa6, 0xf5, 0xdc, 0x43, 0x60, 0xb8, 0x45, 0xed, 0xa4, 0x8c, 0xbd, 0x9c, 0xf1, 0x26, 0xa7, 0x23, 0x44, 0x5f,
+0x0e, 0x19, 0x52, 0xd7, 0x32, 0x5a, 0x75, 0xfa, 0xf5, 0x56, 0x14, 0x4f, 0x9a, 0x98, 0xaf, 0x71, 0x86, 0xb0, 0x27,
+0x86, 0x85, 0xb8, 0xe2, 0xc0, 0x8b, 0xea, 0x87, 0x17, 0x1b, 0x4d, 0xee, 0x58, 0x5c, 0x18, 0x28, 0x29, 0x5b, 0x53,
+0x95, 0xeb, 0x4a, 0x17, 0x77, 0x9f, 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
+0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0xcb, 0x3a, 0xb0, 0x35, 0x7d, 0x7c, 0xd2, 0xae,
+0x97, 0xed, 0x50, 0x1e, 0x51, 0xa3, 0xa0, 0xe2, 0x81, 0x7d, 0x41, 0x8e, 0x47, 0xfb, 0x17, 0x90, 0x64, 0x77, 0xaf,
+0x61, 0x49, 0x5a, 0x7e, 0x8d, 0x87, 0x89, 0x14, 0x10, 0x65, 0xb0, 0x82, 0xd0, 0x01, 0xf4, 0xb1, 0x51, 0x93, 0xd0,
+0xb4, 0x3f, 0xb6, 0x61, 0xcd, 0xe2, 0x0a, 0x64, 0x98, 0x37, 0x2c, 0x6a, 0xbb, 0xd3, 0xdc, 0xb9, 0xf0, 0xd1, 0x26,
+0x59, 0xef, 0x07, 0xb3, 0xc6, 0xdb, 0xdf, 0x8b, 0xdf, 0x2f, 0x65, 0x47, 0x7e, 0xed, 0x7a, 0xdc, 0xd4, 0x57, 0xd7,
+0x93, 0xb1, 0xc2, 0x7b, 0xad, 0xda, 0x7c, 0x5a, 0xde, 0x80, 0xce, 0x95, 0xb7, 0xd8, 0x82, 0x7f, 0xe7, 0x8c, 0x8a,
+0x35, 0xf3, 0xfb, 0x4b, 0xa6, 0x48, 0xa0, 0x81, 0xbe, 0x2c, 0xfe, 0x84, 0x23, 0x1a, 0xba, 0xb3, 0xc2, 0xb5, 0x31,
+0x74, 0x6d, 0xf2, 0xe0, 0x49, 0x2b, 0x00, 0x00, 0x00, 0x01, 0x9a, 0x02, 0xd5, 0x05, 0x8a, 0x04, 0xca, 0xbe, 0x73,
+0x65, 0x6c, 0x66, 0x72, 0x65, 0x67, 0x00, 0xf2, 0xfa, 0xa5, 0x6d, 0x65, 0x6b, 0x69, 0x00, 0x00, 0x04, 0xfa, 0x8e,
+0x33, 0x00, 0x03, 0xd2, 0xd6, 0x32, 0x31, 0x34, 0x37, 0x34, 0x38, 0x33, 0x36, 0x34, 0x37, 0x00, 0x00, 0x00, 0x00,
+0x00, 0x00, 0x02, 0xd2, 0x8e, 0x31, 0x00, 0x00,
+1
+};
+
+static inline string toString(const vector<unsigned char> &v)
+{
+  return string(&v[0], &v[0] + v.size());
+}
+
+static void dumpForwardingEntry(const ForwardingEntry &forwardingEntry) 
+{
+  cout << "action: " << forwardingEntry.getAction() << endl;
+  cout << "prefix: " << forwardingEntry.getPrefix().to_uri() << endl;
+  cout << "publisherPublicKeyDigest: " 
+       << (forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest().size() > 0 ? toHex(forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest()) : "<none>") << endl;
+  cout << "faceId: ";
+  if (forwardingEntry.getFaceId() >= 0)
+    cout << forwardingEntry.getFaceId() << endl;
+  else
+    cout << "<none>" << endl;
+  cout << "forwardingFlags: ";
+  if (forwardingEntry.getForwardingFlags() >= 0)
+    cout << forwardingEntry.getForwardingFlags() << endl;
+  else
+    cout << "<none>" << endl;
+  cout << "freshnessSeconds: ";
+  if (forwardingEntry.getFreshnessSeconds() >= 0)
+    cout << forwardingEntry.getFreshnessSeconds() << endl;
+  else
+    cout << "<none>" << endl;
+}
+
+/**
+ * Show the interest name and scope, and expect the name to have 4 components where the last component is a data packet 
+ * whose content is a forwarding entry.
+ */
+static void dumpInterestWithForwardingEntry(const Interest &interest)
+{
+  if (interest.getName().getComponentCount() != 4) {
+    cout << "Error: expected the interest name to have 4 components.  Got: " << interest.getName().to_uri() << endl;
+    return;
+  }
+
+  cout << "scope: ";
+  if (interest.getScope() >= 0)
+    cout << interest.getScope() << endl;
+  else
+    cout << "<none>" << endl;
+  cout << "name[0]: " << toString(interest.getName().getComponent(0).getValue()) << endl;
+  cout << "name[1]: " << toHex(interest.getName().getComponent(1).getValue()) << endl;
+  cout << "name[2]: " << toString(interest.getName().getComponent(2).getValue()) << endl;
+  cout << "name[3] decoded as Data, showing content as ForwardingEntry: " << endl;
+  
+  Data data;
+  data.wireDecode(interest.getName().getComponent(3).getValue());
+  
+  ForwardingEntry forwardingEntry;
+  forwardingEntry.wireDecode(data.getContent());
+  dumpForwardingEntry(forwardingEntry);
+}
+
+int main(int argc, char** argv)
+{
+  try {
+    Interest interest;
+    interest.wireDecode(Interest1, sizeof(Interest1));
+    cout << "Interest:" << endl;
+    dumpInterestWithForwardingEntry(interest);
+    
+    ptr_lib::shared_ptr<vector<unsigned char> > encoding = interest.wireEncode();
+    cout << endl << "Re-encoded interest " << toHex(*encoding) << endl;
+
+    Interest reDecodedInterest;
+    reDecodedInterest.wireDecode(*encoding);
+    cout << "Re-decoded Interest:" << endl;
+    dumpInterestWithForwardingEntry(reDecodedInterest);
+  } catch (exception &e) {
+    cout << "exception: " << e.what() << endl;
+  }
+  return 0;
+}