face: Interest loopback

refs #3979

Change-Id: I6f65b30451939397975a7af40c59002e330afc25
diff --git a/src/interest-filter.hpp b/src/interest-filter.hpp
index d6241a1..f2a09c0 100644
--- a/src/interest-filter.hpp
+++ b/src/interest-filter.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -125,9 +125,30 @@
     return *m_regexFilter;
   }
 
+  /** \brief Get whether Interest loopback is allowed
+   */
+  bool
+  allowsLoopback() const
+  {
+    return m_allowsLoopback;
+  }
+
+  /** \brief Set whether Interest loopback is allowed
+   *  \param wantLoopback if true, this InterestFilter may receive Interests that are expressed
+   *                      locally on the same \p ndn::Face ; if false, this InterestFilter can only
+   *                      receive Interests received from the forwarder. The default is true.
+   */
+  InterestFilter&
+  allowLoopback(bool wantLoopback)
+  {
+    m_allowsLoopback = wantLoopback;
+    return *this;
+  }
+
 private:
   Name m_prefix;
   shared_ptr<RegexPatternListMatcher> m_regexFilter;
+  bool m_allowsLoopback = true;
 };
 
 std::ostream&