+ m_listener->handle_interface_stat(*this);
+}
+
+std::ostream&
+operator<<(std::ostream& os, const interface::stats_t& stats)
+{
+ os << "["
+ << "rx [packets " << stats.m_rx.packets << ", bytes " << stats.m_rx.bytes
+ << "]"
+ << " rx-unicast [packets " << stats.m_rx_unicast.packets << ", bytes "
+ << stats.m_rx_unicast.bytes << "]"
+ << " rx-multicast [packets " << stats.m_rx_multicast.packets << ", bytes "
+ << stats.m_rx_multicast.bytes << "]"
+ << " rx-broadcast [packets " << stats.m_rx_broadcast.packets << ", bytes "
+ << stats.m_rx_broadcast.bytes << "]"
+ << " tx [packets " << stats.m_tx.packets << ", bytes " << stats.m_tx.bytes
+ << "]"
+ << " tx-unicast [packets " << stats.m_tx_unicast.packets << ", bytes "
+ << stats.m_tx_unicast.bytes << "]"
+ << " tx-multicast [packets " << stats.m_tx_multicast.packets << ", bytes "
+ << stats.m_tx_multicast.bytes << "]"
+ << " tx-broadcast [packets " << stats.m_tx_broadcast.packets << ", bytes "
+ << stats.m_tx_broadcast.bytes << "]]" << std::endl;
+
+ return (os);
+}
+
+void
+interface::enable_stats_i(interface::stat_listener* el, const stats_type_t& st)
+{
+ if (el != NULL) {