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
