diff --git a/ccnx/ccnx-discovery.cpp b/ccnx/ccnx-discovery.cpp
new file mode 100644
index 0000000..e5d9998
--- /dev/null
+++ b/ccnx/ccnx-discovery.cpp
@@ -0,0 +1,136 @@
+#include "ccnx-discovery.h"
+#include "simple-interval-generator.h"
+#include "task.h"
+#include "periodic-task.h"
+#include <sstream>
+#include <boost/make_shared.hpp>
+#include <boost/bind.hpp>
+
+using namespace Ccnx;
+using namespace std;
+
+const string
+TaggedFunction::CHAR_SET = string("abcdefghijklmnopqtrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
+
+TaggedFunction::TaggedFunction(const Callback &callback, const string &tag)
+                   : m_callback(callback)
+                   , m_tag(tag)
+{
+}
+
+string
+TaggedFunction::GetRandomTag()
+{
+  //boost::random::random_device rng;
+  boost::random::uniform_int_distribution<> dist(0, CHAR_SET.size() - 1);
+  ostringstream oss;
+  for (int i = 0; i < DEFAULT_TAG_SIZE; i++)
+  {
+    //oss << CHAR_SET[dist(rng)];
+  }
+  return oss.str();
+}
+
+void
+TaggedFunction::operator()(const Name &name)
+{
+  if (!m_callback.empty())
+  {
+    m_callback(name);
+  }
+}
+
+const double
+CcnxDiscovery::INTERVAL = 15.0;
+
+CcnxDiscovery *
+CcnxDiscovery::instance = NULL;
+
+boost::mutex
+CcnxDiscovery::mutex;
+
+CcnxDiscovery::CcnxDiscovery()
+              : m_scheduler(new Scheduler())
+              , m_localPrefix("/")
+{
+  m_scheduler->start();
+  IntervalGeneratorPtr generator = boost::make_shared<SimpleIntervalGenerator>(INTERVAL);
+  TaskPtr task = boost::make_shared<PeriodicTask>(boost::bind(&CcnxDiscovery::poll, this), "Local-Prefix-Check", m_scheduler, generator);
+  m_scheduler->addTask(task);
+}
+
+CcnxDiscovery::~CcnxDiscovery()
+{
+  m_scheduler->shutdown();
+}
+
+void
+CcnxDiscovery::addCallback(const TaggedFunction &callback)
+{
+  m_callbacks.push_back(callback);
+}
+
+int
+CcnxDiscovery::deleteCallback(const TaggedFunction &callback)
+{
+  List::iterator it = m_callbacks.begin();
+  while (it != m_callbacks.end())
+  {
+    if ((*it) == callback)
+    {
+      it = m_callbacks.erase(it);
+    }
+    else
+    {
+      ++it;
+    }
+  }
+  return m_callbacks.size();
+}
+
+void
+CcnxDiscovery::poll()
+{
+  Name localPrefix = CcnxWrapper::getLocalPrefix();
+  if (localPrefix != m_localPrefix)
+  {
+    Lock lock(mutex);
+    for (List::iterator it = m_callbacks.begin(); it != m_callbacks.end(); ++it)
+    {
+      (*it)(localPrefix);
+    }
+    m_localPrefix = localPrefix;
+  }
+}
+
+void
+CcnxDiscovery::registerCallback(const TaggedFunction &callback)
+{
+  Lock lock(mutex);
+  if (instance == NULL)
+  {
+    instance = new CcnxDiscovery();
+  }
+
+  instance->addCallback(callback);
+}
+
+void
+CcnxDiscovery::deregisterCallback(const TaggedFunction &callback)
+{
+  Lock lock(mutex);
+  if (instance == NULL)
+  {
+    cerr << "CcnxDiscovery::deregisterCallback called without instance" << endl;
+  }
+  else
+  {
+    int size = instance->deleteCallback(callback);
+    if (size == 0)
+    {
+      delete instance;
+      instance = NULL;
+    }
+  }
+}
+
diff --git a/ccnx/ccnx-discovery.h b/ccnx/ccnx-discovery.h
new file mode 100644
index 0000000..959167a
--- /dev/null
+++ b/ccnx/ccnx-discovery.h
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef CCNX_DISCOVERY_H
+#define CCNX_DISCOVERY_H
+
+#include "ccnx-wrapper.h"
+#include "ccnx-common.h"
+#include "ccnx-name.h"
+#include "scheduler.h"
+#include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
+#include <boost/random/random_device.hpp>
+#include <boost/random/uniform_int_distribution.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/locks.hpp>
+#include <list>
+
+namespace Ccnx
+{
+
+class CcnxDiscovery;
+typedef boost::shared_ptr<CcnxDiscovery> CcnxDiscoveryPtr;
+
+class TaggedFunction
+{
+public:
+  typedef boost::function<void (const Name &)> Callback;
+  TaggedFunction(const Callback &callback, const string &tag = GetRandomTag());
+  ~TaggedFunction(){};
+
+  bool
+  operator==(const TaggedFunction &other) { return m_tag == other.m_tag; }
+
+  void
+  operator()(const Name &name);
+
+private:
+  static const std::string CHAR_SET;
+  static const int DEFAULT_TAG_SIZE = 32;
+
+  static std::string
+  GetRandomTag();
+
+private:
+  Callback m_callback;
+  std::string m_tag;
+};
+
+class CcnxDiscovery
+{
+public:
+  const static double INTERVAL;
+  // Add a callback to be invoked when local prefix changes
+  // you must remember to deregister the callback
+  // otherwise you may have undefined behavior if the callback is
+  // bind to a member function of an object and the object is deleted
+  static void
+  registerCallback(const TaggedFunction &callback);
+
+  // remember to call this before you quit
+  static void
+  deregisterCallback(const TaggedFunction &callback);
+
+private:
+  CcnxDiscovery();
+  ~CcnxDiscovery();
+
+  void
+  poll();
+
+  void
+  addCallback(const TaggedFunction &callback);
+
+  int
+  deleteCallback(const TaggedFunction &callback);
+
+private:
+  typedef boost::mutex Mutex;
+  typedef boost::unique_lock<Mutex> Lock;
+  typedef std::list<TaggedFunction> List;
+
+  static CcnxDiscovery *instance;
+  static Mutex mutex;
+  List m_callbacks;
+  SchedulerPtr m_scheduler;
+  Name m_localPrefix;
+};
+
+} // Ccnx
+#endif // CCNX_DISCOVERY_H
