diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index c41917c..d5e6dfe 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -85,7 +85,7 @@
 }
 
 bool
-AdjacencyList::operator==(AdjacencyList& adl) const
+AdjacencyList::operator==(const AdjacencyList& adl) const
 {
   if (size() != adl.size()) {
     return false;
@@ -127,9 +127,9 @@
 }
 
 bool
-AdjacencyList::isNeighbor(const ndn::Name& adjName)
+AdjacencyList::isNeighbor(const ndn::Name& adjName) const
 {
-  std::list<Adjacent>::iterator it = find(adjName);
+  std::list<Adjacent>::const_iterator it = find(adjName);
   if (it == m_adjList.end())
   {
     return false;
@@ -158,9 +158,9 @@
 }
 
 int32_t
-AdjacencyList::getTimedOutInterestCount(const ndn::Name& neighbor)
+AdjacencyList::getTimedOutInterestCount(const ndn::Name& neighbor) const
 {
-  std::list<Adjacent>::iterator it = find(neighbor);
+  std::list<Adjacent>::const_iterator it = find(neighbor);
   if (it == m_adjList.end()) {
     return -1;
   }
@@ -168,9 +168,9 @@
 }
 
 Adjacent::Status
-AdjacencyList::getStatusOfNeighbor(const ndn::Name& neighbor)
+AdjacencyList::getStatusOfNeighbor(const ndn::Name& neighbor) const
 {
-  std::list<Adjacent>::iterator it = find(neighbor);
+  std::list<Adjacent>::const_iterator it = find(neighbor);
 
   if (it == m_adjList.end()) {
     return Adjacent::STATUS_UNKNOWN;
@@ -225,10 +225,10 @@
 }
 
 int32_t
-AdjacencyList::getNumOfActiveNeighbor()
+AdjacencyList::getNumOfActiveNeighbor() const
 {
   int32_t actNbrCount = 0;
-  for (std::list<Adjacent>::iterator it = m_adjList.begin(); it != m_adjList.end(); it++) {
+  for (std::list<Adjacent>::const_iterator it = m_adjList.begin(); it != m_adjList.end(); it++) {
 
     if (it->getStatus() == Adjacent::STATUS_ACTIVE) {
       actNbrCount++;
@@ -247,6 +247,17 @@
   return it;
 }
 
+std::list<Adjacent>::const_iterator
+AdjacencyList::find(const ndn::Name& adjName) const
+{
+  std::list<Adjacent>::const_iterator it = std::find_if(m_adjList.cbegin(),
+                                                        m_adjList.cend(),
+                                                        std::bind(&Adjacent::compare,
+                                                                  _1, std::cref(adjName)));
+  return it;
+}
+
+
 AdjacencyList::iterator
 AdjacencyList::findAdjacent(const ndn::Name& adjName)
 {
diff --git a/src/adjacency-list.hpp b/src/adjacency-list.hpp
index 6d37a94..61205c8 100644
--- a/src/adjacency-list.hpp
+++ b/src/adjacency-list.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2017,  The University of Memphis,
+ * Copyright (c) 2014-2018,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -74,16 +74,16 @@
   getAdjList() const;
 
   bool
-  isNeighbor(const ndn::Name& adjName);
+  isNeighbor(const ndn::Name& adjName) const;
 
   void
   incrementTimedOutInterestCount(const ndn::Name& neighbor);
 
   int32_t
-  getTimedOutInterestCount(const ndn::Name& neighbor);
+  getTimedOutInterestCount(const ndn::Name& neighbor) const;
 
   Adjacent::Status
-  getStatusOfNeighbor(const ndn::Name& neighbor);
+  getStatusOfNeighbor(const ndn::Name& neighbor) const;
 
   void
   setStatusOfNeighbor(const ndn::Name& neighbor, Adjacent::Status status);
@@ -120,13 +120,13 @@
   isAdjLsaBuildable(const uint32_t interestRetryNo) const;
 
   int32_t
-  getNumOfActiveNeighbor();
+  getNumOfActiveNeighbor() const;
 
   Adjacent
   getAdjacent(const ndn::Name& adjName);
 
   bool
-  operator==(AdjacencyList& adl) const;
+  operator==(const AdjacencyList& adl) const;
 
   size_t
   size() const
@@ -187,6 +187,9 @@
   iterator
   find(const ndn::Name& adjName);
 
+  const_iterator
+  find(const ndn::Name& adjName) const;
+
 private:
   std::list<Adjacent> m_adjList;
 };
diff --git a/src/adjacent.hpp b/src/adjacent.hpp
index 1e6eac5..72a8d98 100644
--- a/src/adjacent.hpp
+++ b/src/adjacent.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2017,  The University of Memphis,
+ * Copyright (c) 2014-2018,  The University of Memphis,
  *                           Regents of the University of California
  *
  * This file is part of NLSR (Named-data Link State Routing).
@@ -140,19 +140,19 @@
   operator<(const Adjacent& adjacent) const;
 
   inline bool
-  compare(const ndn::Name& adjacencyName)
+  compare(const ndn::Name& adjacencyName) const
   {
     return m_name == adjacencyName;
   }
 
   inline bool
-  compareFaceId(const uint64_t faceId)
+  compareFaceId(const uint64_t faceId) const
   {
     return m_faceId == faceId;
   }
 
   inline bool
-  compareFaceUri(const ndn::FaceUri& faceUri)
+  compareFaceUri(const ndn::FaceUri& faceUri) const
   {
     return m_faceUri == faceUri;
   }
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index 0a29184..d3b8737 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -123,18 +123,36 @@
     return m_confParam;
   }
 
+  const ConfParameter&
+  getConfParameter() const
+  {
+    return m_confParam;
+  }
+
   AdjacencyList&
   getAdjacencyList()
   {
     return m_adjacencyList;
   }
 
+  const AdjacencyList&
+  getAdjacencyList() const
+  {
+    return m_adjacencyList;
+  }
+
   NamePrefixList&
   getNamePrefixList()
   {
     return m_namePrefixList;
   }
 
+  const NamePrefixList&
+  getNamePrefixList() const
+  {
+    return m_namePrefixList;
+  }
+
   ndn::Face&
   getNlsrFace()
   {
