X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fopenvpn.c;h=9ce23b4f4cb9c9e2550e86d337a866a451931404;hb=633c3966f770e4d46651a2fe219a18d8a9907a9f;hp=2aca4145cdae3d36c2e1ead682b9ab0343a418b6;hpb=37676c3b280e15df8efbef2a3dc6c9096d1ae03b;p=collectd.git diff --git a/src/openvpn.c b/src/openvpn.c index 2aca4145..9ce23b4f 100644 --- a/src/openvpn.c +++ b/src/openvpn.c @@ -1,9 +1,9 @@ /** * 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 @@ -20,7 +20,7 @@ * * Authors: * Doug MacEachern - * Florian octo Forster + * Florian octo Forster * Marco Chiappero * Fabian Schuh **/ @@ -114,13 +114,13 @@ static void numusers_submit (char *pinst, char *tinst, gauge_t value) } /* 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); @@ -173,11 +173,11 @@ static int single_read (char *name, FILE *fh) 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;