diff --git a/tools/peek/ndnpeek/main.cpp b/tools/peek/ndnpeek/main.cpp
index f763b96..ead3d70 100644
--- a/tools/peek/ndnpeek/main.cpp
+++ b/tools/peek/ndnpeek/main.cpp
@@ -150,7 +150,7 @@
     program.start();
     face.processEvents();
 
-    return static_cast<int>(program.getResultCode());
+    return static_cast<int>(program.getResult());
   }
   catch (const std::exception& e) {
     std::cerr << "ERROR: " << e.what() << std::endl;
diff --git a/tools/peek/ndnpeek/ndnpeek.cpp b/tools/peek/ndnpeek/ndnpeek.cpp
index 8ce23f6..8969216 100644
--- a/tools/peek/ndnpeek/ndnpeek.cpp
+++ b/tools/peek/ndnpeek/ndnpeek.cpp
@@ -79,7 +79,7 @@
 void
 NdnPeek::onData(const Data& data)
 {
-  m_resultCode = ResultCode::DATA;
+  m_result = Result::DATA;
   m_timeoutEvent.cancel();
 
   if (m_options.isVerbose) {
@@ -101,7 +101,7 @@
 void
 NdnPeek::onNack(const lp::Nack& nack)
 {
-  m_resultCode = ResultCode::NACK;
+  m_result = Result::NACK;
   m_timeoutEvent.cancel();
 
   lp::NackHeader header = nack.getHeader();
@@ -123,7 +123,7 @@
 void
 NdnPeek::onTimeout()
 {
-  m_resultCode = ResultCode::TIMEOUT;
+  m_result = Result::TIMEOUT;
   m_timeoutEvent.cancel();
 
   if (m_options.isVerbose) {
diff --git a/tools/peek/ndnpeek/ndnpeek.hpp b/tools/peek/ndnpeek/ndnpeek.hpp
index a544b37..0a9f503 100644
--- a/tools/peek/ndnpeek/ndnpeek.hpp
+++ b/tools/peek/ndnpeek/ndnpeek.hpp
@@ -55,25 +55,26 @@
   optional<time::milliseconds> timeout;
 };
 
-enum class ResultCode {
-  UNKNOWN = 1,
-  DATA = 0,
-  NACK = 4,
-  TIMEOUT = 3,
-};
-
 class NdnPeek : boost::noncopyable
 {
 public:
   NdnPeek(Face& face, const PeekOptions& options);
 
+  enum class Result {
+    DATA = 0,
+    UNKNOWN = 1,
+    // 2 is reserved for "malformed command line"
+    TIMEOUT = 3,
+    NACK = 4,
+  };
+
   /**
    * @return the result of NdnPeek execution
    */
-  ResultCode
-  getResultCode() const
+  Result
+  getResult() const
   {
-    return m_resultCode;
+    return m_result;
   }
 
   /**
@@ -112,7 +113,7 @@
   time::steady_clock::TimePoint m_sendTime;
   ScopedPendingInterestHandle m_pendingInterest;
   scheduler::ScopedEventId m_timeoutEvent;
-  ResultCode m_resultCode = ResultCode::UNKNOWN;
+  Result m_result = Result::UNKNOWN;
 };
 
 } // namespace peek
diff --git a/tools/peek/ndnpoke/main.cpp b/tools/peek/ndnpoke/main.cpp
index 33d91ea..fb26ab0 100644
--- a/tools/peek/ndnpoke/main.cpp
+++ b/tools/peek/ndnpoke/main.cpp
@@ -159,7 +159,7 @@
     program.start();
     face.processEvents();
 
-    return program.didSendData() ? 0 : 1;
+    return static_cast<int>(program.getResult());
   }
   catch (const std::exception& e) {
     std::cerr << "ERROR: " << e.what() << std::endl;
diff --git a/tools/peek/ndnpoke/ndnpoke.cpp b/tools/peek/ndnpoke/ndnpoke.cpp
index 2934404..e6730cf 100644
--- a/tools/peek/ndnpoke/ndnpoke.cpp
+++ b/tools/peek/ndnpoke/ndnpoke.cpp
@@ -48,7 +48,7 @@
 
   if (m_options.wantForceData) {
     m_face.put(*data);
-    m_didSendData = true;
+    m_result = Result::DATA_SENT;
     return;
   }
 
@@ -56,7 +56,7 @@
     [this, data] (auto&&...) {
       m_timeoutEvent.cancel();
       m_face.put(*data);
-      m_didSendData = true;
+      m_result = Result::DATA_SENT;
       m_registeredPrefix.cancel();
     },
     [this] (auto&&) {
@@ -64,7 +64,8 @@
         m_registeredPrefix.cancel();
       });
     },
-    [] (auto&&, const auto& reason) {
+    [this] (auto&&, const auto& reason) {
+      m_result = Result::PREFIX_REG_FAIL;
       std::cerr << "Prefix registration failure (" << reason << ")\n";
     });
 }
diff --git a/tools/peek/ndnpoke/ndnpoke.hpp b/tools/peek/ndnpoke/ndnpoke.hpp
index af5ad34..e47da81 100644
--- a/tools/peek/ndnpoke/ndnpoke.hpp
+++ b/tools/peek/ndnpoke/ndnpoke.hpp
@@ -56,15 +56,27 @@
 public:
   NdnPoke(Face& face, KeyChain& keyChain, std::istream& input, const PokeOptions& options);
 
+  enum class Result {
+    DATA_SENT = 0,
+    UNKNOWN = 1,
+    // 2 is reserved for "malformed command line"
+    TIMEOUT = 3,
+    // 4 is reserved for "nack"
+    PREFIX_REG_FAIL = 5,
+  };
+
+  /**
+   * @return the result of NdnPoke execution
+   */
+  Result
+  getResult() const
+  {
+    return m_result;
+  }
+
   void
   start();
 
-  bool
-  didSendData() const
-  {
-    return m_didSendData;
-  }
-
 private:
   shared_ptr<Data>
   createData() const;
@@ -77,7 +89,7 @@
   Scheduler m_scheduler;
   ScopedRegisteredPrefixHandle m_registeredPrefix;
   scheduler::ScopedEventId m_timeoutEvent;
-  bool m_didSendData = false;
+  Result m_result = Result::UNKNOWN;
 };
 
 } // namespace peek
