diff --git a/src/openvpn.c b/src/openvpn.c
index 2aca4145cdae3d36c2e1ead682b9ab0343a418b6..9ce23b4f4cb9c9e2550e86d337a866a451931404 100644 (file)
--- a/src/openvpn.c
+++ b/src/openvpn.c
/**
* collectd - src/openvpn.c
- * Copyright (C) 2008 Doug MacEachern
- * Copyright (C) 2009 Florian octo Forster
- * Copyright (C) 2009 Marco Chiappero
- * Copyright (C) 2009 Fabian Schuh
+ * Copyright (C) 2008 Doug MacEachern
+ * Copyright (C) 2009,2010 Florian octo Forster
+ * Copyright (C) 2009 Marco Chiappero
+ * Copyright (C) 2009 Fabian Schuh
*
* 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
*
* Authors:
* Doug MacEachern <dougm at hyperic.com>
- * Florian octo Forster <octo at verplant.org>
+ * Florian octo Forster <octo at collectd.org>
* Marco Chiappero <marco at absence.it>
* Fabian Schuh <mail at xeroc.org>
**/
} /* void numusers_submit */
/* dispatches stats about traffic (TCP or UDP) generated by the tunnel per single endpoint */
-static void iostats_submit (char *pinst, char *tinst, counter_t rx, counter_t tx)
+static void iostats_submit (char *pinst, char *tinst, derive_t rx, derive_t tx)
{
value_t values[2];
value_list_t vl = VALUE_LIST_INIT;
- values[0].counter = rx;
- values[1].counter = tx;
+ values[0].derive = rx;
+ values[1].derive = tx;
/* NOTE ON THE NEW NAMING SCHEMA:
* using plugin_instance to identify each vpn config (and
@@ -144,13 +144,13 @@ static void iostats_submit (char *pinst, char *tinst, counter_t rx, counter_t tx
/* dispatches stats about data compression shown when in single mode */
static void compression_submit (char *pinst, char *tinst,
- counter_t uncompressed, counter_t compressed)
+ derive_t uncompressed, derive_t compressed)
{
value_t values[2];
value_list_t vl = VALUE_LIST_INIT;
- values[0].counter = uncompressed;
- values[1].counter = compressed;
+ values[0].derive = uncompressed;
+ values[1].derive = compressed;
vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE (values);
const int max_fields = STATIC_ARRAY_SIZE (fields);
int fields_num, read = 0;
- counter_t link_rx, link_tx;
- counter_t tun_rx, tun_tx;
- counter_t pre_compress, post_compress;
- counter_t pre_decompress, post_decompress;
- counter_t overhead_rx, overhead_tx;
+ derive_t link_rx, link_tx;
+ derive_t tun_rx, tun_tx;
+ derive_t pre_compress, post_compress;
+ derive_t pre_decompress, post_decompress;
+ derive_t overhead_rx, overhead_tx;
link_rx = 0;
link_tx = 0;