diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 4fc9c38..ae4369e 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -35,10 +35,9 @@
 
 NFD_LOG_INIT("Forwarder");
 
-using fw::Strategy;
-
 Forwarder::Forwarder()
-  : m_fib(m_nameTree)
+  : m_unsolicitedDataPolicy(new fw::AdmitLocalUnsolicitedDataPolicy())
+  , m_fib(m_nameTree)
   , m_pit(m_nameTree)
   , m_measurements(m_nameTree)
   , m_strategyChoice(m_nameTree, fw::makeDefaultStrategy(*this))
@@ -389,15 +388,15 @@
 Forwarder::onDataUnsolicited(Face& inFace, const Data& data)
 {
   // accept to cache?
-  bool acceptToCache = inFace.getScope() == ndn::nfd::FACE_SCOPE_LOCAL;
-  if (acceptToCache) {
+  fw::UnsolicitedDataDecision decision = m_unsolicitedDataPolicy->decide(inFace, data);
+  if (decision == fw::UnsolicitedDataDecision::CACHE) {
     // CS insert
     m_cs.insert(data, true);
   }
 
   NFD_LOG_DEBUG("onDataUnsolicited face=" << inFace.getId() <<
                 " data=" << data.getName() <<
-                (acceptToCache ? " cached" : " not cached"));
+                " decision=" << decision);
 }
 
 void
diff --git a/daemon/fw/forwarder.hpp b/daemon/fw/forwarder.hpp
index 855c24e..00645ba 100644
--- a/daemon/fw/forwarder.hpp
+++ b/daemon/fw/forwarder.hpp
@@ -30,6 +30,7 @@
 #include "core/scheduler.hpp"
 #include "forwarder-counters.hpp"
 #include "face-table.hpp"
+#include "unsolicited-data-policy.hpp"
 #include "table/fib.hpp"
 #include "table/pit.hpp"
 #include "table/cs.hpp"
@@ -62,7 +63,7 @@
     return m_counters;
   }
 
-public: // faces
+public: // faces and policies
   FaceTable&
   getFaceTable()
   {
@@ -89,6 +90,19 @@
     m_faceTable.add(face);
   }
 
+  fw::UnsolicitedDataPolicy&
+  getUnsolicitedDataPolicy() const
+  {
+    return *m_unsolicitedDataPolicy;
+  }
+
+  void
+  setUnsolicitedDataPolicy(unique_ptr<fw::UnsolicitedDataPolicy> policy)
+  {
+    BOOST_ASSERT(policy != nullptr);
+    m_unsolicitedDataPolicy = std::move(policy);
+  }
+
 public: // forwarding entrypoints and tables
   /** \brief start incoming Interest processing
    *  \param face face on which Interest is received
@@ -273,8 +287,8 @@
   ForwarderCounters m_counters;
 
   FaceTable m_faceTable;
+  unique_ptr<fw::UnsolicitedDataPolicy> m_unsolicitedDataPolicy;
 
-  // tables
   NameTree           m_nameTree;
   Fib                m_fib;
   Pit                m_pit;
diff --git a/daemon/fw/unsolicited-data-policy.cpp b/daemon/fw/unsolicited-data-policy.cpp
new file mode 100644
index 0000000..894cc86
--- /dev/null
+++ b/daemon/fw/unsolicited-data-policy.cpp
@@ -0,0 +1,53 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "unsolicited-data-policy.hpp"
+
+namespace nfd {
+namespace fw {
+
+std::ostream&
+operator<<(std::ostream& os, UnsolicitedDataDecision d)
+{
+  switch (d) {
+    case UnsolicitedDataDecision::DROP:
+      return os << "drop";
+    case UnsolicitedDataDecision::CACHE:
+      return os << "cache";
+  }
+  return os << static_cast<int>(d);
+}
+
+UnsolicitedDataDecision
+AdmitLocalUnsolicitedDataPolicy::decide(const Face& inFace, const Data& data) const
+{
+  if (inFace.getScope() == ndn::nfd::FACE_SCOPE_LOCAL) {
+    return UnsolicitedDataDecision::CACHE;
+  }
+  return UnsolicitedDataDecision::DROP;
+}
+
+} // namespace fw
+} // namespace nfd
diff --git a/daemon/fw/unsolicited-data-policy.hpp b/daemon/fw/unsolicited-data-policy.hpp
new file mode 100644
index 0000000..54112ec
--- /dev/null
+++ b/daemon/fw/unsolicited-data-policy.hpp
@@ -0,0 +1,71 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_DAEMON_FW_UNSOLICITED_DATA_POLICY_HPP
+#define NFD_DAEMON_FW_UNSOLICITED_DATA_POLICY_HPP
+
+#include "face/face.hpp"
+
+namespace nfd {
+namespace fw {
+
+/** \brief a decision made by UnsolicitedDataPolicy
+ */
+enum class UnsolicitedDataDecision {
+  DROP, ///< the Data should be dropped
+  CACHE ///< the Data should be cached in the ContentStore
+};
+
+std::ostream&
+operator<<(std::ostream& os, UnsolicitedDataDecision d);
+
+/** \brief determines how to process an unsolicited Data
+ *
+ *  An incoming Data is unsolicited if it does not match any PIT entry.
+ *  This class assists forwarding pipelines to decide whether to drop an unsolicited Data
+ *  or admit it into the ContentStore.
+ */
+class UnsolicitedDataPolicy : noncopyable
+{
+public:
+  virtual ~UnsolicitedDataPolicy() = default;
+
+  virtual UnsolicitedDataDecision
+  decide(const Face& inFace, const Data& data) const = 0;
+};
+
+/** \brief admits unsolicited Data from local faces
+ */
+class AdmitLocalUnsolicitedDataPolicy : public UnsolicitedDataPolicy
+{
+public:
+  virtual UnsolicitedDataDecision
+  decide(const Face& inFace, const Data& data) const final;
+};
+
+} // namespace fw
+} // namespace nfd
+
+#endif // NFD_DAEMON_FW_UNSOLICITED_DATA_POLICY_HPP
