build+face: Fixing regression that broke ethernet support
As of this commit, libpcap is required unless specifically disabled
using --without-libpcap parameter during configure stage.
Change-Id: Iec6f8bd9babfe4da193c98a49043b08319311106
Refs: #1472
diff --git a/daemon/core/face-uri.cpp b/daemon/core/face-uri.cpp
index 5cfaf72..c9ec548 100644
--- a/daemon/core/face-uri.cpp
+++ b/daemon/core/face-uri.cpp
@@ -25,9 +25,9 @@
#include "face-uri.hpp"
#include "core/logger.hpp"
-#ifdef HAVE_PCAP
+#ifdef HAVE_LIBPCAP
#include "face/ethernet.hpp"
-#endif // HAVE_PCAP
+#endif // HAVE_LIBPCAP
#include <boost/regex.hpp>
@@ -130,14 +130,14 @@
return uri;
}
-#ifdef HAVE_PCAP
+#ifdef HAVE_LIBPCAP
FaceUri::FaceUri(const ethernet::Address& address)
: m_isV6(false)
{
m_scheme = "ether";
m_host = address.toString();
}
-#endif // HAVE_PCAP
+#endif // HAVE_LIBPCAP
FaceUri
FaceUri::fromDev(const std::string& ifname)
diff --git a/daemon/core/face-uri.hpp b/daemon/core/face-uri.hpp
index 766f353..487f8f8 100644
--- a/daemon/core/face-uri.hpp
+++ b/daemon/core/face-uri.hpp
@@ -29,11 +29,11 @@
namespace nfd {
-#ifdef HAVE_PCAP
+#ifdef HAVE_LIBPCAP
namespace ethernet {
class Address;
} // namespace ethernet
-#endif // HAVE_PCAP
+#endif // HAVE_LIBPCAP
/** \brief represents the underlying protocol and address used by a Face
* \sa http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#FaceUri
@@ -89,11 +89,11 @@
static FaceUri
fromFd(int fd);
-#ifdef HAVE_PCAP
+#ifdef HAVE_LIBPCAP
/// construct ether canonical FaceUri
explicit
FaceUri(const ethernet::Address& address);
-#endif // HAVE_PCAP
+#endif // HAVE_LIBPCAP
/// create dev FaceUri from network device name
static FaceUri
diff --git a/daemon/face/ethernet-face.hpp b/daemon/face/ethernet-face.hpp
index 2b4771e..4eaf0b4 100644
--- a/daemon/face/ethernet-face.hpp
+++ b/daemon/face/ethernet-face.hpp
@@ -28,8 +28,8 @@
#include "ethernet.hpp"
#include "face.hpp"
-#ifndef HAVE_PCAP
-#error "Cannot include this file when pcap is not available"
+#ifndef HAVE_LIBPCAP
+#error "Cannot include this file when libpcap is not available"
#endif
// forward declarations
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index 855bc85..7861935 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -37,9 +37,9 @@
#include "face/unix-stream-factory.hpp"
#endif // HAVE_UNIX_SOCKETS
-#ifdef HAVE_PCAP
+#ifdef HAVE_LIBPCAP
#include "face/ethernet-factory.hpp"
-#endif // HAVE_PCAP
+#endif // HAVE_LIBPCAP
#include <ndn-cpp-dev/management/nfd-face-event-notification.hpp>
@@ -529,7 +529,7 @@
// mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
// }
-#if defined(HAVE_PCAP)
+#if defined(HAVE_LIBPCAP)
using ethernet::Address;
@@ -595,7 +595,7 @@
}
#else
throw ConfigFile::Error("NFD was compiled without libpcap, cannot process \"ether\" section");
-#endif // HAVE_PCAP
+#endif // HAVE_LIBPCAP
}