face: Limit exposure of EthernetFace implementation
It seems that gcc 4.6 on Ubuntu 12.04 has some issue with
std::unordered_map in EthernetFace implementation, causing it segfault
in some cases.
Change-Id: I0c5a3be66e357e2bd83841d833d601c2fba6936a
Refs: #2347
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index d9f1612..a4579f4 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -24,6 +24,8 @@
*/
#include "ethernet-factory.hpp"
+#include "face/ethernet-face.hpp"
+
#include "core/logger.hpp"
#include "core/global-io.hpp"
diff --git a/daemon/face/ethernet-factory.hpp b/daemon/face/ethernet-factory.hpp
index cc8516a..ed81f5f 100644
--- a/daemon/face/ethernet-factory.hpp
+++ b/daemon/face/ethernet-factory.hpp
@@ -26,11 +26,13 @@
#ifndef NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP
#define NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP
-#include "ethernet-face.hpp"
#include "protocol-factory.hpp"
+#include "core/network-interface.hpp"
namespace nfd {
+class EthernetFace;
+
class EthernetFactory : public ProtocolFactory
{
public:
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index f5d849b..768f1b9 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -38,6 +38,7 @@
#ifdef HAVE_LIBPCAP
#include "face/ethernet-factory.hpp"
+#include "face/ethernet-face.hpp"
#endif // HAVE_LIBPCAP
#ifdef HAVE_WEBSOCKET