Get rid of the last use of ndn::dns in NFD

Change-Id: I9a3188379a4755f5535af05a860a2e3a12ddc8ba
Refs: #2422
diff --git a/tests/daemon/face/tcp.t.cpp b/tests/daemon/face/tcp.t.cpp
index 9ee9881..dc788fc 100644
--- a/tests/daemon/face/tcp.t.cpp
+++ b/tests/daemon/face/tcp.t.cpp
@@ -34,7 +34,6 @@
 #include "packet-datasets.hpp"
 
 #include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/util/dns.hpp>
 
 namespace nfd {
 namespace tests {
@@ -550,14 +549,14 @@
                                  CorruptedPackets, SimpleEndToEndFixture)
 {
   TcpFactory factory;
+  tcp::Endpoint endpoint(boost::asio::ip::address_v4::from_string("127.0.0.1"), 20070);
 
-  shared_ptr<TcpChannel> channel = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel = factory.createChannel(endpoint);
   channel->listen(bind(&SimpleEndToEndFixture::onFaceCreated,   this, _1),
                   bind(&SimpleEndToEndFixture::onConnectFailed, this, _1));
   BOOST_REQUIRE_EQUAL(channel->isListening(), true);
 
   DummyStreamSender<boost::asio::ip::tcp, Dataset> sender;
-  tcp::Endpoint endpoint(boost::asio::ip::address::from_string("127.0.0.1"), 20070);
   sender.start(endpoint);
 
   BOOST_CHECK_MESSAGE(limitedIo.run(LimitedIo::UNLIMITED_OPS,
@@ -568,29 +567,29 @@
 BOOST_FIXTURE_TEST_CASE_TEMPLATE(FaceCorruptedInput, Dataset,
                                  CorruptedPackets, SimpleEndToEndFixture)
 {
-  // tests with non-local Face
-  std::string someIpv4Address;
+  // test with non-local Face
+  boost::asio::ip::address_v4 someIpv4Address;
   for (const auto& netif : listNetworkInterfaces()) {
     if (!netif.isLoopback() && netif.isUp() && !netif.ipv4Addresses.empty()) {
-      someIpv4Address = netif.ipv4Addresses[0].to_string();
+      someIpv4Address = netif.ipv4Addresses.front();
       break;
     }
   }
-  if (someIpv4Address.empty()) {
+  if (someIpv4Address.is_unspecified()) {
     BOOST_TEST_MESSAGE("Test with non-local Face cannot be run "
-                       "(no non-local interface with IPv4 address available)");
+                       "(no non-loopback interface with IPv4 address found)");
     return;
   }
 
   TcpFactory factory;
+  tcp::Endpoint endpoint(someIpv4Address, 20070);
 
-  shared_ptr<TcpChannel> channel = factory.createChannel(someIpv4Address, "20070");
+  shared_ptr<TcpChannel> channel = factory.createChannel(endpoint);
   channel->listen(bind(&SimpleEndToEndFixture::onFaceCreated,   this, _1),
                   bind(&SimpleEndToEndFixture::onConnectFailed, this, _1));
   BOOST_REQUIRE_EQUAL(channel->isListening(), true);
 
   DummyStreamSender<boost::asio::ip::tcp, Dataset> sender;
-  tcp::Endpoint endpoint(ndn::dns::syncResolve(someIpv4Address, getGlobalIoService()), 20070);
   sender.start(endpoint);
 
   BOOST_CHECK_MESSAGE(limitedIo.run(LimitedIo::UNLIMITED_OPS,