diff --git a/core/network-interface-predicate.cpp b/core/network-interface-predicate.cpp
index daf4cf4..c212ecd 100644
--- a/core/network-interface-predicate.cpp
+++ b/core/network-interface-predicate.cpp
@@ -26,7 +26,6 @@
 #include "network-interface-predicate.hpp"
 
 #include "config-file.hpp"
-#include "network-interface.hpp"
 #include "network.hpp"
 
 #include <fnmatch.h>
@@ -66,7 +65,7 @@
     else if (item.first == "ether") {
       // validate ethernet address
       auto addr = item.second.get_value<std::string>();
-      if (ethernet::Address::fromString(addr).isNull()) {
+      if (ndn::ethernet::Address::fromString(addr).isNull()) {
         BOOST_THROW_EXCEPTION(ConfigFile::Error("Malformed ether address \"" + addr +
                                                 "\" in \"" + section + "\" section"));
       }
@@ -105,25 +104,7 @@
 }
 
 static bool
-doesMatchRule(const NetworkInterfaceInfo& netif, const std::string& rule)
-{
-  // if '/' is in rule, this is a subnet, check if IP in subnet
-  if (rule.find('/') != std::string::npos) {
-    Network n = boost::lexical_cast<Network>(rule);
-    for (const auto& addr : netif.ipv4Addresses) {
-      if (n.doesContain(addr)) {
-        return true;
-      }
-    }
-  }
-
-  return rule == "*" ||
-         doesMatchPattern(netif.name, rule) ||
-         netif.etherAddress.toString() == rule;
-}
-
-static bool
-doesMatchRule2(const ndn::net::NetworkInterface& netif, const std::string& rule)
+doesMatchRule(const ndn::net::NetworkInterface& netif, const std::string& rule)
 {
   // if '/' is in rule, this is a subnet, check if IP in subnet
   if (rule.find('/') != std::string::npos) {
@@ -141,17 +122,10 @@
 }
 
 bool
-NetworkInterfacePredicate::operator()(const NetworkInterfaceInfo& netif) const
-{
-  return std::any_of(m_whitelist.begin(), m_whitelist.end(), bind(&doesMatchRule, netif, _1)) &&
-         std::none_of(m_blacklist.begin(), m_blacklist.end(), bind(&doesMatchRule, netif, _1));
-}
-
-bool
 NetworkInterfacePredicate::operator()(const ndn::net::NetworkInterface& netif) const
 {
-  return std::any_of(m_whitelist.begin(), m_whitelist.end(), bind(&doesMatchRule2, cref(netif), _1)) &&
-         std::none_of(m_blacklist.begin(), m_blacklist.end(), bind(&doesMatchRule2, cref(netif), _1));
+  return std::any_of(m_whitelist.begin(), m_whitelist.end(), bind(&doesMatchRule, cref(netif), _1)) &&
+         std::none_of(m_blacklist.begin(), m_blacklist.end(), bind(&doesMatchRule, cref(netif), _1));
 }
 
 bool
diff --git a/core/network-interface-predicate.hpp b/core/network-interface-predicate.hpp
index 2443735..1b2d5a0 100644
--- a/core/network-interface-predicate.hpp
+++ b/core/network-interface-predicate.hpp
@@ -31,8 +31,6 @@
 
 namespace nfd {
 
-class NetworkInterfaceInfo;
-
 /**
  * \brief Represents a predicate to accept or reject a NetworkInterfaceInfo.
  *
@@ -60,9 +58,6 @@
   parseBlacklist(const boost::property_tree::ptree& list);
 
   bool
-  operator()(const NetworkInterfaceInfo& netif) const;
-
-  bool
   operator()(const ndn::net::NetworkInterface& netif) const;
 
   bool
diff --git a/core/network-interface.cpp b/core/network-interface.cpp
deleted file mode 100644
index ad9485e..0000000
--- a/core/network-interface.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2014-2017,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "network-interface.hpp"
-#include "core/logger.hpp"
-#include <ndn-cxx/net/network-monitor-stub.hpp>
-
-#include <cerrno>
-#include <cstring>
-#include <type_traits>
-#include <unordered_map>
-
-#ifdef HAVE_IFADDRS_H
-#include <ifaddrs.h>     // for getifaddrs()
-
-#include <arpa/inet.h>   // for inet_ntop()
-#include <netinet/in.h>  // for struct sockaddr_in{,6}
-
-#if defined(__linux__)
-#include <net/if_arp.h>        // for ARPHRD_* constants
-#include <netpacket/packet.h>  // for struct sockaddr_ll
-#elif defined(__APPLE__) || defined(__FreeBSD__)
-#include <net/if_dl.h>         // for struct sockaddr_dl
-#include <net/if_types.h>      // for IFT_* constants
-#endif
-
-#endif // HAVE_IFADDRS_H
-
-
-NFD_LOG_INIT("NetworkInterfaceInfo");
-
-namespace nfd {
-
-static_assert(std::is_standard_layout<NetworkInterfaceInfo>::value,
-              "NetworkInterfaceInfo must be a standard layout type");
-#ifdef HAVE_IS_DEFAULT_CONSTRUCTIBLE
-static_assert(std::is_default_constructible<NetworkInterfaceInfo>::value,
-              "NetworkInterfaceInfo must provide a default constructor");
-#endif
-
-shared_ptr<ndn::net::NetworkInterface>
-NetworkInterfaceInfo::asNetworkInterface() const
-{
-  using namespace ndn::net;
-
-  shared_ptr<NetworkInterface> netif = NetworkMonitorStub::makeNetworkInterface();
-  netif->setIndex(this->index);
-  netif->setName(this->name);
-  netif->setEthernetAddress(this->etherAddress);
-  netif->setFlags(this->flags);
-
-  for (const auto& a4 : this->ipv4Addresses) {
-    netif->addNetworkAddress(NetworkAddress(AddressFamily::V4, a4, this->broadcastAddress,
-                                            32, AddressScope::GLOBAL, 0));
-  }
-  for (const auto& a6 : this->ipv6Addresses) {
-    netif->addNetworkAddress(NetworkAddress(AddressFamily::V6, a6, {},
-                                            128, AddressScope::GLOBAL, 0));
-  }
-
-  return netif;
-}
-
-#ifdef WITH_TESTS
-static shared_ptr<std::vector<NetworkInterfaceInfo>> s_debugNetworkInterfaces = nullptr;
-
-void
-setDebugNetworkInterfaces(shared_ptr<std::vector<NetworkInterfaceInfo>> interfaces)
-{
-  s_debugNetworkInterfaces = interfaces;
-}
-#endif
-
-std::vector<NetworkInterfaceInfo>
-listNetworkInterfaces()
-{
-#ifdef WITH_TESTS
-  if (s_debugNetworkInterfaces != nullptr) {
-    return *s_debugNetworkInterfaces;
-  }
-#endif
-
-#ifdef HAVE_IFADDRS_H
-  using namespace boost::asio::ip;
-  using std::strerror;
-
-  std::unordered_map<std::string, NetworkInterfaceInfo> ifmap;
-  ifaddrs* ifa_list = nullptr;
-
-  if (::getifaddrs(&ifa_list) < 0)
-    BOOST_THROW_EXCEPTION(std::runtime_error(std::string("getifaddrs() failed: ") +
-                                             strerror(errno)));
-
-  for (ifaddrs* ifa = ifa_list; ifa != nullptr; ifa = ifa->ifa_next) {
-    std::string ifname(ifa->ifa_name);
-    NetworkInterfaceInfo& netif = ifmap[ifname];
-    netif.name = ifa->ifa_name;
-    netif.flags = ifa->ifa_flags;
-
-    if (ifa->ifa_addr == nullptr)
-      continue;
-
-    switch (ifa->ifa_addr->sa_family) {
-
-      case AF_INET: {
-        const sockaddr_in* sin = reinterpret_cast<sockaddr_in*>(ifa->ifa_addr);
-        char address[INET_ADDRSTRLEN];
-        if (::inet_ntop(AF_INET, &sin->sin_addr, address, sizeof(address))) {
-          netif.ipv4Addresses.push_back(address_v4::from_string(address));
-          NFD_LOG_TRACE(ifname << ": added IPv4 address " << address);
-        }
-        else
-          NFD_LOG_WARN(ifname << ": inet_ntop(AF_INET) failed: " << strerror(errno));
-        break;
-      }
-
-      case AF_INET6: {
-        const sockaddr_in6* sin6 = reinterpret_cast<sockaddr_in6*>(ifa->ifa_addr);
-        char address[INET6_ADDRSTRLEN];
-        if (::inet_ntop(AF_INET6, &sin6->sin6_addr, address, sizeof(address))) {
-          netif.ipv6Addresses.push_back(address_v6::from_string(address));
-          NFD_LOG_TRACE(ifname << ": added IPv6 address " << address);
-        }
-        else
-          NFD_LOG_WARN(ifname << ": inet_ntop(AF_INET6) failed: " << strerror(errno));
-        break;
-      }
-
-#if defined(__linux__)
-      case AF_PACKET: {
-        const sockaddr_ll* sll = reinterpret_cast<sockaddr_ll*>(ifa->ifa_addr);
-        netif.index = sll->sll_ifindex;
-        if (sll->sll_hatype == ARPHRD_ETHER && sll->sll_halen == ethernet::ADDR_LEN) {
-          netif.etherAddress = ethernet::Address(sll->sll_addr);
-          NFD_LOG_TRACE(ifname << ": added Ethernet address " << netif.etherAddress);
-        }
-        else if (sll->sll_hatype != ARPHRD_LOOPBACK) {
-          NFD_LOG_DEBUG(ifname << ": ignoring link-layer address for unhandled hardware type "
-                        << sll->sll_hatype);
-        }
-        break;
-      }
-
-#elif defined(__APPLE__) || defined(__FreeBSD__)
-      case AF_LINK: {
-        const sockaddr_dl* sdl = reinterpret_cast<sockaddr_dl*>(ifa->ifa_addr);
-        netif.index = sdl->sdl_index;
-        if (sdl->sdl_type == IFT_ETHER && sdl->sdl_alen == ethernet::ADDR_LEN) {
-          netif.etherAddress = ethernet::Address(reinterpret_cast<uint8_t*>(LLADDR(sdl)));
-          NFD_LOG_TRACE(ifname << ": added Ethernet address " << netif.etherAddress);
-        }
-        else if (sdl->sdl_type != IFT_LOOP) {
-          NFD_LOG_DEBUG(ifname << ": ignoring link-layer address for unhandled interface type "
-                        << sdl->sdl_type);
-        }
-        break;
-      }
-#endif
-    }
-
-    if (netif.isBroadcastCapable() && ifa->ifa_broadaddr != nullptr) {
-      const sockaddr_in* sin = reinterpret_cast<sockaddr_in*>(ifa->ifa_broadaddr);
-      char address[INET_ADDRSTRLEN];
-      if (::inet_ntop(AF_INET, &sin->sin_addr, address, sizeof(address))) {
-        netif.broadcastAddress = address_v4::from_string(address);
-        NFD_LOG_TRACE(ifname << ": added IPv4 broadcast address " << address);
-      }
-      else
-        NFD_LOG_WARN(ifname << ": inet_ntop(AF_INET) for broadaddr failed: " << strerror(errno));
-    }
-  }
-
-  ::freeifaddrs(ifa_list);
-
-  std::vector<NetworkInterfaceInfo> v;
-  v.reserve(ifmap.size());
-  for (auto&& element : ifmap) {
-    v.push_back(element.second);
-  }
-
-  return v;
-#else
-  return {};
-#endif // HAVE_IFADDRS_H
-}
-
-} // namespace nfd
diff --git a/core/network-interface.hpp b/core/network-interface.hpp
deleted file mode 100644
index b94fabd..0000000
--- a/core/network-interface.hpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2014-2017,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NFD_CORE_NETWORK_INTERFACE_HPP
-#define NFD_CORE_NETWORK_INTERFACE_HPP
-
-#include "common.hpp"
-#include <ndn-cxx/net/ethernet.hpp>
-#include <ndn-cxx/net/network-interface.hpp>
-
-#include <net/if.h>
-
-namespace nfd {
-
-namespace ethernet {
-using namespace ndn::ethernet;
-} // namespace ethernet
-
-/** \brief contains information about a network interface
- */
-class NetworkInterfaceInfo
-{
-public:
-  bool
-  isLoopback() const;
-
-  bool
-  isMulticastCapable() const;
-
-  bool
-  isBroadcastCapable() const;
-
-  bool
-  isUp() const;
-
-  /** \brief Export to ndn::net::NetworkInterface
-   *  \warning This is a temporary adaptation during the transition from NetworkInterfaceInfo to
-   *           ndn::net::NetworkInterface. The return value carries the information in this instance
-   *           and will not track changes in the actual network interface or emit signals.
-   */
-  shared_ptr<ndn::net::NetworkInterface>
-  asNetworkInterface() const;
-
-public:
-  int index;
-  std::string name;
-  ethernet::Address etherAddress;
-  std::vector<boost::asio::ip::address_v4> ipv4Addresses;
-  std::vector<boost::asio::ip::address_v6> ipv6Addresses;
-  boost::asio::ip::address_v4 broadcastAddress;
-  unsigned int flags;
-};
-
-inline bool
-NetworkInterfaceInfo::isLoopback() const
-{
-  return (flags & IFF_LOOPBACK) != 0;
-}
-
-inline bool
-NetworkInterfaceInfo::isMulticastCapable() const
-{
-  return (flags & IFF_MULTICAST) != 0;
-}
-
-inline bool
-NetworkInterfaceInfo::isBroadcastCapable() const
-{
-  return (flags & IFF_BROADCAST) != 0;
-}
-
-inline bool
-NetworkInterfaceInfo::isUp() const
-{
-  return (flags & IFF_UP) != 0;
-}
-
-/** \brief List configured network interfaces on the system and their info
- *  \warning invalid IP addresses (e.g., 0.0.0.0) may be returned in some environments
- */
-std::vector<NetworkInterfaceInfo>
-listNetworkInterfaces();
-
-#ifdef WITH_TESTS
-/** \brief Set a list of network interfaces to be returned by subsequent listNetworkInterfaces call
- *  \note To reset to normal behavior, use `setDebugNetworkInterfaces(nullptr);`
- */
-void
-setDebugNetworkInterfaces(shared_ptr<std::vector<NetworkInterfaceInfo>> interfaces);
-#endif
-
-} // namespace nfd
-
-#endif // NFD_CORE_NETWORK_INTERFACE_HPP
diff --git a/daemon/face/face-system.cpp b/daemon/face/face-system.cpp
index 57b391d..cbe02ed 100644
--- a/daemon/face/face-system.cpp
+++ b/daemon/face/face-system.cpp
@@ -93,7 +93,6 @@
 {
   ConfigContext context;
   context.isDryRun = isDryRun;
-  context.m_netifs = listNetworkInterfaces();
 
   // process sections in protocol factories
   for (const auto& pair : m_factories) {
diff --git a/daemon/face/face-system.hpp b/daemon/face/face-system.hpp
index 039c1c9..b61e7a8 100644
--- a/daemon/face/face-system.hpp
+++ b/daemon/face/face-system.hpp
@@ -28,7 +28,6 @@
 
 #include "channel.hpp"
 #include "core/config-file.hpp"
-#include "core/network-interface.hpp"
 #include "core/network-interface-predicate.hpp"
 #include <ndn-cxx/net/network-address.hpp>
 #include <ndn-cxx/net/network-interface.hpp>
@@ -90,20 +89,7 @@
   class ConfigContext : noncopyable
   {
   public:
-    /// \deprecated use NetworkMonitor provided as ProtocolFactory::netmon
-    const std::vector<NetworkInterfaceInfo>&
-    listNetifs() const
-    {
-      return m_netifs;
-    }
-
-  public:
     bool isDryRun;
-
-  private:
-    std::vector<NetworkInterfaceInfo> m_netifs;
-
-    friend class FaceSystem;
   };
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
diff --git a/tests/core/network-interface-predicate.t.cpp b/tests/core/network-interface-predicate.t.cpp
index 3ec581b..9ae6c44 100644
--- a/tests/core/network-interface-predicate.t.cpp
+++ b/tests/core/network-interface-predicate.t.cpp
@@ -24,10 +24,10 @@
  */
 
 #include "core/network-interface-predicate.hpp"
-#include "core/network-interface.hpp"
 
 #include "tests/test-common.hpp"
 
+#include <ndn-cxx/net/ethernet.hpp>
 #include <ndn-cxx/net/network-monitor-stub.hpp>
 #include <boost/property_tree/info_parser.hpp>
 #include <sstream>
@@ -41,36 +41,8 @@
   NetworkInterfacePredicateFixture()
   {
     using namespace boost::asio::ip;
-    interfaces.push_back(
-      NetworkInterfaceInfo{0, "eth0",
-        ethernet::Address::fromString("3e:15:c2:8b:65:00"),
-        {address_v4::from_string("129.82.100.1")},
-        {},
-        address_v4::from_string("129.82.255.255"),
-        IFF_UP});
-    interfaces.push_back(
-      NetworkInterfaceInfo{1, "eth1",
-        ethernet::Address::fromString("3e:15:c2:8b:65:01"),
-        {address_v4::from_string("192.168.2.1")},
-        {},
-        address_v4::from_string("192.168.2.255"),
-        IFF_UP});
-    interfaces.push_back(
-      NetworkInterfaceInfo{2, "eth2",
-        ethernet::Address::fromString("3e:15:c2:8b:65:02"),
-        {address_v4::from_string("198.51.100.1")},
-        {address_v6::from_string("2001:db8::1")},
-        address_v4::from_string("198.51.100.255"),
-        IFF_MULTICAST | IFF_BROADCAST | IFF_UP});
-    interfaces.push_back(
-      NetworkInterfaceInfo{3, "enp68s0f1",
-        ethernet::Address::fromString("3e:15:c2:8b:65:03"),
-        {address_v4::from_string("192.168.2.3")},
-        {},
-        address_v4::from_string("192.168.2.255"),
-        IFF_UP});
-
     using namespace ndn::net;
+    namespace ethernet = ndn::ethernet;
 
     netifs.push_back(NetworkMonitorStub::makeNetworkInterface());
     netifs.back()->setIndex(0);
@@ -131,7 +103,6 @@
 
 protected:
   NetworkInterfacePredicate predicate;
-  std::vector<NetworkInterfaceInfo> interfaces;
   std::vector<shared_ptr<ndn::net::NetworkInterface>> netifs;
 };
 
@@ -141,11 +112,6 @@
 {
   parseConfig("");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), true);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), true);
@@ -158,11 +124,6 @@
               "{\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), false);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), false);
@@ -176,11 +137,6 @@
               "  *\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), false);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), false);
@@ -195,11 +151,6 @@
               "  ifname eth1\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), false);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), false);
@@ -214,11 +165,6 @@
               "  ifname eth1\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), true);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), true);
@@ -232,11 +178,6 @@
               "  ifname enp*\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), true);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), false);
@@ -250,11 +191,6 @@
               "  ifname *th*\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), false);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), true);
@@ -268,11 +204,6 @@
               "  ifname eth**\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), false);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), true);
@@ -286,11 +217,6 @@
               "  ifname *\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), true);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), true);
@@ -304,11 +230,6 @@
               "  ifname eth?\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), false);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), true);
@@ -333,11 +254,6 @@
               "  ether 3e:15:c2:8b:65:01\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), false);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), false);
@@ -352,11 +268,6 @@
               "  ether 3e:15:c2:8b:65:01\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), true);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), true);
@@ -380,11 +291,6 @@
               "  subnet 192.168.0.0/16\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), true);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), false);
@@ -398,11 +304,6 @@
               "  subnet 192.168.0.0/16\n"
               "}");
 
-  BOOST_CHECK_EQUAL(predicate(interfaces[0]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[1]), false);
-  BOOST_CHECK_EQUAL(predicate(interfaces[2]), true);
-  BOOST_CHECK_EQUAL(predicate(interfaces[3]), false);
-
   BOOST_CHECK_EQUAL(predicate(*netifs[0]), true);
   BOOST_CHECK_EQUAL(predicate(*netifs[1]), false);
   BOOST_CHECK_EQUAL(predicate(*netifs[2]), true);
diff --git a/tests/core/network-interface.t.cpp b/tests/core/network-interface.t.cpp
deleted file mode 100644
index 43436bb..0000000
--- a/tests/core/network-interface.t.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015,  Regents of the University of California,
- *                           Arizona Board of Regents,
- *                           Colorado State University,
- *                           University Pierre & Marie Curie, Sorbonne University,
- *                           Washington University in St. Louis,
- *                           Beijing Institute of Technology,
- *                           The University of Memphis.
- *
- * This file is part of NFD (Named Data Networking Forwarding Daemon).
- * See AUTHORS.md for complete list of NFD authors and contributors.
- *
- * NFD is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * NFD 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
- * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "core/network-interface.hpp"
-#include "tests/test-common.hpp"
-
-namespace nfd {
-namespace tests {
-
-BOOST_FIXTURE_TEST_SUITE(TestNetworkInterface, BaseFixture)
-
-BOOST_AUTO_TEST_CASE(ListRealNetworkInterfaces)
-{
-  std::vector<NetworkInterfaceInfo> netifs;
-  BOOST_CHECK_NO_THROW(netifs = listNetworkInterfaces());
-
-  for (const auto& netif : netifs) {
-    BOOST_TEST_MESSAGE(netif.index << ": " << netif.name);
-    BOOST_TEST_MESSAGE("\tether " << netif.etherAddress);
-    for (const auto& address : netif.ipv4Addresses)
-      BOOST_TEST_MESSAGE("\tinet  " << address);
-    for (const auto& address : netif.ipv6Addresses)
-      BOOST_TEST_MESSAGE("\tinet6 " << address);
-    BOOST_TEST_MESSAGE("\tloopback  : " << netif.isLoopback());
-    BOOST_TEST_MESSAGE("\tmulticast : " << netif.isMulticastCapable());
-    BOOST_TEST_MESSAGE("\tup        : " << netif.isUp());
-  }
-}
-
-class FakeNetworkInterfaceFixture : public BaseFixture
-{
-public:
-  FakeNetworkInterfaceFixture()
-  {
-    using namespace boost::asio::ip;
-
-    auto fakeInterfaces = make_shared<std::vector<NetworkInterfaceInfo>>();
-
-    fakeInterfaces->push_back(
-      NetworkInterfaceInfo {0, "lo0",
-        ethernet::Address(),
-        {address_v4::from_string("127.0.0.1")},
-        {address_v6::from_string("fe80::1")},
-        address_v4::from_string("127.255.255.255"),
-        IFF_LOOPBACK | IFF_UP});
-    fakeInterfaces->push_back(
-      NetworkInterfaceInfo {1, "eth0",
-        ethernet::Address::fromString("3e:15:c2:8b:65:00"),
-        {address_v4::from_string("192.168.2.1")},
-        {},
-        address_v4::from_string("192.168.2.255"),
-        0});
-    fakeInterfaces->push_back(
-      NetworkInterfaceInfo {2, "eth1",
-        ethernet::Address::fromString("3e:15:c2:8b:65:00"),
-        {address_v4::from_string("198.51.100.1")},
-        {address_v6::from_string("2001:db8::1")},
-        address_v4::from_string("198.51.100.255"),
-        IFF_MULTICAST | IFF_BROADCAST | IFF_UP});
-
-    setDebugNetworkInterfaces(fakeInterfaces);
-  }
-
-  ~FakeNetworkInterfaceFixture()
-  {
-    setDebugNetworkInterfaces(nullptr);
-  }
-};
-
-BOOST_FIXTURE_TEST_CASE(ListFakeNetworkInterfaces, FakeNetworkInterfaceFixture)
-{
-  std::vector<NetworkInterfaceInfo> netifs;
-  BOOST_CHECK_NO_THROW(netifs = listNetworkInterfaces());
-
-  BOOST_REQUIRE_EQUAL(netifs.size(), 3);
-
-  BOOST_CHECK_EQUAL(netifs[0].index, 0);
-  BOOST_CHECK_EQUAL(netifs[1].index, 1);
-  BOOST_CHECK_EQUAL(netifs[2].index, 2);
-
-  BOOST_CHECK_EQUAL(netifs[0].name, "lo0");
-  BOOST_CHECK_EQUAL(netifs[1].name, "eth0");
-  BOOST_CHECK_EQUAL(netifs[2].name, "eth1");
-
-  // no real value of testing other parameters
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace tests
-} // namespace nfd
diff --git a/wscript b/wscript
index ace1e8e..e0fee20 100644
--- a/wscript
+++ b/wscript
@@ -105,9 +105,8 @@
   return 0;
 }
 '''):
-      Logs.warn('Dropping privileges is not supported on this platform')
+        Logs.warn('Dropping privileges is not supported on this platform')
 
-    conf.check_cxx(header_name='ifaddrs.h', mandatory=False)
     conf.check_cxx(header_name='valgrind/valgrind.h', define_name='HAVE_VALGRIND', mandatory=False)
 
     boost_libs = 'system chrono program_options thread log log_setup'
@@ -140,7 +139,7 @@
                                  errmsg='not found, but required for Ethernet face support. '
                                         'Specify --without-libpcap to disable Ethernet face support.')
         else:
-            Logs.warn('Warning: Ethernet face support is not supported on this platform with Boost libraries version 1.56. '
+            Logs.warn('Warning: Ethernet face is not supported on this platform with Boost libraries version 1.56. '
                       'See https://redmine.named-data.net/issues/1877 for more details')
     if conf.env['HAVE_LIBPCAP']:
         conf.check_cxx(function_name='pcap_set_immediate_mode', header_name='pcap/pcap.h',
