diff --git a/src/meta-info.cpp b/src/meta-info.cpp
index d829ed3..e3ba2be 100644
--- a/src/meta-info.cpp
+++ b/src/meta-info.cpp
@@ -22,10 +22,15 @@
 #include "meta-info.hpp"
 #include "encoding/block-helpers.hpp"
 #include "encoding/encoding-buffer.hpp"
-#include "util/time.hpp"
+
+#include <boost/concept_check.hpp>
+#include <boost/type_traits.hpp>
 
 namespace ndn {
 
+BOOST_CONCEPT_ASSERT((boost::EqualityComparable<MetaInfo>));
+BOOST_STATIC_ASSERT((boost::is_base_of<tlv::Error, MetaInfo::Error>::value));
+
 MetaInfo::MetaInfo()
   : m_type(TYPE_DEFAULT)
   , m_freshnessPeriod(-1)
@@ -61,6 +66,62 @@
   return *this;
 }
 
+const std::list<Block>&
+MetaInfo::getAppMetaInfo() const
+{
+  return m_appMetaInfo;
+}
+
+MetaInfo&
+MetaInfo::setAppMetaInfo(const std::list<Block>& info)
+{
+  for (std::list<Block>::const_iterator i = info.begin(); i != info.end(); ++i) {
+    if (!(128 <= i->type() && i->type() <= 252))
+      throw Error("AppMetaInfo block has type outside the application range [128, 252]");
+  }
+
+  m_wire.reset();
+  m_appMetaInfo = info;
+  return *this;
+}
+
+MetaInfo&
+MetaInfo::addAppMetaInfo(const Block& block)
+{
+  if (!(128 <= block.type() && block.type() <= 252))
+    throw Error("AppMetaInfo block has type outside the application range [128, 252]");
+
+  m_wire.reset();
+  m_appMetaInfo.push_back(block);
+  return *this;
+}
+
+bool
+MetaInfo::removeAppMetaInfo(uint32_t tlvType)
+{
+  for (std::list<Block>::iterator iter = m_appMetaInfo.begin();
+       iter != m_appMetaInfo.end(); ++iter) {
+    if (iter->type() == tlvType) {
+      m_wire.reset();
+      m_appMetaInfo.erase(iter);
+      return true;
+    }
+  }
+  return false;
+}
+
+const Block*
+MetaInfo::findAppMetaInfo(uint32_t tlvType) const
+{
+  for (std::list<Block>::const_iterator iter = m_appMetaInfo.begin();
+       iter != m_appMetaInfo.end(); ++iter) {
+    if (iter->type() == tlvType) {
+      return &*iter;
+    }
+  }
+  return 0;
+}
+
 template<bool T>
 size_t
 MetaInfo::wireEncode(EncodingImpl<T>& blk) const
@@ -69,9 +130,15 @@
   //                ContentType?
   //                FreshnessPeriod?
   //                FinalBlockId?
+  //                AppMetaInfo*
 
   size_t totalLength = 0;
 
+  for (std::list<Block>::const_reverse_iterator appMetaInfoItem = m_appMetaInfo.rbegin();
+       appMetaInfoItem != m_appMetaInfo.rend(); ++appMetaInfoItem) {
+    totalLength += prependBlock(blk, *appMetaInfoItem);
+  }
+
   // FinalBlockId
   if (!m_finalBlockId.empty())
     {
@@ -127,38 +194,48 @@
   // MetaInfo ::= META-INFO-TYPE TLV-LENGTH
   //                ContentType?
   //                FreshnessPeriod?
+  //                FinalBlockId?
+  //                AppMetaInfo*
+
+
+  Block::element_const_iterator val = m_wire.elements_begin();
 
   // ContentType
-  Block::element_const_iterator val = m_wire.find(tlv::ContentType);
-  if (val != m_wire.elements().end())
-    {
-      m_type = readNonNegativeInteger(*val);
-    }
-  else
+  if (val != m_wire.elements_end() && val->type() == tlv::ContentType) {
+    m_type = readNonNegativeInteger(*val);
+    ++val;
+  }
+  else {
     m_type = TYPE_DEFAULT;
+  }
 
   // FreshnessPeriod
-  val = m_wire.find(tlv::FreshnessPeriod);
-  if (val != m_wire.elements().end())
-    {
-      m_freshnessPeriod = time::milliseconds(readNonNegativeInteger(*val));
-    }
-  else
+  if (val != m_wire.elements_end() && val->type() == tlv::FreshnessPeriod) {
+    m_freshnessPeriod = time::milliseconds(readNonNegativeInteger(*val));
+    ++val;
+  }
+  else {
     m_freshnessPeriod = time::milliseconds::min();
+  }
 
   // FinalBlockId
-  val = m_wire.find(tlv::FinalBlockId);
-  if (val != m_wire.elements().end())
-    {
-      m_finalBlockId = val->blockFromValue();
-      if (m_finalBlockId.type() != tlv::NameComponent)
-        {
-          /// @todo May or may not throw exception later...
-          m_finalBlockId.reset();
-        }
-    }
-  else
+  if (val != m_wire.elements_end() && val->type() == tlv::FinalBlockId) {
+    m_finalBlockId = val->blockFromValue();
+    if (m_finalBlockId.type() != tlv::NameComponent)
+      {
+        /// @todo May or may not throw exception later...
+        m_finalBlockId.reset();
+      }
+    ++val;
+  }
+  else {
     m_finalBlockId.reset();
+  }
+
+  // AppMetaInfo (if any)
+  for (; val != m_wire.elements().end(); ++val) {
+    m_appMetaInfo.push_back(*val);
+  }
 }
 
 std::ostream&
@@ -172,10 +249,18 @@
     os << ", FreshnessPeriod: " << info.getFreshnessPeriod();
   }
 
+  // FinalBlockId
   if (!info.getFinalBlockId().empty()) {
     os << ", FinalBlockId: ";
     info.getFinalBlockId().toUri(os);
   }
+
+  // App-defined MetaInfo items
+  for (std::list<Block>::const_iterator iter = info.getAppMetaInfo().begin();
+       iter != info.getAppMetaInfo().end(); ++iter) {
+    os << ", AppMetaInfoTlvType: " << iter->type();
+  }
+
   return os;
 }
 
diff --git a/src/meta-info.hpp b/src/meta-info.hpp
index 9958ba3..d73014e 100644
--- a/src/meta-info.hpp
+++ b/src/meta-info.hpp
@@ -27,15 +27,45 @@
 #include "encoding/encoding-buffer.hpp"
 #include "util/time.hpp"
 #include "name-component.hpp"
+#include <list>
 
 namespace ndn {
 
 /**
  * An MetaInfo holds the meta info which is signed inside the data packet.
+ *
+ * The class allows experimentation with application-defined meta information blocks,
+ * which slightly violates NDN-TLV specification.  When using the application-defined
+ * meta information blocks be aware that this may result in packet drop (NFD and
+ * previous versions of ndn-cxx will gracefully accept such packet).
+ *
+ * The following definition of MetaInfo block is assumed in this implementation (compared
+ * to the NDN-TLV spec, definition extended to allow optional AppMetaInfo TLV blocks):
+ *
+ *     MetaInfo ::= META-INFO-TYPE TLV-LENGTH
+ *                    ContentType?
+ *                    FreshnessPeriod?
+ *                    FinalBlockId?
+ *                    AppMetaInfo*
+ *
+ *     AppMetaInfo ::= any TLV block with type in the restricted application range [128, 252]
+ *
+ * Note that AppMetaInfo blocks are application-defined and must have TLV type from
+ * the restricted application range [128, 252].
  */
 class MetaInfo
 {
 public:
+  class Error : public tlv::Error
+  {
+  public:
+    explicit
+    Error(const std::string& what)
+      : tlv::Error(what)
+    {
+    }
+  };
+
   enum {
     TYPE_DEFAULT = 0,
     TYPE_LINK = 1,
@@ -81,6 +111,76 @@
   MetaInfo&
   setFinalBlockId(const name::Component& finalBlockId);
 
+  /**
+   * @brief Get all app-defined MetaInfo items
+   *
+   * @note Warning: Experimental API, which may change or disappear in the future
+   *
+   * @note If MetaInfo is decoded from wire and setType, setFreshnessPeriod, or setFinalBlockId
+   *       is called before *AppMetaInfo, all app-defined blocks will be lost
+   */
+  const std::list<Block>&
+  getAppMetaInfo() const;
+
+  /**
+   * @brief Set app-defined MetaInfo items
+   *
+   * This method will replace all existing app-defined MetaInfo items, if they existed.
+   *
+   * @throw Error if some block in @p info has type not in the application range
+   *              (http://named-data.net/doc/ndn-tlv/types.html)
+   *
+   * @note Warning: Experimental API, which may change or disappear in the future
+   *
+   * @note If MetaInfo is decoded from wire and setType, setFreshnessPeriod, or setFinalBlockId
+   *       is called before *AppMetaInfo, all app-defined blocks will be lost
+   */
+  MetaInfo&
+  setAppMetaInfo(const std::list<Block>& info);
+
+  /**
+   * @brief Add an app-defined MetaInfo item
+   *
+   * @throw Error if @p block has type not in the application range
+   *              (http://named-data.net/doc/ndn-tlv/types.html)
+   *
+   * @note Warning: Experimental API, which may change or disappear in the future
+   *
+   * @note If MetaInfo is decoded from wire and setType, setFreshnessPeriod, or setFinalBlockId
+   *       is called before *AppMetaInfo, all app-defined blocks will be lost
+   */
+  MetaInfo&
+  addAppMetaInfo(const Block& block);
+
+  /**
+   * @brief Remove a first app-defined MetaInfo item with type @p tlvType
+   *
+   * @return true if an item was deleted
+   *
+   * @note Warning: Experimental API, which may change or disappear in the future
+   *
+   * @note If MetaInfo is decoded from wire and setType, setFreshnessPeriod, or setFinalBlockId
+   *       is called before *AppMetaInfo, all app-defined blocks will be lost
+   */
+  bool
+  removeAppMetaInfo(uint32_t tlvType);
+
+  /**
+   * @brief Find a first app-defined MetaInfo item of type @p tlvType
+   *
+   * @return NULL if an item is not found, otherwise const pointer to the item
+   *
+   * @throw Error if @p tlvType is not in the application range
+   *              (http://named-data.net/doc/ndn-tlv/types.html)
+   *
+   * @note Warning: Experimental API, which may change or disappear in the future
+   *
+   * @note If MetaInfo is decoded from wire and setType, setFreshnessPeriod, or setFinalBlockId
+   *       is called before *AppMetaInfo, all app-defined blocks will be lost
+   */
+  const Block*
+  findAppMetaInfo(uint32_t tlvType) const;
+
 public: // EqualityComparable concept
   bool
   operator==(const MetaInfo& other) const;
@@ -92,6 +192,7 @@
   uint32_t m_type;
   time::milliseconds m_freshnessPeriod;
   name::Component m_finalBlockId;
+  std::list<Block> m_appMetaInfo;
 
   mutable Block m_wire;
 };
