Added ndn_Name_match.
diff --git a/Makefile.am b/Makefile.am
index 49092a4..fa66b15 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,7 @@
   ndn-cpp/c/data.h \
   ndn-cpp/c/interest.h \
   ndn-cpp/c/key.h \
-  ndn-cpp/c/name.h \
+  ndn-cpp/c/name.c ndn-cpp/c/name.h \
   ndn-cpp/c/publisher-public-key-digest.h \
   ndn-cpp/c/errors.c ndn-cpp/c/errors.h \
   ndn-cpp/c/encoding/binary-xml.h \
diff --git a/Makefile.in b/Makefile.in
index d52990c..9c03216 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -132,7 +132,7 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libndn_c_la_LIBADD =
 am__dirstamp = $(am__leading_dot)dirstamp
-am_libndn_c_la_OBJECTS = ndn-cpp/c/errors.lo \
+am_libndn_c_la_OBJECTS = ndn-cpp/c/name.lo ndn-cpp/c/errors.lo \
 	ndn-cpp/c/encoding/binary-xml-data.lo \
 	ndn-cpp/c/encoding/binary-xml-decoder.lo \
 	ndn-cpp/c/encoding/binary-xml-element-reader.lo \
@@ -459,7 +459,7 @@
   ndn-cpp/c/data.h \
   ndn-cpp/c/interest.h \
   ndn-cpp/c/key.h \
-  ndn-cpp/c/name.h \
+  ndn-cpp/c/name.c ndn-cpp/c/name.h \
   ndn-cpp/c/publisher-public-key-digest.h \
   ndn-cpp/c/errors.c ndn-cpp/c/errors.h \
   ndn-cpp/c/encoding/binary-xml.h \
@@ -605,6 +605,8 @@
 ndn-cpp/c/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) ndn-cpp/c/$(DEPDIR)
 	@: > ndn-cpp/c/$(DEPDIR)/$(am__dirstamp)
+ndn-cpp/c/name.lo: ndn-cpp/c/$(am__dirstamp) \
+	ndn-cpp/c/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/c/errors.lo: ndn-cpp/c/$(am__dirstamp) \
 	ndn-cpp/c/$(DEPDIR)/$(am__dirstamp)
 ndn-cpp/c/encoding/$(am__dirstamp):
@@ -829,6 +831,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/$(DEPDIR)/key.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/$(DEPDIR)/name.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/$(DEPDIR)/errors.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/$(DEPDIR)/name.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-data.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-decoder.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ndn-cpp/c/encoding/$(DEPDIR)/binary-xml-element-reader.Plo@am__quote@
diff --git a/ndn-cpp/c/name.c b/ndn-cpp/c/name.c
new file mode 100644
index 0000000..3f24a67
--- /dev/null
+++ b/ndn-cpp/c/name.c
@@ -0,0 +1,27 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "util/ndn_memory.h"
+#include "name.h"
+
+int ndn_Name_match(struct ndn_Name *self, struct ndn_Name *name)
+{
+	// This name is longer than the name we are checking it against.
+	if (self->nComponents > name->nComponents)
+    return 0;
+
+	// Check if at least one of given components doesn't match.
+  unsigned int i;
+  for (i = 0; i < self->nComponents; ++i) {
+    struct ndn_NameComponent *selfComponent = self->components + i;
+    struct ndn_NameComponent *nameComponent = name->components + i;
+
+    if (selfComponent->valueLength != nameComponent->valueLength ||
+        ndn_memcmp(selfComponent->value, nameComponent->value, selfComponent->valueLength) != 0)
+      return 0;
+  }
+
+	return 1;
+}
diff --git a/ndn-cpp/c/name.h b/ndn-cpp/c/name.h
index b7be236..8105d60 100644
--- a/ndn-cpp/c/name.h
+++ b/ndn-cpp/c/name.h
@@ -52,6 +52,14 @@
   self->nComponents = 0;
 }
 
+/**
+ * Return true if the N components of this name are the same as the first N components of the given name.
+ * @param self A pointer to the ndn_Name struct.
+ * @param name A pointer to the other name to match.
+ * @return 1 if this matches the given name, 0 otherwise.  This always returns 1 if this name is empty.
+ */
+int ndn_Name_match(struct ndn_Name *self, struct ndn_Name *name);
+
 #ifdef __cplusplus
 }
 #endif