build: check for linux/genetlink.h
Change-Id: Id18fcc81a49e769a05c4416cdce03022a2179051
Refs: #4020
diff --git a/src/net/detail/netlink-message.hpp b/src/net/detail/netlink-message.hpp
index 3908d4e..498bd24 100644
--- a/src/net/detail/netlink-message.hpp
+++ b/src/net/detail/netlink-message.hpp
@@ -27,7 +27,7 @@
#include "../../common.hpp"
#include "../ethernet.hpp"
-#ifndef NDN_CXX_HAVE_RTNETLINK
+#ifndef NDN_CXX_HAVE_NETLINK
#error "This file should not be included ..."
#endif
diff --git a/src/net/detail/netlink-socket.hpp b/src/net/detail/netlink-socket.hpp
index 4a6e4f1..080d169 100644
--- a/src/net/detail/netlink-socket.hpp
+++ b/src/net/detail/netlink-socket.hpp
@@ -31,7 +31,7 @@
#include <map>
#include <vector>
-#ifndef NDN_CXX_HAVE_RTNETLINK
+#ifndef NDN_CXX_HAVE_NETLINK
#error "This file should not be included ..."
#endif
diff --git a/src/net/detail/network-monitor-impl-netlink.hpp b/src/net/detail/network-monitor-impl-netlink.hpp
index cbb0166..7870236 100644
--- a/src/net/detail/network-monitor-impl-netlink.hpp
+++ b/src/net/detail/network-monitor-impl-netlink.hpp
@@ -27,7 +27,7 @@
#include "ndn-cxx-config.hpp"
#include "../network-monitor.hpp"
-#ifndef NDN_CXX_HAVE_RTNETLINK
+#ifndef NDN_CXX_HAVE_NETLINK
#error "This file should not be included ..."
#endif
diff --git a/src/net/network-monitor.cpp b/src/net/network-monitor.cpp
index 89af14a..57ef7f1 100644
--- a/src/net/network-monitor.cpp
+++ b/src/net/network-monitor.cpp
@@ -31,7 +31,7 @@
#if defined(NDN_CXX_HAVE_OSX_FRAMEWORKS)
#include "detail/network-monitor-impl-osx.hpp"
#define NETWORK_MONITOR_IMPL_TYPE NetworkMonitorImplOsx
-#elif defined(NDN_CXX_HAVE_RTNETLINK)
+#elif defined(NDN_CXX_HAVE_NETLINK)
#include "detail/network-monitor-impl-netlink.hpp"
#define NETWORK_MONITOR_IMPL_TYPE NetworkMonitorImplNetlink
#else
diff --git a/src/net/network-monitor.hpp b/src/net/network-monitor.hpp
index 9b2d08d..5eddf1f 100644
--- a/src/net/network-monitor.hpp
+++ b/src/net/network-monitor.hpp
@@ -36,7 +36,7 @@
class NetworkMonitorImpl;
/**
- * @brief Network interface monitor
+ * @brief Network interface monitor.
*
* Maintains an up-to-date view of every system network interface and notifies when an interface
* is added or removed.
@@ -44,7 +44,7 @@
* @note The implementation of this class is highly platform dependent, and not all platform
* backends provide all the features. On macOS, @e SystemConfiguration and
* @e CFNotificationCenterAddObserver are used (notification of MTU change is not supported).
- * On Linux, @e rtnetlink notifications from the kernel are used. See getCapabilities() for
+ * On Linux, @e netlink notifications from the kernel are used. See getCapabilities() for
* the detailed set of capabilities supported by the platform backend currently in use.
*/
class NetworkMonitor : noncopyable
@@ -58,10 +58,8 @@
/**
* @brief Construct instance, request enumeration of all network interfaces, and start
- * monitoring for network state changes
- *
+ * monitoring for network state changes.
* @param io io_service instance that will dispatch events
- * @throw Error error starting monitoring
*/
explicit
NetworkMonitor(boost::asio::io_service& io);
@@ -81,16 +79,16 @@
CAP_ADDR_ADD_REMOVE = 1 << 4
};
- /// Returns a bitwise OR'ed set of @ref Capability flags supported on the current platform
+ /// Returns a bitwise OR'ed set of #Capability flags supported on the current platform.
uint32_t
getCapabilities() const;
- /// Returns the NetworkInterface with the given name, or @c nullptr if it does not exist
+ /// Returns the NetworkInterface with the given name, or @c nullptr if it does not exist.
shared_ptr<const NetworkInterface>
getNetworkInterface(const std::string& ifname) const;
/**
- * @brief Lists all network interfaces currently available on the system
+ * @brief Lists all network interfaces currently available on the system.
* @warning May return incomplete results if called before the
* #onEnumerationCompleted signal has been emitted.
*/
diff --git a/wscript b/wscript
index 66f6b15..cfedb52 100644
--- a/wscript
+++ b/wscript
@@ -83,10 +83,10 @@
fragment='''#include <unistd.h>
int main() { getpass("Enter password"); }''')
- if conf.check_cxx(msg='Checking for rtnetlink', define_name='HAVE_RTNETLINK', mandatory=False,
+ if conf.check_cxx(msg='Checking for netlink', define_name='HAVE_NETLINK', mandatory=False,
header_name=['linux/if_addr.h', 'linux/if_link.h',
- 'linux/netlink.h', 'linux/rtnetlink.h']):
- conf.env['HAVE_RTNETLINK'] = True
+ 'linux/netlink.h', 'linux/rtnetlink.h', 'linux/genetlink.h']):
+ conf.env['HAVE_NETLINK'] = True
conf.check_cxx(msg='Checking for NETLINK_EXT_ACK', define_name='HAVE_NETLINK_EXT_ACK', mandatory=False,
fragment='''#include <linux/netlink.h>
int main() { return NETLINK_EXT_ACK; }''')
@@ -185,7 +185,7 @@
libndn_cxx['source'] += bld.path.ant_glob('src/**/*-osx.cpp')
libndn_cxx['use'] += ' OSX_COREFOUNDATION OSX_CORESERVICES OSX_SECURITY OSX_SYSTEMCONFIGURATION OSX_FOUNDATION OSX_COREWLAN'
- if bld.env['HAVE_RTNETLINK']:
+ if bld.env['HAVE_NETLINK']:
libndn_cxx['source'] += bld.path.ant_glob('src/**/*netlink*.cpp')
# In case we want to make it optional later
@@ -260,7 +260,7 @@
if bld.env['HAVE_OSX_FRAMEWORKS']:
headers += bld.path.ant_glob('src/**/*-osx.hpp', excl='src/**/detail/**/*')
- if bld.env['HAVE_RTNETLINK']:
+ if bld.env['HAVE_NETLINK']:
headers += bld.path.ant_glob('src/**/*netlink*.hpp', excl='src/**/detail/**/*')
# In case we want to make it optional later