face: reimplement EndpointId with std::variant

Refs: #5041
Change-Id: Ib8aced49a7aa14b137fb06de4a0ae8b979f07587
diff --git a/daemon/face/ethernet-transport.cpp b/daemon/face/ethernet-transport.cpp
index 53de0b7..c122a80 100644
--- a/daemon/face/ethernet-transport.cpp
+++ b/daemon/face/ethernet-transport.cpp
@@ -29,8 +29,6 @@
 
 #include <pcap/pcap.h>
 
-#include <cstring> // for memcpy()
-
 #include <boost/endian/conversion.hpp>
 
 namespace nfd::face {
@@ -207,13 +205,7 @@
   }
   m_hasRecentlyReceived = true;
 
-  static_assert(sizeof(EndpointId) >= ethernet::ADDR_LEN, "EndpointId is too small");
-  EndpointId endpoint = 0;
-  if (m_destAddress.isMulticast()) {
-    std::memcpy(&endpoint, sender.data(), sender.size());
-  }
-
-  this->receive(element, endpoint);
+  this->receive(element, m_destAddress.isMulticast() ? sender : EndpointId{});
 }
 
 void