diff --git a/src/traffic.c b/src/traffic.c
index 5c5e4f74efd7ccae34180706c7dd7f4456a655b2..5fc55d757eecf414fb2e9d232289b38822f1f450 100644 (file)
--- a/src/traffic.c
+++ b/src/traffic.c
/**
* collectd - src/traffic.c
- * Copyright (C) 2005,2006 Florian octo Forster
+ * Copyright (C) 2005-2007 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
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * Free Software Foundation; only version 2 of the License is applicable.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
# include <ifaddrs.h>
#endif
-#define MODULE_NAME "traffic"
-
/*
* Various people have reported problems with `getifaddrs' and varying versions
* of `glibc'. That's why it's disabled by default. Since more statistics are
# define TRAFFIC_HAVE_READ 0
#endif
-#define BUFSIZE 512
-
/*
* (Module-)Global variables
*/
vl.time = time (NULL);
strcpy (vl.host, hostname);
strcpy (vl.plugin, "interface");
- strcpy (vl.plugin_instance, "");
strncpy (vl.type_instance, dev, sizeof (vl.type_instance));
plugin_dispatch_values (type, &vl);
struct IFA_DATA *if_data;
if (getifaddrs (&if_list) != 0)
- return;
+ return (-1);
for (if_ptr = if_list; if_ptr != NULL; if_ptr = if_ptr->ifa_next)
{
plugin_register_read ("interface", traffic_read);
#endif
}
-
-#undef BUFSIZE
-#undef MODULE_NAME