Merge branch 'collectd-4.0' into collectd-4.1
[collectd.git] / src / netlink.c
index fa8a92f..3cd91d8 100644 (file)
 
 #include <asm/types.h>
 #include <sys/socket.h>
-#include <iproute/libnetlink.h>
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
 #include <linux/gen_stats.h>
 
-#include <iproute/ll_map.h>
+#if HAVE_LIBNETLINK_H
+# include <libnetlink.h>
+#elif HAVE_IPROUTE_LIBNETLINK_H
+# include <iproute/libnetlink.h>
+#elif HAVE_LINUX_LIBNETLINK_H
+# include <linux/libnetlink.h>
+#endif
 
 typedef struct ir_ignorelist_s
 {
@@ -130,12 +135,6 @@ static int check_ignorelist (const char *dev,
     if (strcasecmp (i->type, type) != 0)
       continue;
 
-#if 0
-    if ((i->inst != NULL)
-       && ((type_instance == NULL)
-         || (strcasecmp (i->inst, type_instance) != 0)))
-      continue;
-#endif
     if ((i->inst != NULL) && (type_instance != NULL)
        && (strcasecmp (i->inst, type_instance) != 0))
       continue;
@@ -515,12 +514,6 @@ static int ir_init (void)
     return (-1);
   }
 
-  if (ll_init_map (&rth) != 0)
-  {
-    ERROR ("netlink plugin: ir_read: ll_init_map failed.");
-    return (-1);
-  }
-
   return (0);
 } /* int ir_init */