diff --git a/ndn-cpp/node.hpp b/ndn-cpp/node.hpp
index 80d32a4..256e3aa 100644
--- a/ndn-cpp/node.hpp
+++ b/ndn-cpp/node.hpp
@@ -31,8 +31,14 @@
 typedef func_lib::function<void
   (const ptr_lib::shared_ptr<const Name>&, const ptr_lib::shared_ptr<const Interest>&, Transport&)> OnInterest;
 
+/**
+ * An OnRegisterFailed function object is used to report when registerPrefix fails.
+ */
+typedef func_lib::function<void(const ptr_lib::shared_ptr<const Name>&)> OnRegisterFailed;
+
 class Face;
-  
+class KeyChain;
+    
 class Node : public ElementListener {
 public:
   /**
@@ -58,10 +64,19 @@
    * @param prefix A reference to a Name for the prefix to register.  This copies the Name.
    * @param onInterest A function object to call when a matching interest is received.  This copies the function object, so you may need to
    * use func_lib::ref() as appropriate.
+   * @param onRegisterFailed A function object to call if failed to retrieve the connected hub’s ID or failed to register the prefix.
+   * This calls onRegisterFailed(prefix) where prefix is the prefix given to registerPrefix.
+   * @param keyChain The KeyChain object whose signData is called to sign the Data packet with the ForwardingEntry to register the prefix.
+   * @param signerName The signing identity or certificate name, depending on byKeyName. This is used to sign the Data packet 
+   * with the ForwardingEntry to register the prefix.This copies the function object, so you may need to use func_lib::ref() as appropriate.
+   * @param byKeyName If true, the signerName is the key name, otherwise it is the certificate name. If omitted, the default is true.
    * @param flags The flags for finer control of which interests are forward to the application.
+   * @param wireFormat A WireFormat object used to encode the input. If omitted, use WireFormat getDefaultWireFormat().
    */
   void 
-  registerPrefix(const Name& prefix, const OnInterest& onInterest, int flags);
+  registerPrefix
+    (const Name& prefix, const OnInterest& onInterest, const OnRegisterFailed& onRegisterFailed, KeyChain &keyChain, 
+     const Name& signerName, bool byKeyName, int flags, WireFormat& wireFormat);
 
   /**
    * Process any data to receive.  For each element received, call onReceivedElement.
@@ -188,15 +203,22 @@
     
     class Info {
     public:
-      Info(Node *node, const Name& prefix, const OnInterest& onInterest, int flags)
-      : node_(*node), prefix_(prefix), onInterest_(onInterest), flags_(flags)
+      Info(Node *node, const Name& prefix, const OnInterest& onInterest, const OnRegisterFailed& onRegisterFailed, 
+           KeyChain &keyChain, const Name& signerName, bool byKeyName, int flags, WireFormat& wireFormat)
+      : node_(*node), prefix_(new Name(prefix)), onInterest_(onInterest), onRegisterFailed_(onRegisterFailed), 
+        keyChain_(keyChain), signerName_(new Name(signerName)), byKeyName_(byKeyName), flags_(flags), wireFormat_(wireFormat)
       {      
       }
       
       Node& node_;
-      Name prefix_;
+      ptr_lib::shared_ptr<const Name> prefix_;
       const OnInterest onInterest_;
+      const OnRegisterFailed onRegisterFailed_;
+      KeyChain &keyChain_;
+      ptr_lib::shared_ptr<const Name> signerName_;
+      bool byKeyName_;
       int flags_;
+      WireFormat& wireFormat_;
     };
     
   private:
@@ -210,7 +232,7 @@
    * @return The index in pit_ of the pit entry, or -1 if not found.
    */
   int 
-          getEntryIndexForExpressedInterest(const Name& name);
+  getEntryIndexForExpressedInterest(const Name& name);
   
   /**
    * Find the first entry from the registeredPrefixTable_ where the entry prefix is the longest that matches name.
@@ -219,15 +241,22 @@
    */
   PrefixEntry*
   getEntryForRegisteredPrefix(const Name& name);
-  
+
   /**
    * Do the work of registerPrefix once we know we are connected with an ndndId_.
    * @param prefix
    * @param onInterest
+   * @param onRegisterFailed
+   * @param keyChain
+   * @param signerName
+   * @param byKeyName
    * @param flags
-   */
+   * @param wireFormat
+   */  
   void 
-  registerPrefixHelper(const Name& prefix, const OnInterest& onInterest, int flags);
+  registerPrefixHelper
+    (const ptr_lib::shared_ptr<const Name>& prefix, const OnInterest& onInterest, const OnRegisterFailed& onRegisterFailed, 
+     KeyChain &keyChain, const ptr_lib::shared_ptr<const Name>& signerName, bool byKeyName, int flags, WireFormat& wireFormat);
   
   ptr_lib::shared_ptr<Transport> transport_;
   ptr_lib::shared_ptr<const Transport::ConnectionInfo> connectionInfo_;
