25 #ifndef NDN_NET_NETWORK_MONITOR_HPP 26 #define NDN_NET_NETWORK_MONITOR_HPP 36 class NetworkMonitorImpl;
53 class Error :
public std::runtime_error
58 :
std::runtime_error(what)
93 shared_ptr<const NetworkInterface>
101 std::vector<shared_ptr<const NetworkInterface>>
115 const unique_ptr<NetworkMonitorImpl> m_impl;
146 virtual shared_ptr<const NetworkInterface>
149 virtual std::vector<shared_ptr<const NetworkInterface>>
153 static shared_ptr<NetworkInterface>
154 makeNetworkInterface();
172 #endif // NDN_NET_NETWORK_MONITOR_HPP Copyright (c) 2013-2017 Regents of the University of California.
listNetworkInterfaces() and getNetworkInterface() are supported
NetworkMonitor(boost::asio::io_service &io)
Construct instance, request enumeration of all network interfaces, and start monitoring for network s...
util::Signal< NetworkMonitorImpl, shared_ptr< const NetworkInterface > > & onInterfaceAdded
Fires when a new interface is added.
NetworkInterface onAddressAdded and onAddressRemoved signals are supported.
NetworkInterface onMtuChanged signal is supported.
NetworkInterface onStateChanged signal is supported.
util::Signal< NetworkMonitorImpl > & onNetworkStateChanged
shared_ptr< const NetworkInterface > getNetworkInterface(const std::string &ifname) const
Returns the NetworkInterface with the given name, or nullptr if it does not exist.
Network interface monitor.
util::Signal< NetworkMonitorImpl > onEnumerationCompleted
uint32_t getCapabilities() const
Returns a bitwise OR'ed set of Capability flags supported on the current platform.
NetworkMonitor is not supported and is a no-op.
util::Signal< NetworkMonitorImpl, shared_ptr< const NetworkInterface > > & onInterfaceRemoved
Fires when an interface is removed.
#define DECLARE_SIGNAL_EMIT(signalName)
(implementation detail) declares a 'emit_signalName' method
util::Signal< NetworkMonitorImpl, shared_ptr< const NetworkInterface > > onInterfaceRemoved
util::Signal< NetworkMonitorImpl, shared_ptr< const NetworkInterface > > onInterfaceAdded
std::vector< shared_ptr< const NetworkInterface > > listNetworkInterfaces() const
Lists all network interfaces currently available on the system.
NetworkMonitorImpl & getImpl()
NetworkMonitor onInterfaceAdded and onInterfaceRemoved signals are supported.
Error(const std::string &what)
util::Signal< NetworkMonitorImpl > onNetworkStateChanged
util::Signal< NetworkMonitorImpl > & onEnumerationCompleted
Fires when network interfaces enumeration is complete.