face: implement close-on-idle and persistency change for Ethernet unicast
Change-Id: I255024990a72b8cea5a44fa89f515ad91aadba66
Refs: #4011
diff --git a/daemon/face/ethernet-transport.hpp b/daemon/face/ethernet-transport.hpp
index 575ea72..6dcad18 100644
--- a/daemon/face/ethernet-transport.hpp
+++ b/daemon/face/ethernet-transport.hpp
@@ -66,6 +66,18 @@
void
doClose() final;
+ bool
+ hasBeenUsedRecently() const
+ {
+ return m_hasBeenUsedRecently;
+ }
+
+ void
+ resetRecentUsage()
+ {
+ m_hasBeenUsedRecently = false;
+ }
+
private:
void
doSend(Transport::Packet&& packet) final;
@@ -82,11 +94,8 @@
void
handleRead(const boost::system::error_code& error);
- /**
- * @brief Handles errors encountered by Boost.Asio on the receive path
- */
void
- processErrorCode(const boost::system::error_code& error);
+ handleError(const std::string& errorMessage);
/**
* @brief Returns the MTU of the underlying network interface
@@ -102,6 +111,7 @@
std::string m_interfaceName;
private:
+ bool m_hasBeenUsedRecently;
#ifdef _DEBUG
/// number of frames dropped by the kernel, as reported by libpcap
size_t m_nDropped;