diff --git a/src/netlink.c b/src/netlink.c
index b15768e719d5c7ea847848ea63db4142e703c45c..10c8dd1b189fa7664810452b1f3812a5d5082334 100644 (file)
--- a/src/netlink.c
+++ b/src/netlink.c
/**
* collectd - src/netlink.c
- * Copyright (C) 2007 Florian octo Forster
+ * Copyright (C) 2007-2010 Florian octo Forster
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
- * Florian octo Forster <octo at verplant.org>
+ * Florian octo Forster <octo at collectd.org>
**/
#include "collectd.h"
} /* int check_ignorelist */
static void submit_one (const char *dev, const char *type,
- const char *type_instance, counter_t value)
+ const char *type_instance, derive_t value)
{
value_t values[1];
- value_list_t vl = VALUE_LIST_INIT;
+ value_list_t vl = VALUE_LIST_INIT (plugin_interval);
- values[0].counter = value;
+ values[0].derive = value;
vl.values = values;
vl.values_len = 1;
static void submit_two (const char *dev, const char *type,
const char *type_instance,
- counter_t rx, counter_t tx)
+ derive_t rx, derive_t tx)
{
value_t values[2];
- value_list_t vl = VALUE_LIST_INIT;
+ value_list_t vl = VALUE_LIST_INIT (plugin_interval);
- values[0].counter = rx;
- values[1].counter = tx;
+ values[0].derive = rx;
+ values[1].derive = tx;
vl.values = values;
vl.values_len = 2;
}
else
{
- if ((strcasecmp (fields[0], "yes") == 0)
- || (strcasecmp (fields[0], "true") == 0)
- || (strcasecmp (fields[0], "on") == 0))
+ if (IS_TRUE (fields[0]))
ir_ignorelist_invert = 0;
else
ir_ignorelist_invert = 1;
return (0);
} /* int ir_shutdown */
-void module_register (void)
+void module_register (plugin_loaddata_t *data)
{
+ PLUGIN_INIT_INTERVAL (data);
plugin_register_config ("netlink", ir_config, config_keys, config_keys_num);
plugin_register_init ("netlink", ir_init);
- plugin_register_read ("netlink", ir_read);
+ plugin_register_read ("netlink", ir_read, plugin_interval);
plugin_register_shutdown ("netlink", ir_shutdown);
} /* void module_register */